|
From: John R. <jr...@bi...> - 2011-07-11 03:27:42
|
On 07/07/2011 01:53 PM, Naveen Kumar wrote: >>Run "strace valgrind" and look near the end of the output >>to see if some system call (that valgrind expects the OS to have) >>is not implemented. File a bug report; see: >> http://valgrind.org/support/bug_reports.html > John I did some digging and it looks like it is aborting in memcheck > > (gdb) bt > #0 0x38028448 in vgPlain_exit () at m_libcassert.c:157 > #1 0x3802a853 in vgPlain_err_missing_prog () at m_libcprint.c:584 > #2 0x3806082a in vgPlain_ii_create_image () at m_initimg/initimg-linux.c:860 > #3 0x380309cb in valgrind_main (argc=1, argv=0xbffff904, envp=0xbffff90c) at m_main.c:1747 > #4 0x380314f5 in _start_in_C_linux (pArgc=0xbffff900) at m_main.c:2839 > > It looks like the syscall __NR_exit_group is not working so the code is falling through. I changed it to __NR_exit and now valgrind is atleast able to exit properly without any segmentation fault. Here you should construct a small actual source file which illustrates that __NR_exit_group does not work correctly under valgrind on your platform, then file a bug against valgrind, following the directions at: http://valgrind.org/support/bug_reports.html The C run-time library and the operating system itself also are acting unfriendly. The OS should implement the concept of __NR_exit_group. If the OS does not, then the C run-time library should emulate it (if nothing else, by aliasing exit_group() to exit().) Consider asking your OS and C run-time library for such implementations. > Now when I do valgrind ls I get the following error > > -18797-- WARNING: Serious error when reading debug info > --18797-- When reading debug info from /lib/ld-2.2.4.so: > --18797-- Can't make sense of .sbss section mapping > --18797-- WARNING: Serious error when reading debug info > --18797-- When reading debug info from /bin/ls: > --18797-- Can't make sense of .sbss section mapping > valgrind: m_scheduler/sema.c:96 (vgModuleLocal_sema_down): Assertion 'sema->owner_lwpid != lwpid' failed. This, too, is a bug in valgrind. Please file a bug report, and for this problem attach the output from: objdump --dwarf /lib/ld-2.2.4.so If the debuginfo is in a separate file other than /lib/ld-2.2.4.so, then run objdump on _that_ file, too. Inspect the output from: strace -o strace.out -e trace=file valgrind <args_to_valgrind> \ ./my_app <args_to_my_app> to see which other file would be appropriate. It might be something like: /usr/lib/debug/lib/ld-2.2.4.so.debug -- |