bug-hurd
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Please comment out constants in header files for features not being supp


From: Svante Signell
Subject: Please comment out constants in header files for features not being supported yet. And remove stubs??
Date: Thu, 17 Dec 2020 15:54:28 +0100
User-agent: Evolution 3.30.5-1

Hello,

Testing the command host <address> results in 
time.c:118: Invalid argument
timer.c:634: fatal error: RUNTIME_CHECK(isc_time_now((&now)) == 0)
failed
Aborted (core dumped)

Looking into the problem reveals that bind9 is built with the wrong
option clk_id for clock_gettime(): CLOCK_REALTIME_COARSE is used
instead of CLOCK_REALTIME. This is shown in the source code for
lib/isc/unix/stdtime.c and lib/isc/unix/time.c:
#if defined(CLOCK_REALTIME_COARSE)
#define CLOCKSOURCE CLOCK_REALTIME_COARSE
#elif defined(CLOCK_REALTIME_FAST)
#define CLOCKSOURCE CLOCK_REALTIME_FAST
#else /* if defined(CLOCK_REALTIME_COARSE) */
#define CLOCKSOURCE CLOCK_REALTIME
#endif /* if defined(CLOCK_REALTIME_COARSE) */

Searching for CLOCK_REALTIME_COARSE in the header files reveals:
/usr/include/i386-gnu/bits/time.h:
/* Identifier for system-wide realtime clock, updated only on
ticks.  */
# define CLOCK_REALTIME_COARSE          5

The problem with that option is that it is not yet supported, resulting
in EINVAL and a crash message on the console: /hurd/crash: host
<address> crashed ...

Recompiling bind9 commenting out the definition of
CLOCK_REALTIME_COARSE in time.h makes the crash go away.
host <numeric address> works fine :)

However, another crash happens (still to be further investigated): host
ftp.sunet.se run in gdb shows:
[New Thread 29158.13]
[New Thread 29158.14]
[New Thread 29158.15]
[New Thread 29158.16]
ftp.sunet.se is an alias for sunet.ftp.acc.umu.se.
sunet.ftp.acc.umu.se has address 194.71.11.173
sunet.ftp.acc.umu.se has address 194.71.11.165

Thread 4 received signal SIGTRAP, Trace/breakpoint trap.
0x013f05ac in mach_msg_trap () at ./build-tree/hurd-i386-
libc/mach/mach_msg_trap.S:2
2       ./build-tree/hurd-i386-libc/mach/mach_msg_trap.S: No such file
or directory.
(gdb) c
Continuing.
socket.c:3173: REQUIRE(readable || writeable) failed, back trace
#0 0x132a806 in ??
#1 0x132a735 in ??
#2 0x13640d5 in ??
#3 0x13c33ff in ??

Thread 4 received signal SIGABRT, Aborted.
0x013f05ac in mach_msg_trap () at ./build-tree/hurd-i386-
libc/mach/mach_msg_trap.S:2
2       in ./build-tree/hurd-i386-libc/mach/mach_msg_trap.S
(gdb) where
#0  0x013f05ac in mach_msg_trap () at ./build-tree/hurd-i386-
libc/mach/mach_msg_trap.S:2
#1  0x013f0d99 in __GI___mach_msg (msg=0x4808b18, option=2,
send_size=0, rcv_size=24, 
    rcv_name=171, timeout=0, notify=0) at msg.c:123
#2  0x0143f179 in __GI___sigwait (set=0x4808bd4, sig=0x4808bd8)
    at ../sysdeps/mach/hurd/sigwait.c:113
#3  0x01329c52 in isc_app_ctxrun (ctx=<optimized out>) at app.c:312
#4  0x01329eff in isc_app_run () at app.c:365

So the problem now is now at sigwait.c:113:
/* Select any of pending signals from SET or wait for any to
arrive.  */
int
__sigwait (const sigset_t *set, int *sig)
...
  if (!setjmp (buf))
...
      /* Wait. */
      __mach_msg (&msg, MACH_RCV_MSG, 0, sizeof (msg), wait,
                  MACH_MSG_TIMEOUT_NONE, MACH_PORT_NULL);
      abort ();


Note: Rebuilding bind9 required some fixes:
1) Build clisp-2.49.20180218+really2.49.92-3 without tests. (or find
the failing test(s), and fix). Provides: clisp-fasl-loader-20100806
2) Build xindy-2.5.1.20160104-8 with the built clisp.
3) Rebuild bind9 with the newly installed versions of clisp and xindy.

There are other packages falsely believing that some features are
available when they are not. It would be good to hide from the
appropriate header files.

Maybe even the stubs, like: posix_fadvise, acct, getrandom,
msg{ctl,get,rcv,snd}, sem{ctl,op,get}, vhangup, pthread_getcpuclockid,
etc from gnu/stubs.h should be hidden too?




reply via email to

[Prev in Thread] Current Thread [Next in Thread]