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

Bug#262202: locale-related segfault with libstdc++.so.5



Is this still an issue?

Kim Saunders writes:
> Package: libstdc++5
> Version: 1:3.3.4-6
> 
> After having dist-upgraded to the version of libstdc++5 mentioned above
> this morning, all of my programs that dynamically link against
> /usr/lib/libstdc++.so.5 suffer from (seemingly locale-related) segfault.
> 
> Using groff as an example, I have included a gdb backtrace, strace, ldd,
> and my locale details.
> 
> This line seems concerning:
> 
> open("/usr/lib/locale/¿?/LC_IDENTIFICATION", O_RDONLY)
> 
> The directory preceeding LC_IDENTIFICATION contains different junk
> characters for different programs (e.g. nmap, galeon,
> gnome-settings-daemon, gedit, etc), suggesting to me that construction
> of that path string could be at fault.
> 
> kimsa@snaund:~$ gdb /usr/bin/groff
> GNU gdb 6.1-debian
> 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 "i386-linux"...(no debugging symbols
> found)...Using host libthread_db library "/lib/tls/libthread_db.so.1".
> 
> (gdb) run
> Starting program: /usr/bin/groff
> (no debugging symbols found)...(no debugging symbols found)...(no
> debugging symbols found)...(no debugging symbols found)...(no debugging
> symbols found)...(no debugging symbols found)...
> Program received signal SIGSEGV, Segmentation fault.
> 0x40073fb9 in std::locale::global () from /usr/lib/libstdc++.so.5
> (gdb) bt
> #0  0x40073fb9 in std::locale::global () from /usr/lib/libstdc++.so.5
> #1  0x4006ad8b in std::basic_ios<char, std::char_traits<char> >::init ()
>    from /usr/lib/libstdc++.so.5
> #2  0x4006c1e6 in std::ios_base::Init::_S_ios_create ()
>    from /usr/lib/libstdc++.so.5
> #3  0x4006c795 in std::ios_base::Init::Init () from
> /usr/lib/libstdc++.so.5
> #4  0x4006beb8 in std::basic_iostream<wchar_t, std::char_traits<wchar_t>
> >::~basic_iostream () from /usr/lib/libstdc++.so.5
> #5  0x4006bf2b in std::basic_iostream<wchar_t, std::char_traits<wchar_t>
> >::~basic_iostream () from /usr/lib/libstdc++.so.5
> #6  0x400bab45 in __cxa_dyn_string_eq () from /usr/lib/libstdc++.so.5
> #7  0x4005bb51 in ?? () from /usr/lib/libstdc++.so.5
> #8  0x400ff278 in ?? ()
> #9  0x40016e78 in _r_debug ()
> #10 0xbffffb04 in ?? ()
> #11 0x4000c0de in _dl_catch_error () from /lib/ld-linux.so.2
> Previous frame identical to this frame (corrupt stack?)
> (gdb) The program is running.  Exit anyway? (y or n) y
> kimsa@snaund:~$ strace groff
> execve("/usr/bin/groff", ["groff"], [/* 17 vars */]) = 0
> uname({sys="Linux", node="snaund", ...}) = 0
> brk(0)                                  = 0x805c000
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0x40017000
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.preload", O_RDONLY)    = -1 ENOENT (No such file or
> directory)
> open("/etc/ld.so.cache", O_RDONLY)      = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=40601, ...}) = 0
> old_mmap(NULL, 40601, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40018000
> close(3)                                = 0
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
> directory)
> open("/usr/lib/libstdc++.so.5", O_RDONLY) = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\200\301"...,
> 512) = 512fstat64(3, {st_mode=S_IFREG|0644, st_size=737848, ...}) = 0
> old_mmap(NULL, 761568, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0x40022000
> old_mmap(0x400c1000, 90112, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x9e000) = 0x400c1000
> old_mmap(0x400d7000, 20192, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x400d7000
> close(3)                                = 0
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
> directory)
> open("/lib/tls/libm.so.6", O_RDONLY)    = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\0006\0"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0644, st_size=141312, ...}) = 0
> old_mmap(NULL, 139712, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0x400dc000
> old_mmap(0x400fe000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x22000) = 0x400fe000
> close(3)                                = 0
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
> directory)
> open("/lib/libgcc_s.so.1", O_RDONLY)    = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\20\30\0"...,
> 512) = 512fstat64(3, {st_mode=S_IFREG|0644, st_size=33104, ...}) = 0
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0x400ff000
> old_mmap(NULL, 36116, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0x40100000
> old_mmap(0x40108000, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x7000) = 0x40108000
> close(3)                                = 0
> access("/etc/ld.so.nohwcap", F_OK)      = -1 ENOENT (No such file or
> directory)
> open("/lib/tls/libc.so.6", O_RDONLY)    = 3
> read(3, "\177ELF\1\1\1\0\0\0\0\0\0\0\0\0\3\0\3\0\1\0\0\0\340X\1"...,
> 512) = 512
> fstat64(3, {st_mode=S_IFREG|0644, st_size=1279044, ...}) = 0
> old_mmap(NULL, 1289356, PROT_READ|PROT_EXEC, MAP_PRIVATE, 3, 0) =
> 0x40109000
> old_mmap(0x40239000, 36864, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_FIXED,
> 3, 0x12f000) = 0x40239000
> old_mmap(0x40242000, 7308, PROT_READ|PROT_WRITE,
> MAP_PRIVATE|MAP_FIXED|MAP_ANONYMOUS, -1, 0) = 0x40242000
> close(3)                                = 0
> old_mmap(NULL, 4096, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS,
> -1, 0) = 0x40244000
> set_thread_area({entry_number:-1 -> 6, base_addr:0x40244080,
> limit:1048575, seg_32bit:1, contents:0, read_exec_only:0,
> limit_in_pages:1, seg_not_present:0, useable:1}) = 0
> munmap(0x40018000, 40601)               = 0
> open("/usr/lib/locale/locale-archive", O_RDONLY|O_LARGEFILE) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=1605152, ...}) = 0
> mmap2(NULL, 1605152, PROT_READ, MAP_PRIVATE, 3, 0) = 0x40245000
> close(3)                                = 0
> brk(0)                                  = 0x805c000
> brk(0x807d000)                          = 0x807d000
> open("/usr/share/locale/locale.alias", O_RDONLY) = 3
> fstat64(3, {st_mode=S_IFREG|0644, st_size=2539, ...}) = 0
> mmap2(NULL, 131072, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS, -1,
> 0) = 0x403cd000
> read(3, "# Locale name alias data base.\n#"..., 131072) = 2539
> read(3, "", 131072)                     = 0
> close(3)                                = 0
> munmap(0x403cd000, 131072)              = 0
> open("/usr/lib/locale/¿?/LC_IDENTIFICATION", O_RDONLY) = -1 ENOENT (No
> such file or directory)
> --- SIGSEGV (Segmentation fault) @ 0 (0) ---
> +++ killed by SIGSEGV +++
> kimsa@snaund:~$ ldd /usr/bin/groff
>                 libstdc++.so.5 => /usr/lib/libstdc++.so.5 (0x40022000)
>         libm.so.6 => /lib/tls/libm.so.6 (0x400dc000)
>         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x40100000)
>         libc.so.6 => /lib/tls/libc.so.6 (0x40109000)
>         /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
> kimsa@snaund:~$ locale
> LANG=POSIX
> LC_CTYPE="POSIX"
> LC_NUMERIC="POSIX"
> LC_TIME="POSIX"
> LC_COLLATE="POSIX"
> LC_MONETARY="POSIX"
> LC_MESSAGES="POSIX"
> LC_PAPER="POSIX"
> LC_NAME="POSIX"
> LC_ADDRESS="POSIX"
> LC_TELEPHONE="POSIX"
> LC_MEASUREMENT="POSIX"
> LC_IDENTIFICATION="POSIX"
> LC_ALL=
> 
> -- 
> Kim Saunders <kims@contrail.com.au>
> 



Reply to: