Re: bin/60472: ld.elf_so(1) changes cause a segmentation fault in dlopen(3)
Taylor R Campbell <[email protected]> Mon, 20 Jul 2026 19:05:31 +0000
| Newsgroups | gmane.os.netbsd.bugs |
|---|---|
| Message-ID | <[email protected]> |
> Date: Mon, 20 Jul 2026 18:45:18 +0000 (UTC) > From: [email protected] > > 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=name@entry=0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", refobj=refobj@entry=0x74cccaeb3000, flags=flags@entry=9, mask=mask@entry=0x7f7fff6e38b0) at /usr/src/libexec/ld.elf_so/search.c:197 197 assert(obj->refcount > 0); [Current thread is 1 (process 3675)] (gdb) bt #0 0x00007f7ff7ac580a in _rtld_load_library ( name=name@entry=0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", refobj=refobj@entry=0x74cccaeb3000, flags=flags@entry=9, mask=mask@entry=0x7f7fff6e38b0) at /usr/src/libexec/ld.elf_so/search.c:197 #1 0x00007f7ff7ac2c4e in dlopen ( name=0x7f7fff6e3940 "/usr/pkg/lib/dri/tls/swrast_dri.so", mode=258) 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+= -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>.