On Sun, Dec 20, 2020 at 06:27:33AM +0000, James Cook wrote: > On Sat, Dec 19, 2020 at 07:33:42AM +0000, James Cook wrote: > > > Suggestions are welcome. In the meantime I am slowly trying to debug > > > this myself, mostly as a learning exercise. I've successfully built my > > > own bsd.rd (using the instructions on the release(8) man page) with the > > > intention of adding some debug output to narrow down where it's > > > getting stuck, but I don't know my way around the kernel code. > > > > Minor progress: I have determined that the kernel gets at least as far > > as exec-ing the init process (more precisely, calling sys_execve in > > init_main.c). > > I found out init gets stuck calling sleep(2) in setctty in > sbin/init/init.c. (Details below on how I determined that.) > > Any idea what could cause a call to sleep to just hang indefinitely? >
Can you try hpet instead of tsc? Either sysctl kern.timecounter.hardware=acpihpet0 or build a kernel with something like this which will give hpet a higher priority than tsc. Index: sys/dev/acpi/acpihpet.c =================================================================== RCS file: /cvs/src/sys/dev/acpi/acpihpet.c,v retrieving revision 1.24 diff -u -p -r1.24 acpihpet.c --- sys/dev/acpi/acpihpet.c 6 Jul 2020 13:33:08 -0000 1.24 +++ sys/dev/acpi/acpihpet.c 20 Dec 2020 09:32:40 -0000 @@ -45,7 +45,7 @@ static struct timecounter hpet_timecount 0xffffffff, /* counter_mask (32 bits) */ 0, /* frequency */ 0, /* name */ - 1000, /* quality */ + 2500, /* quality */ NULL, /* private bits */ 0, /* expose to user */ };