Go to:
Gentoo Home
Documentation
Forums
Lists
Bugs
Planet
Store
Wiki
Get Gentoo!
Gentoo's Bugzilla – Attachment 54086 Details for
Bug 85555
Emerging glibc-2.3.4.20041102-r1 makes system unusable
Home
|
New
–
[Ex]
|
Browse
|
Search
|
Privacy Policy
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
[x]
|
Forgot Password
Login:
[x]
Debugging with ltrace and gdb
debug.txt (text/plain), 5.64 KB, created by
Lars T. Mikkelsen
on 2005-03-21 12:23:08 UTC
(
hide
)
Description:
Debugging with ltrace and gdb
Filename:
MIME Type:
Creator:
Lars T. Mikkelsen
Created:
2005-03-21 12:23:08 UTC
Size:
5.64 KB
patch
obsolete
>If LANG or LC_* are set, programs seg fault inside setlocale(). > >$ set | grep 'LANG\|LC_' >LANG=en_DK.UTF-8 >LC_CTYPE=da_DK.UTF-8 >$ ltrace /bin/date >__libc_start_main(0x8049480, 1, 0xbffff744, 0x804e8b0, 0x804e900 <unfinished ...> >getenv("_POSIX2_VERSION") = NULL >getenv("POSIXLY_CORRECT") = NULL >setlocale(6, "" <unfinished ...> >--- SIGSEGV (Segmentation fault) --- >+++ killed by SIGSEGV +++ > > >According to GDB the program seg faults in _nl_normalize_codeset (), however, >I'm not able to get a stack trace. > >$ gdb /bin/date >GNU gdb 6.3 >[snip] >(gdb) run >Starting program: /bin/date >[Thread debugging using libthread_db enabled] >[New Thread 16384 (LWP 26977)] > >Program received signal SIGSEGV, Segmentation fault. >[Switching to Thread 16384 (LWP 26977)] >0xb7ec71e5 in _nl_normalize_codeset () from /lib/libc.so.6 >(gdb) bt >#0 0xb7ec71e5 in _nl_normalize_codeset () from /lib/libc.so.6 >(gdb) > > >If I break at _nl_normalize_codeset() I'm able to get the stack trace, it does, >however, look quite strange and GDB talks about a corrupt stack (why is that?). >If the program is stepped further, it will eventually seg fault. > >$ gdb /bin/date >GNU gdb 6.3 >[snip] >(gdb) break _nl_normalize_codeset >Function "_nl_normalize_codeset" not defined. >Make breakpoint pending on future shared library load? (y or [n]) y >Breakpoint 1 (_nl_normalize_codeset) pending. >(gdb) run >Starting program: /bin/date >[Thread debugging using libthread_db enabled] >[New Thread 16384 (LWP 26996)] >Breakpoint 2 at 0xb7ec71a0 >Pending breakpoint "_nl_normalize_codeset" resolved >[Switching to Thread 16384 (LWP 26996)] > >Breakpoint 2, 0xb7ec71a0 in _nl_normalize_codeset () from /lib/libc.so.6 >(gdb) bt >#0 0xb7ec71a0 in _nl_normalize_codeset () from /lib/libc.so.6 >#1 0xb7ec1630 in _nl_load_locale_from_archive () from /lib/libc.so.6 >#2 0xb7ec03ab in _nl_find_locale () from /lib/libc.so.6 >#3 0xb7ebff44 in setlocale () from /lib/libc.so.6 >#4 0x08049508 in ?? () >#5 0x00000006 in ?? () >#6 0x0804ea4d in _IO_stdin_used () >#7 0xbffff7c0 in ?? () >#8 0xbffff7c0 in ?? () >#9 0x00000002 in ?? () >#10 0xb7fd05c8 in ?? () >#11 0x00000001 in ?? () >#12 0x00000000 in ?? () >#13 0x00000001 in ?? () >#14 0xb8001628 in ?? () >#15 0x00000000 in ?? () >#16 0x00000000 in ?? () >#17 0xbffff678 in ?? () >#18 0x00000000 in ?? () >#19 0x00000000 in ?? () >#20 0x00000000 in ?? () >#21 0x00000000 in ?? () >#22 0x00000000 in ?? () >#23 0x00000000 in ?? () >#24 0x00000000 in ?? () >#25 0xb7e5787c in __pthread_alt_unlock () from /lib/libpthread.so.0 >#26 0xb7e5fc60 in __linuxthreads_initial_report_events () from /lib/libpthread.so.0 >#27 0xb7e5fc68 in __pthread_multiple_threads () from /lib/libpthread.so.0 >#28 0x00000000 in ?? () >#29 0x00000000 in ?? () >#30 0x00000000 in ?? () >#31 0xb7eaae00 in ?? () from /lib/libc.so.6 >#32 0xb7fd0000 in ?? () >#33 0x00000000 in ?? () >#34 0x00000000 in ?? () >#35 0x00000000 in ?? () >#36 0x00000000 in ?? () >#37 0xb7e5cff4 in ?? () from /lib/libpthread.so.0 >#38 0xb7fcd540 in last_environ () from /lib/libc.so.6 >#39 0x00000002 in ?? () >#40 0xbffff734 in ?? () >#41 0xb7e54404 in pthread_mutex_unlock () from /lib/libpthread.so.0 >Previous frame inner to this frame (corrupt stack?) >(gdb) step >Single stepping until exit from function _nl_normalize_codeset, >which has no line number information. >0xb7e56b10 in __pthread_internal_tsd_address () from /lib/libpthread.so.0 >(gdb) step >Single stepping until exit from function __pthread_internal_tsd_address, >which has no line number information. >0xb7ec736c in _nl_normalize_codeset () from /lib/libc.so.6 >(gdb) step >Single stepping until exit from function _nl_normalize_codeset, >which has no line number information. > >Program received signal SIGSEGV, Segmentation fault. >0xb7ec71e5 in _nl_normalize_codeset () from /lib/libc.so.6 >(gdb) > > >-------------------------------------------------------------------------------- > > >If LANG or LC_* are not set, programs seg fault inside bindtextdomain(). > >$ unset LANG LC_CTYPE >$ set | grep 'LANG\|LC_' >$ ltrace /bin/date >__libc_start_main(0x8049480, 1, 0xbffff774, 0x804e8b0, 0x804e900 <unfinished ...> >getenv("_POSIX2_VERSION") = NULL >getenv("POSIXLY_CORRECT") = NULL >setlocale(6, "") = "C" >bindtextdomain("coreutils", "/usr/share/locale" <unfinished ...> >--- SIGSEGV (Segmentation fault) --- >+++ killed by SIGSEGV +++ > > >Like above, GDB only shows the top stack frame on seg fault. > >$ gdb /bin/date >GNU gdb 6.3 >[snip] >(gdb) run >Starting program: /bin/date >[Thread debugging using libthread_db enabled] >[New Thread 16384 (LWP 27035)] > >Program received signal SIGSEGV, Segmentation fault. >[Switching to Thread 16384 (LWP 27035)] >0xb7e56a64 in __pthread_internal_tsd_set () from /lib/libpthread.so.0 >(gdb) bt >#0 0xb7e56a64 in __pthread_internal_tsd_set () from /lib/libpthread.so.0 >(gdb) > > >However, unlike above, I'm not able to get a stack trace by breaking at >__pthread_internal_tsd_set(). GDB seg faults! :-) > >$ gdb /bin/date >GNU gdb 6.3 >[snip] >(gdb) break __pthread_internal_tsd_set >Function "__pthread_internal_tsd_set" not defined. >Make breakpoint pending on future shared library load? (y or [n]) y >Breakpoint 1 (__pthread_internal_tsd_set) pending. >(gdb) run >Starting program: /bin/date >[Thread debugging using libthread_db enabled] >[New Thread 16384 (LWP 27041)] >Breakpoint 2 at 0xb7e569c0 >Pending breakpoint "__pthread_internal_tsd_set" resolved >[Switching to Thread 16384 (LWP 27041)] > >Breakpoint 2, 0xb7e569c0 in __pthread_internal_tsd_set () from /lib/libpthread.so.0 >(gdb) step >Single stepping until exit from function __pthread_internal_tsd_set, >which has no line number information. >0xb7ec29f2 in uselocale () from /lib/libc.so.6 >[snip] >(gdb) step >Single stepping until exit from function _init, >which has no line number information. >Segmentation fault >$ >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 85555
:
53647
|
53685
|
53720
|
53721
|
53741
| 54086 |
54132
|
54487
|
54491