NetBSD-Bugs archive

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

re: bin/59571: new bind crashes on arm64



The following reply was made to PR bin/59571; it has been noted by GNATS.

From: matthew green <mrg%eterna23.net@localhost>
To: gnats-bugs%netbsd.org@localhost
Cc: gnats-admin%netbsd.org@localhost, netbsd-bugs%netbsd.org@localhost
Subject: re: bin/59571: new bind crashes on arm64
Date: Wed, 06 Aug 2025 09:20:53 +1000

 i wonder if we could work around this by turning off the
 RCU_MEMBARRIER version and forcing RCU_MB version, which is
 effectively the one we end up using anyway, since membarrier()
 is a linux feature only.
 
 i tested this, seems to work fine.  since it involves no code
 changes to upstream, just this small diff (which includes a
 fix for liburcu-signal/Makefile that doesn't matter.)
 
 
 note this isn't a fix for whatever the underlying problem is,
 but i think this is better anyway since it avoids code that
 won't even run on netbsd being compiled in at all.  (if we
 go with this, and close this PR, a separate PR for the other
 problem should be created.)
 
 
 .mrg.
 
 
 Index: lgpl2/userspace-rcu/lib/liburcu/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/lgpl2/userspace-rcu/lib/liburcu/Makefile,v
 retrieving revision 1.1
 diff -p -u -r1.1 Makefile
 --- lgpl2/userspace-rcu/lib/liburcu/Makefile	17 Jan 2025 16:07:26 -0000	1.=
 1
 +++ lgpl2/userspace-rcu/lib/liburcu/Makefile	5 Aug 2025 23:17:51 -0000
 @@ -4,7 +4,7 @@
  =
 
  LIBISPRIVATE=3Dyes
  LIB=3Durcu
 -CPPFLAGS+=3D-DRCU_MEMBARRIER
 +CPPFLAGS+=3D-DRCU_MB
  =
 
  SRCS+=3D urcu.c urcu-pointer.c compat_arch.c compat_futex.c
  =
 
 Index: lgpl2/userspace-rcu/lib/liburcu-signal/Makefile
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/lgpl2/userspace-rcu/lib/liburcu-signal/Mak=
 efile,v
 retrieving revision 1.1
 diff -p -u -r1.1 Makefile
 --- lgpl2/userspace-rcu/lib/liburcu-signal/Makefile	17 Jan 2025 16:07:27 -=
 0000	1.1
 +++ lgpl2/userspace-rcu/lib/liburcu-signal/Makefile	5 Aug 2025 23:17:51 -0=
 000
 @@ -3,7 +3,7 @@
  .include <bsd.own.mk>
  =
 
  LIBISPRIVATE=3Dyes
 -LIB=3Durcu-mb
 +LIB=3Durcu-signal
  CPPFLAGS+=3D-DRCU_SIGNAL -DRCU_MEMBARRIER
  =
 
  SRCS+=3D urcu.c urcu-pointer.c compat_arch.c compat_futex.c
 Index: mpl/bind/Makefile.inc
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/mpl/bind/Makefile.inc,v
 retrieving revision 1.17
 diff -p -u -r1.17 Makefile.inc
 --- mpl/bind/Makefile.inc	14 Jul 2025 10:25:52 -0000	1.17
 +++ mpl/bind/Makefile.inc	5 Aug 2025 23:17:51 -0000
 @@ -17,7 +17,7 @@ CWARNFLAGS.clang+=3D	-Wno-unused-value -Wn
  LIBUVDIR=3D	${NETBSDSRCDIR}/external/mit/libuv
  LIBUVOBJDIR!=3D   cd ${LIBUVDIR}/lib && ${PRINTOBJDIR}
  LIBURCUDIR=3D	${NETBSDSRCDIR}/external/lgpl2/userspace-rcu
 -LIBURCUMEMBOBJDIR!=3D   cd ${LIBURCUDIR}/lib/liburcu-memb && ${PRINTOBJDI=
 R}
 +LIBURCUMBOBJDIR!=3D   cd ${LIBURCUDIR}/lib/liburcu-mb && ${PRINTOBJDIR}
  LIBURCUCDSOBJDIR!=3D   cd ${LIBURCUDIR}/lib/liburcu-cds && ${PRINTOBJDIR}
  LIBURCUCOMMONOBJDIR!=3D   cd ${LIBURCUDIR}/lib/liburcu-common && ${PRINTO=
 BJDIR}
  CPPFLAGS+=3D	-I${LIBUVDIR}/dist/include
 @@ -57,7 +57,7 @@ DBG=3D-g3 -gstabs
  .if defined(NAMED_DEBUG)
  LDADD+=3D		-lisccfg_g -ldns_g -lns_g
  LDADD+=3D		-lisccc_g -lisc_g
 -LDADD+=3D		-L${LIBURCUMEMBOBJDIR} -lurcu-memb_g
 +LDADD+=3D		-L${LIBURCUMBOBJDIR} -lurcu-mb_g
  LDADD+=3D		-L${LIBURCUCDSOBJDIR} -lurcu-cds_g
  LDADD+=3D		-L${LIBURCUCOMMONOBJDIR} -lurcu-common_g
  LDADD+=3D		-L${LIBUVOBJDIR} -luv_g
 @@ -66,7 +66,7 @@ LDADD+=3D		-lexecinfo_g -lelf_g -lkvm_g -l
  LDADD+=3D		-lisccfg -ldns -lns
  DPADD+=3D		${LIBISCCFG} ${LIBDNS} ${LIBNS}
  LDADD+=3D		-lisccc -lisc =
 
 -LDADD+=3D		-L${LIBURCUMEMBOBJDIR} -lurcu-memb
 +LDADD+=3D		-L${LIBURCUMBOBJDIR} -lurcu-mb
  LDADD+=3D		-L${LIBURCUCDSOBJDIR} -lurcu-cds
  LDADD+=3D		-L${LIBURCUCOMMONOBJDIR} -lurcu-common
  LDADD+=3D		-L${LIBUVOBJDIR} -luv
 Index: mpl/bind/bind2netbsd
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/mpl/bind/bind2netbsd,v
 retrieving revision 1.10
 diff -p -u -r1.10 bind2netbsd
 --- mpl/bind/bind2netbsd	21 May 2025 14:47:34 -0000	1.10
 +++ mpl/bind/bind2netbsd	5 Aug 2025 23:17:51 -0000
 @@ -43,7 +43,7 @@
  =
 
  # U=3D/usr/src/external/lgpl2/userspace-rcu
  # OBJ=3D/obj.amd64-x86_64
 -# env LIBURCU_CFLAGS=3D"-I$U/include -I$U/dist/include" LIBURCU_LIBS=3D"-=
 L$U/lib/liburcu-memb$OBJ -lurcu-memb -L$U/lib/liburcu-cds$OBJ -lurcu-cds -=
 L$U/lib/liburcu-common$OBJ -lurcu-common" ./configure --enable-querytrace =
 --enable-fixed-rrset
 +# env LIBURCU_CFLAGS=3D"-I$U/include -I$U/dist/include" LIBURCU_LIBS=3D"-=
 L$U/lib/liburcu-memb$OBJ -lurcu-mb -L$U/lib/liburcu-cds$OBJ -lurcu-cds -L$=
 U/lib/liburcu-common$OBJ -lurcu-common" ./configure --enable-querytrace --=
 enable-fixed-rrset --with-liburcu=3Dmb
  =
 
  #	$ run make
  #	- use the binclude4netbsd to create and import the new headers in
 Index: mpl/bind/include/config.h
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=
 =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D
 RCS file: /cvsroot/src/external/mpl/bind/include/config.h,v
 retrieving revision 1.23
 diff -p -u -r1.23 config.h
 --- mpl/bind/include/config.h	17 Jul 2025 19:01:47 -0000	1.23
 +++ mpl/bind/include/config.h	5 Aug 2025 23:17:52 -0000
 @@ -565,10 +565,10 @@
  #define RCU_FLAVOR "liburcu"
  =
 
  /* Build with mb Userspace-RCU flavor */
 -/* #undef RCU_MB */
 +#define RCU_MB 1
  =
 
  /* Build with membarrier Userspace-RCU flavor */
 -#define RCU_MEMBARRIER 1
 +/* #undef RCU_MEMBARRIER */
  =
 
  /* Build with QSBR Userspace-RCU flavor */
  /* #undef RCU_QSBR */
 


Home | Main Index | Thread Index | Old Index