Re: bin/60472: ld.elf_so(1) changes cause a segmentation fault in dlopen(3)
"Taylor R Campbell via gnats" <[email protected]> Mon, 20 Jul 2026 19:10:02 +0000 (UTC)
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
The following reply was made to PR bin/60472; it has been noted by GNATS. From: Taylor R Campbell <[email protected]> To: [email protected] Cc: [email protected], [email protected], [email protected] Subject: Re: bin/60472: ld.elf_so(1) changes cause a segmentation fault in dlopen(3) Date: Mon, 20 Jul 2026 19:05:31 +0000 > Date: Mon, 20 Jul 2026 18:45:18 +0000 (UTC) > From: [email protected] >=20 > Can you please provide the stack trace from the core dump? In particular, is it the same (for the part inside ld.elf_so) as this stack trace that ryoon@ posted? Core was generated by `firefox-bin'. Program terminated with signal SIGSEGV, Segmentation fault. #0 0x00007f7ff7ac580a in _rtld_load_library ( name=3Dname@entry=3D0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", refobj=3Drefobj@entry=3D0x74cccaeb3000, flags=3Dflags@entry=3D9, mask=3Dmask@entry=3D0x7f7fff6e38b0) at /usr/src/libexec/ld.elf_so/searc= h.c:197 197 assert(obj->refcount > 0); [Current thread is 1 (process 3675)] (gdb) bt #0 0x00007f7ff7ac580a in _rtld_load_library ( name=3Dname@entry=3D0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", refobj=3Drefobj@entry=3D0x74cccaeb3000, flags=3Dflags@entry=3D9, mask=3Dmask@entry=3D0x7f7fff6e38b0) at /usr/src/libexec/ld.elf_so/searc= h.c:197 #1 0x00007f7ff7ac2c4e in dlopen ( name=3D0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", mode=3D258) at /usr/src/libexec/ld.elf_so/rtld.c:1696 #2 0x000074ccb9d75b35 in loader_open_driver_lib () from /usr/pkg/lib/libGL= .so If so, it should be fixed by this commit: https://mail-index.netbsd.org/source-changes/2026/07/20/msg163255.html As a workaround, you can also comment out the line src/libexec/ld.elf_so:CPPFLAGS+=3D -DDEBUG I enabled it in current the other day so we would shake out all the bitrot in ld.elf_so assertions over the years to make them useful again as a diagnostic measure, especially for chasing hard-to-find race conditions like PR lib/59751: dlclose is not MT-safe depending on the libraries unloaded <https://gnats.NetBSD.org/59751>.