NetBSD Problem Report #60210

From john@nano.zia.io  Sun Apr 26 01:42:51 2026
Return-Path: <john@nano.zia.io>
Received: from mail.netbsd.org (mail.netbsd.org [199.233.217.200])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256
	 client-signature RSA-PSS (2048 bits) client-digest SHA256)
	(Client CN "mail.netbsd.org", Issuer "R12" (not verified))
	by mollari.NetBSD.org (Postfix) with ESMTPS id C268B1A923C
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Apr 2026 01:42:50 +0000 (UTC)
Message-Id: <20260426013517.4DBC49DE33C@nano.zia.io>
Date: Sun, 26 Apr 2026 01:35:17 +0000 (UTC)
From: john@ziaspace.com
Reply-To: john@ziaspace.com
To: gnats-bugs@NetBSD.org
Subject: /usr/sbin/named doesn't work on NetBSD-11/earmv5, earmv6hf, earmv7hf
X-Send-Pr-Version: 3.95
X-From4GNATS: "john@ziaspace.com via gnats" <gnats-admin@NetBSD.org>

>Number:         60210
>Category:       port-arm
>Synopsis:       /usr/sbin/named doesn't work on NetBSD-11/earmv5, earmv6hf, earmv7hf
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    port-arm-maintainer
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Apr 26 01:45:00 +0000 2026
>Last-Modified:  Sun Apr 26 05:55:01 +0000 2026
>Originator:     John Klos
>Release:        NetBSD 11.0_RC3
>Organization:

>Environment:


System: NetBSD nano.zia.io 11.0_RC3 NetBSD 11.0_RC3 (GENERIC) #0: Mon Apr 13 07:56:14 UTC 2026 john@platypus.zia.io:/usr/obj-evbarm/sys/arch/evbarm/compile/GENERIC evbarm
Architecture: earmv7hf
Machine: evbarm
>Description:

Launching /usr/sbin/named with any configuration gives a process that 
takes 100% CPU on one core.

  PID USERNAME PRI NICE   SIZE   RES STATE       TIME   WCPU    CPU COMMAND
 4014 root      26    0    74M   11M CPU/3       4:56 99.02% 99.02% named

(gdb) where
#0  0x77dc3940 in poll () from /usr/lib/libc.so.12
#1  0x7851bce4 in poll () from /usr/lib/libpthread.so.1
#2  0x001cee04 in ?? ()
Backtrace stopped: previous frame identical to this frame (corrupt stack?)
(gdb) list
1483			scf_handle_destroy(h);
1484			return (ISC_R_FAILURE);
1485		}
1486	
1487		if ((instance = isc_mem_allocate(mctx, namelen + 1)) == NULL) {
1488			UNEXPECTED_ERROR("named_smf_get_instance memory "
1489					 "allocation failed: %s",
1490					 isc_result_totext(ISC_R_NOMEMORY));
1491			scf_handle_destroy(h);
1492			return (ISC_R_FAILURE);


>How-To-Repeat:

Try to run /usr/sbin/named on 32 bit Arm.
>Fix:


>Audit-Trail:
From: mlelstv@serpens.de (Michael van Elst)
To: gnats-bugs@netbsd.org
Cc: 
Subject: Re: port-arm/60210: /usr/sbin/named doesn't work on NetBSD-11/earmv5, earmv6hf, earmv7hf
Date: Sun, 26 Apr 2026 05:54:54 -0000 (UTC)

 gnats-admin@NetBSD.org ("john@ziaspace.com via gnats") writes:

 >Launching /usr/sbin/named with any configuration gives a process that 
 >takes 100% CPU on one core.

 Same on -current.

 (gdb) bt
 #0  0x75a26218 in poll () from /usr/lib/libc.so.12
 #1  0x7619dce0 in poll (fds=fds@entry=0x0, nfds=nfds@entry=0, 
     timeout=timeout@entry=10)
     at /scratch/netbsd-current/src/lib/libpthread/pthread_cancelstub.c:482
 #2  0x00b8ef7c in compat_futex_async (uaddr=uaddr@entry=0x75876ba8, 
     op=op@entry=0, val=-1, timeout=timeout@entry=0x0, uaddr2=uaddr2@entry=0x0, 
     val3=val3@entry=0)
     at /scratch/netbsd-current/src/external/lgpl2/userspace-rcu/lib/liburcu-mb/../../dist/src/compat_futex.c:125
 #3  0x00b91d60 in futex_async (uaddr=0x75876ba8, op=0, val=-1, timeout=0x0, 
     uaddr2=0x0, val3=0)
     at /scratch/netbsd-current/src/external/lgpl2/userspace-rcu/lib/liburcu-cds/../../dist/include/urcu/futex.h:274
 #4  futex_wait (futex=futex@entry=0x75876ba8)
     at /scratch/netbsd-current/src/external/lgpl2/userspace-rcu/lib/liburcu-cds/../../dist/src/workqueue.c:121
 #5  0x00b923d4 in workqueue_thread (arg=0x75876b80)
     at /scratch/netbsd-current/src/external/lgpl2/userspace-rcu/lib/liburcu-cds/../../dist/src/workqueue.c:232
 #6  0x761a3748 in pthread__create_tramp (cookie=0x75604600)
     at /scratch/netbsd-current/src/lib/libpthread/pthread.c:607
 #7  0x75a26c18 in __mknod50 () from /usr/lib/libc.so.12
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)

 __mknod50 is an artefact.

 (gdb) info threads
   Id   Target Id                                  Frame 
 * 1    LWP 3184 of process 3387 ""                0x75a26218 in poll ()
    from /usr/lib/libc.so.12
   2    LWP 2992 of process 3387 "isc-helper-0003" 0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   3    LWP 3257 of process 3387 "isc-helper-0002" 0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   4    LWP 2359 of process 3387 "isc-helper-0001" 0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   5    LWP 3253 of process 3387 "isc-helper-0000" 0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   6    LWP 3384 of process 3387 "isc-loop-0003"   0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   7    LWP 3539 of process 3387 "isc-loop-0002"   0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   8    LWP 2106 of process 3387 "isc-loop-0001"   0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
   9    LWP 3420 of process 3387 ""                0x75a26218 in poll ()
    from /usr/lib/libc.so.12
   10   LWP 3387 of process 3387 ""                0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12

 The thread frame pointers are probably another artefact, threads shouldn't
 share stack frames. For the record, e.g.:

 Thread 7 (LWP 3539 of process 3387 "isc-loop-0002"):
 #0  0x75a262b4 in _sys___kevent100 () from /usr/lib/libc.so.12
 #1  0x7619d650 in __kevent100 (fd=12, ev=ev@entry=0x74805f48, nev=<optimized out>, rev=rev@entry=0x74805f48, nrev=nrev@entry=1024, ts=ts@entry=0x0) at /scratch/netbsd-current/src/lib/libpthread/pthread_cancelstub.c:314
 #2  0x7627392c in uv__io_poll (loop=0x75823c78, timeout=<optimized out>) at /scratch/netbsd-current/src/external/mit/libuv/lib/../dist/src/unix/kqueue.c:286
 #3  0x7627bd00 in uv_run (loop=<optimized out>, mode=UV_RUN_DEFAULT) at /scratch/netbsd-current/src/external/mit/libuv/lib/../dist/src/unix/core.c:460
 #4  0x7626503c in loop_thread (arg=arg@entry=0x75823c68) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/loop.c:330
 #5  0x7626ad70 in thread_body (wrap=0x75855830) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/thread.c:87
 #6  thread_run (wrap=0x75855830) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/thread.c:102
 #7  0x761a3748 in pthread__create_tramp (cookie=0x75601c00) at /scratch/netbsd-current/src/lib/libpthread/pthread.c:607
 #8  0x75a26c18 in __mknod50 () from /usr/lib/libc.so.12
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)


 According to ps, the spinning thread is LID 3384:

 #  ps -sp 3387
 UID  PID PPID   CPU  LID NLWP PRI NI   VSZ   RSS WCHAN  STAT TTY   LTIME COMMAND
   0 3387    1 36864 3184   10  85  0 80376 11144 poll   S    ?   0:00.24 /usr/s
   0 3387    1 36864 2992   10  85  0 80376 11144 kqueue I    ?   0:00.00 /usr/s
   0 3387    1 36864 3257   10  85  0 80376 11144 kqueue I    ?   0:00.00 /usr/s
   0 3387    1 36864 2359   10  85  0 80376 11144 kqueue I    ?   0:00.00 /usr/s
   0 3387    1 36864 3253   10  85  0 80376 11144 kqueue I    ?   0:00.00 /usr/s
   0 3387    1 36864 3384   10  25  0 80376 11144 -      O    ?   5:45.56 /usr/s
   0 3387    1 36864 3539   10  85  0 80376 11144 kqueue I    ?   0:00.06 /usr/s
   0 3387    1 36864 2106   10  85  0 80376 11144 kqueue I    ?   0:00.07 /usr/s
   0 3387    1 36864 3420   10  85  0 80376 11144 poll   S    ?   0:00.21 /usr/s
   0 3387    1 36864 3387   10  85  0 80376 11144 kqueue I    ?   0:00.28 /usr/s


 Using gcore and loading the core with gdb reveals:

 (gdb) info threads
   Id   Target Id         Frame 
 * 1    process 3184      0x75a26218 in poll () from /usr/lib/libc.so.12
   2    process 2992      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   3    process 3257      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   4    process 2359      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   5    process 3253      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   6    process 3384      0x75a26f68 in __clock_gettime50 ()
    from /usr/lib/libc.so.12
   7    process 3539      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   8    process 2106      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12
   9    process 3420      0x75a26218 in poll () from /usr/lib/libc.so.12
   10   process 3387      0x75a262b4 in _sys___kevent100 ()
    from /usr/lib/libc.so.12

 (gdb) thread apply 6 bt 

 Thread 6 (process 3384):
 #0  0x75a26f68 in __clock_gettime50 () from /usr/lib/libc.so.12
 #1  0x7627f810 in uv__hrtime (type=<optimized out>) at /scratch/netbsd-current/src/external/mit/libuv/lib/../dist/src/unix/posix-hrtime.c:32
 #2  0x7627be40 in uv__update_time (loop=0x758240a8) at /scratch/netbsd-current/src/external/mit/libuv/lib/../dist/src/unix/internal.h:405
 #3  uv_run (loop=<optimized out>, mode=UV_RUN_DEFAULT) at /scratch/netbsd-current/src/external/mit/libuv/lib/../dist/src/unix/core.c:477
 #4  0x7626503c in loop_thread (arg=arg@entry=0x75824098) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/loop.c:330
 #5  0x7626ad70 in thread_body (wrap=0x75855850) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/thread.c:87
 #6  thread_run (wrap=0x75855850) at /scratch/netbsd-current/src/external/mpl/bind/lib/libisc/../../dist/lib/isc/thread.c:102
 #7  0x761a3748 in pthread__create_tramp (cookie=0x75602a00) at /scratch/netbsd-current/src/lib/libpthread/pthread.c:607
 #8  0x75a26c18 in __mknod50 () from /usr/lib/libc.so.12
 Backtrace stopped: previous frame identical to this frame (corrupt stack?)


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.