|
From: Denis P. <dy...@pe...> - 2003-07-23 13:19:50
|
Hello, I have strange errors in backtrace family functions. The trace attached is with backtrace.c and backtracesyms.c from glibc-2.3.2 compiled with debug and directly linked to see line number. Interesting thing is that I can not reproduce this on the test case. It happens only in big program. Any ideas why this could happend? ==4649== Memcheck, a.k.a. Valgrind, a memory error detector for x86-linux. ==4649== Copyright (C) 2002-2003, and GNU GPL'd, by Julian Seward. ==4649== Using valgrind-20030716, a program supervision framework for x86-linux. ==4649== Copyright (C) 2000-2003, and GNU GPL'd, by Julian Seward. ==4649== Estimated CPU clock rate is 1664 MHz ==4649== For more details, rerun with: -v ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x8167EC5: backtrace (backtrace.c:59) ==4649== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x8167ED0: backtrace (backtrace.c:59) ==4649== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Use of uninitialised value of size 4 ==4649== at 0x8167EE2: backtrace (backtrace.c:65) ==4649== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Use of uninitialised value of size 4 ==4649== at 0x8167EF0: backtrace (backtrace.c:67) ==4649== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x40D11EDD: _IO_vfprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D2DCBB: _IO_vsprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D1AC3A: __GI_sprintf (in /lib/libc.so.6) ==4649== by 0x8168263: backtrace_symbols (backtracesyms.c:91) ==4649== by 0x815F6ED: getBackTrace(IString&) (iexcept.cpp:82) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Use of uninitialised value of size 4 ==4649== at 0x40D14A9C: _itoa_word (in /lib/libc.so.6) ==4649== by 0x40D12FE8: _IO_vfprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D2DCBB: _IO_vsprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D1AC3A: __GI_sprintf (in /lib/libc.so.6) ==4649== by 0x8168263: backtrace_symbols (backtracesyms.c:91) ==4649== by 0x815F6ED: getBackTrace(IString&) (iexcept.cpp:82) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x40D11A11: _IO_vfprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D2DCBB: _IO_vsprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D1AC3A: __GI_sprintf (in /lib/libc.so.6) ==4649== by 0x8168263: backtrace_symbols (backtracesyms.c:91) ==4649== by 0x815F6ED: getBackTrace(IString&) (iexcept.cpp:82) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x40D11A76: _IO_vfprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D2DCBB: _IO_vsprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D1AC3A: __GI_sprintf (in /lib/libc.so.6) ==4649== by 0x8168263: backtrace_symbols (backtracesyms.c:91) ==4649== by 0x815F6ED: getBackTrace(IString&) (iexcept.cpp:82) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==4649== ==4649== Thread 3: ==4649== Conditional jump or move depends on uninitialised value(s) ==4649== at 0x40D11AEC: _IO_vfprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D2DCBB: _IO_vsprintf_internal (in /lib/libc.so.6) ==4649== by 0x40D1AC3A: __GI_sprintf (in /lib/libc.so.6) ==4649== by 0x8168263: backtrace_symbols (backtracesyms.c:91) ==4649== by 0x815F6ED: getBackTrace(IString&) (iexcept.cpp:82) ==4649== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==4649== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==4649== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==4649== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==4649== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==4649== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==4649== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==4649== by 0x8152A91: ithread_run (ithread.cpp:519) ==4649== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==4649== by 0x40172D5E: do__quit (vg_scheduler.c:2159) -- Denis |
|
From: Jeremy F. <je...@go...> - 2003-07-23 17:13:02
|
On Wed, 2003-07-23 at 06:19, Denis Perchine wrote: > I have strange errors in backtrace family functions. > The trace attached is with backtrace.c and backtracesyms.c from glibc-2.3.2 > compiled with debug and directly linked to see line number. > > Interesting thing is that I can not reproduce this on the test case. It happens only > in big program. Any ideas why this could happend? I don't know about this implementation of backtrace(), but such functions often rummage around in places a portable correct program never would. That doesn't mean there's necessarily a problem in this code, but it's worth inspecting (and adding Valgrind macros to clarify anything correct-but-odd to V itself). I'm guessing here, but it may only show up on large code because of the depth of its stack use. J |
|
From: Denis P. <dy...@pe...> - 2003-07-24 05:06:04
|
Hello, > > I have strange errors in backtrace family functions. > > The trace attached is with backtrace.c and backtracesyms.c from > > glibc-2.3.2 compiled with debug and directly linked to see line number. > > > > Interesting thing is that I can not reproduce this on the test case. It > > happens only in big program. Any ideas why this could happend? > > I don't know about this implementation of backtrace(), but such > functions often rummage around in places a portable correct program > never would. That doesn't mean there's necessarily a problem in this > code, but it's worth inspecting (and adding Valgrind macros to clarify > anything correct-but-odd to V itself). > > I'm guessing here, but it may only show up on large code because of the > depth of its stack use. It looks like this. Here it is debug output. It walks the stack until it is in [esp;__libc_stack_end] boundaries. And here is the strange part. 1. Addresses in backtrace different by one with valgrind trace. 2. valgrind starts to issue errors just after backtrace walked over the stack shown by valgrind. Might be this could be fixed by fixing a value of __libc_stack_end by valgrind? On the other side. Traces are working without any problems in other threads. This is a problem in this exact thread. Might this be a sign of stack corruption? esp = 0x43240a1c ebp = 0x43240a28 __libc_stack_end = 0xbffff17c current = 0x43240a28 cnt = 0 current->return_address = 0x815f6c2 current = 0x43241a58 cnt = 1 current->return_address = 0x815f826 current = 0x43241a78 cnt = 2 current->return_address = 0x815a4bc current = 0x43241ba8 cnt = 3 current->return_address = 0x8157420 current = 0x43241cf8 cnt = 4 current->return_address = 0x815a434 current = 0x43241d18 cnt = 5 current->return_address = 0x8158d8a current = 0x43241e88 cnt = 6 current->return_address = 0x8158729 current = 0x43241ed8 cnt = 7 current->return_address = 0x804e54a current = 0x43241f78 cnt = 8 current->return_address = 0x8152a92 current = 0x43241f98 cnt = 9 current->return_address = 0x40ba958c current = 0x43241fd4 cnt = 10 current->return_address = 0x40172d5f current = 0xbffff088 cnt = 11 ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x40D11EDD: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D148BD: buffered_vfprintf (in /lib/libc.so.6) ==15268== by 0x40D106F0: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D1AB7E: __GI_fprintf (in /lib/libc.so.6) ==15268== by 0x8167F69: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Use of uninitialised value of size 4 ==15268== at 0x40D14A9C: _itoa_word (in /lib/libc.so.6) ==15268== by 0x40D12FE8: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D148BD: buffered_vfprintf (in /lib/libc.so.6) ==15268== by 0x40D106F0: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D1AB7E: __GI_fprintf (in /lib/libc.so.6) ==15268== by 0x8167F69: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x40D11A11: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D148BD: buffered_vfprintf (in /lib/libc.so.6) ==15268== by 0x40D106F0: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D1AB7E: __GI_fprintf (in /lib/libc.so.6) ==15268== by 0x8167F69: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x40D11A76: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D148BD: buffered_vfprintf (in /lib/libc.so.6) ==15268== by 0x40D106F0: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D1AB7E: __GI_fprintf (in /lib/libc.so.6) ==15268== by 0x8167F69: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x40D11AEC: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D148BD: buffered_vfprintf (in /lib/libc.so.6) ==15268== by 0x40D106F0: _IO_vfprintf_internal (in /lib/libc.so.6) ==15268== by 0x40D1AB7E: __GI_fprintf (in /lib/libc.so.6) ==15268== by 0x8167F69: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) current->return_address = 0x1153055 current = 0xbffff0d8 cnt = 12 ==15268== ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x8167F44: backtrace (backtrace.c:66) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Conditional jump or move depends on uninitialised value(s) ==15268== at 0x8167F4F: backtrace (backtrace.c:66) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Use of uninitialised value of size 4 ==15268== at 0x8167F57: backtrace (backtrace.c:72) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) current->return_address = 0x10 ==15268== ==15268== Thread 3: ==15268== Use of uninitialised value of size 4 ==15268== at 0x8167F7D: backtrace (backtrace.c:73) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) ==15268== ==15268== Thread 3: ==15268== Use of uninitialised value of size 4 ==15268== at 0x8167F8B: backtrace (backtrace.c:75) ==15268== by 0x815F6C1: getBackTrace(IString&) (iexcept.cpp:79) ==15268== by 0x815F825: IException::IException(IString const&) (iexcept.cpp:103) ==15268== by 0x815A4BB: IIOException::IIOException(IString const&, IString const&) (iiostream.cpp:33) ==15268== by 0x815741F: ISocketException::ISocketException(IString const&, int) (isocketexception.cpp:31) ==15268== by 0x815A433: ITimeOutException::ITimeOutException(IString const&) (../ilib/isocketexception.h:33) ==15268== by 0x8158D89: IPlainSocketImpl::accept(ISocketImpl*) (iplainsocket.cpp:288) ==15268== by 0x8158728: IServerSocket::accept() (isocket.cpp:145) ==15268== by 0x804E549: console::ConsoleDaemon::run() (consoleDaemon.cpp:61) ==15268== by 0x8152A91: ithread_run (ithread.cpp:519) ==15268== by 0x40BA958B: thread_wrapper (vg_libpthread.c:667) ==15268== by 0x40172D5E: do__quit (vg_scheduler.c:2159) current = 0x4 cnt = 13 |
|
From: Josef W. <Jos...@gm...> - 2003-07-24 07:54:44
|
On Thursday 24 July 2003 07:05, Denis Perchine wrote: > Hello, > > > > I have strange errors in backtrace family functions. > > > The trace attached is with backtrace.c and backtracesyms.c from > > > glibc-2.3.2 compiled with debug and directly linked to see line number. > > > > > > Interesting thing is that I can not reproduce this on the test case. It > > > happens only in big program. Any ideas why this could happend? > > > > I don't know about this implementation of backtrace(), but such > > functions often rummage around in places a portable correct program > > never would. That doesn't mean there's necessarily a problem in this > > code, but it's worth inspecting (and adding Valgrind macros to clarify > > anything correct-but-odd to V itself). > > > > I'm guessing here, but it may only show up on large code because of the > > depth of its stack use. > > It looks like this. Here it is debug output. It walks the stack until it is > in [esp;__libc_stack_end] boundaries. And here is the strange part. > 1. Addresses in backtrace different by one with valgrind trace. > 2. valgrind starts to issue errors just after backtrace walked over > the stack shown by valgrind. Might be this could be fixed by fixing a value > of __libc_stack_end by valgrind? Hi, I don't know about the rest, but a stack-trace going deeper than the stack shown by valgrind simply means memory access to addresses V can't check because it memory was written to before V switched to its simulated CPU. Josef |
|
From: Dirk M. <dm...@gm...> - 2003-07-24 12:24:13
|
On Don, 24 Jul 2003, Josef Weidendorfer wrote: > shown by valgrind simply means memory access to addresses V can't check > because it memory was written to before V switched to its simulated CPU. ... which would mean that on the given platform/environment the application has found a way to escape the valgrind simulated CPU, which must not happen. So it would be very interesting to see a testcase of this problem. -- Dirk |
|
From: Denis P. <dy...@pe...> - 2003-07-24 12:39:45
|
On Thursday 24 July 2003 19:24, Dirk Mueller wrote: > On Don, 24 Jul 2003, Josef Weidendorfer wrote: > > shown by valgrind simply means memory access to addresses V can't check > > because it memory was written to before V switched to its simulated CPU. > > ... which would mean that on the given platform/environment the application > has found a way to escape the valgrind simulated CPU, which must not > happen. > > So it would be very interesting to see a testcase of this problem. This is SuSE 8.2 with all updates. I can not simply reproduce this in test case. And I can not give away sources. But I can do whatever you will tell me to do to find the problem. You can contact me offlist if you are interested in this, and do not want to bother others with details. -- Denis |