|
From: Alex B. <ker...@be...> - 2006-09-06 16:54:20
|
Hi, I'm trying to get to the bottom of a crash I'm seeing while valgrinding: ==15125== Invalid read of size 8 ==15125== at 0x3B731073FE: do_lookup_x (in /lib64/ld-2.3.4.so) ==15125== by 0x3B7310782D: _dl_lookup_symbol_x (in /lib64/ld-2.3.4.so) ==15125== by 0x3B7310A609: fixup (in /lib64/ld-2.3.4.so) ==15125== by 0x3B7310A4D1: _dl_runtime_resolve (in /lib64/ld-2.3.4.so) ==15125== by 0x70258ED7: moveFd(int, bool) ==15125== by 0x700CEFFA: Fuse::openDebugFile() ==15125== by 0x700CF1EB: Fuse::getDebugOutputFD() ==15125== by 0x700C5C40: ErrorReporter::reportError(SeverityLevel,ErrorType, char const*, ...) ==15125== by 0x702B08C4: getLock(unsigned*, ThreadContext*) Unfortunately this doesn't get hit outside of valgrind. I suspect that the act of valgrinding makes us hit a deadlock check in getLock which sends us down the reportError case. However I've been unable to attach gdb to investigate. I have to Ctrl-C valgrind at which point I get: ==15125== Invalid read of size 1 ==15125== at 0x40016C7: _vgnU_freeres (vg_preloaded.c:56) ==15125== Address 0xFFFFFFFFFFFFFFFC is not stack'd, malloc'd or (recently) free'd ==15125== ==15125== Process terminating with default action of signal 11 (SIGSEGV): dumping core ==15125== Access not within mapped region at address 0xFFFFFFFFFFFFFFFC ==15125== at 0x40016C7: _vgnU_freeres (vg_preloaded.c:56) And then wait a while as valgrind calculates all the memory which will obviously be lost due to the early exit. It would be useful to see the data that reportError is about spew. Unfortunately the vgcore left over makes even less sense: 17:49 alexjb@strada [~] >gdb $APP_PATH vgcore.15436 GNU gdb Core was generated by `'. Program terminated with signal 11, Segmentation fault. #0 0x00000000040016c7 in ?? () (gdb) info threads * 1 process 15436 0x00000000040016c7 in ?? () (gdb) frame 0 #0 0x00000000040016c7 in ?? () (gdb) bt #0 0x00000000040016c7 in ?? () #1 0x0000000000000000 in ?? () (gdb) So I think I have a bug in my code, unfortunately I'm not sure if its exposed a bug in valgrind as well. It seems odd that I'm seeing a bad read in the linker code. Any ideas? -- Alex, homepage: http://www.bennee.com/~alex/ Ask not for whom the tolls. |