Hang on service stop in uwait state starting in v9.16.11
Issue from https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=253062
After upgrading from 9.16.10 to 9.16.11, the named service does not stop properly.
$ sudo service named stop
Stopping named.
Waiting for PIDS: %PID% <-- hangs here indefinitely
$ procstat %PID%
PID PPID PGID SID TSID THR LOGIN WCHAN EMUL COMM
%PID% 1 %PID% %PID% 0 26 obrienjw uwait FreeBSD ELF64 named
(lldb) bt
* thread #1, name = 'named'
* frame #0: 0x0000000800cc768c libthr.so.3`_umtx_op_err at _umtx_op_err.S:37
frame #1: 0x0000000800cc3591 libthr.so.3`join_common(pthread=0x0000000803585200, thread_return=0x0000000000000000, abstime=0x0000000000000000, peek=<unavailable>) at thr_join.c:147:9
frame #2: 0x000000000050dbef named`isc_thread_join + 31
frame #3: 0x00000000004fb49f named`isc_taskmgr_destroy + 607
frame #4: 0x00000000002dae31 named`main + 5841
frame #5: 0x00000000002d16b0 named`_start + 256
This is reproducible on two different 12.2R machines on which named is configured to act as a resolver. The hang does not occur on two other hosts on which named is configured to as as authoritative only. On the hosts where the hang occurs, the named logs contain lines of the form:
Jan 28 08:03:12 hostname named[%PID%]: creating IPv6 interface igb0 failed; interface ignored
These errors are absent on the hosts where the hang does not occur.
The 9.16.11 changelog includes a number of items related to threads and netmgr.