Segmentation fault on startup #938

Open
opened 2026-10-05 04:54:09 +02:00 by adam · 1 comment
Owner
[Invictus root]~ # gdb /opt/local/bin/znc
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd"...
(gdb) run -c
Starting program: /opt/local/bin/znc -c
[New LWP 101445]
[New Thread 29db708e000 (LWP 101445/znc)]

Program received signal SIGSEGV, Segmentation fault.
[Switching to Thread 29db708e000 (LWP 101445/znc)]
0x0000029db70339e8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
Current language:  auto; currently minimal
(gdb) bt f
#0  0x0000029db70339e8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1
No symbol table info available.
#1  0x0000029db67d4ec9 in __dynamic_cast () from /usr/local/lib/gcc6/libstdc++.so.6
No symbol table info available.
#2  0x0000029db68584d0 in std::has_facet<std::ctype<char> > () from /usr/local/lib/gcc6/libstdc++.so.6
No symbol table info available.
#3  0x0000029db684bdd4 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale () from /usr/local/lib/gcc6/libstdc++.so.6
No symbol table info available.
#4  0x0000029db684bf50 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/local/lib/gcc6/libstdc++.so.6
No symbol table info available.
#5  0x0000029db67e9561 in std::ios_base::Init::Init () from /usr/local/lib/gcc6/libstdc++.so.6
No symbol table info available.
#6  0x0000000000000001 in ?? ()
No symbol table info available.
#7  0x0000000000466fe0 in main ()
No symbol table info available.
``` [Invictus root]~ # gdb /opt/local/bin/znc GNU gdb 6.1.1 [FreeBSD] Copyright 2004 Free Software Foundation, Inc. GDB is free software, covered by the GNU General Public License, and you are welcome to change it and/or distribute copies of it under certain conditions. Type "show copying" to see the conditions. There is absolutely no warranty for GDB. Type "show warranty" for details. This GDB was configured as "amd64-marcel-freebsd"... (gdb) run -c Starting program: /opt/local/bin/znc -c [New LWP 101445] [New Thread 29db708e000 (LWP 101445/znc)] Program received signal SIGSEGV, Segmentation fault. [Switching to Thread 29db708e000 (LWP 101445/znc)] 0x0000029db70339e8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1 Current language: auto; currently minimal (gdb) bt f #0 0x0000029db70339e8 in vtable for __cxxabiv1::__si_class_type_info () from /lib/libcxxrt.so.1 No symbol table info available. #1 0x0000029db67d4ec9 in __dynamic_cast () from /usr/local/lib/gcc6/libstdc++.so.6 No symbol table info available. #2 0x0000029db68584d0 in std::has_facet<std::ctype<char> > () from /usr/local/lib/gcc6/libstdc++.so.6 No symbol table info available. #3 0x0000029db684bdd4 in std::basic_ios<char, std::char_traits<char> >::_M_cache_locale () from /usr/local/lib/gcc6/libstdc++.so.6 No symbol table info available. #4 0x0000029db684bf50 in std::basic_ios<char, std::char_traits<char> >::init () from /usr/local/lib/gcc6/libstdc++.so.6 No symbol table info available. #5 0x0000029db67e9561 in std::ios_base::Init::Init () from /usr/local/lib/gcc6/libstdc++.so.6 No symbol table info available. #6 0x0000000000000001 in ?? () No symbol table info available. #7 0x0000000000466fe0 in main () No symbol table info available. ``` <!-- github-sync-id:585408418 -->
Author
Owner

If I understand https://wiki.freebsd.org/NewC++Stack correctly, libcxxrt is supposed to replace libstdc++. That page is from 2013, so apparently this is not new....
Anyway, that backtrace looks like something is mixing the two libraries in an incompatible way. And apparently it is something were early, because the crash happens in std::ios_base::Init::Init, which does sound "early"...

Edit: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236344 sounds related (same backtrace), but does not really provide more info.

If I understand https://wiki.freebsd.org/NewC++Stack correctly, `libcxxrt` is supposed to replace `libstdc++`. That page is from 2013, so apparently this is not new.... Anyway, that backtrace looks like something is mixing the two libraries in an incompatible way. And apparently it is something were early, because the crash happens in `std::ios_base::Init::Init`, which does sound "early"... Edit: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=236344 sounds related (same backtrace), but does not really provide more info. <!-- github-comment-id:602006519 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/znc#938