On 2020-06-20, Christian Weisgerber <na...@mips.inka.de> wrote: > I can't get this revision of the diff to work on amd64: > * patch source > * build and install kernel, reboot > * make build > * reboot -> "Process (pid 1) got signal 11" > > I'm at a loss. As part of the "make build", the new libc is installed > and dynamically linked programs should already be using the userland > gettime calls. Clearly this works. So why does init fail on the > next reboot?
I can recover by extracting ./sbin/init from a snapshot in the installer. After that, the system comes up fine in multiuser mode. Nothing else appears to be affected, apart from init. For a while, I had a reproducible situation. When you call init(8) as a normal user in multiuser mode, it will just exit with "init: Operation not permitted". Instead it would segfault! I kept tweaking lib/libc/dlfcn/init.c, rebuilding and reinstalling libc.a, rebuilding init, and watching it segfault. None of the debug write(2)s I inserted would produce any output, it seemed to die before ever reaching _libc_preinit(). I finally ktraced it: 12420 ktrace RET ktrace 0 12420 ktrace CALL execve(0x7f7ffffec412,0x7f7ffffec298,0x7f7ffffec2a8) 12420 ktrace NAMI "./obj/init" 12420 ktrace ARGS [0] = "./obj/init" 12420 init RET execve 0 12420 init PSIG SIGSEGV SIG_DFL code SEGV_MAPERR<1> addr=0x0 trapno=6 12420 init NAMI "init.core" There's not even a kbind(2) there. Then I removed the clearly useless debug write()s... and since then I have a hard time reproducing the problem. It doesn't make any sense. -- Christian "naddy" Weisgerber na...@mips.inka.de