|
From: Samofatov, N.
|
Hi, Dear Valgrind developers! I'm trying to perform some testing of Firebird database engine under Valgrind. This time I tried to verify single-process multi-threaded build. I ported Firebird to the subset of POSIX threads API supported by Valgrind 2.1.2, it was not difficult since Firebird is generally portable. I only had to disable some of Linux-specific optimizations. Multi-threaded firebird currently passes some basic testing, but if I try to switch doing something less trivial, for example, restore one of my test databases Valgrind crashes like that: ---------------------------------------------------- =3D=3D8435=3D=3D Memcheck, a memory error detector for x86-linux. =3D=3D8435=3D=3D Copyright (C) 2002-2004, and GNU GPL'd, by Julian = Seward et al. =3D=3D8435=3D=3D Using valgrind-2.1.2, a program supervision framework = for x86-linux. =3D=3D8435=3D=3D Copyright (C) 2000-2004, and GNU GPL'd, by Julian = Seward et al. =3D=3D8435=3D=3D For more details, rerun with: -v =3D=3D8435=3D=3D =3D=3D8435=3D=3D Warning: noted but unhandled ioctl 0x5422 with no size/direction hints =3D=3D8435=3D=3D This could cause spurious value errors to appear. =3D=3D8435=3D=3D See README_MISSING_SYSCALL_OR_IOCTL for guidance on = writing a proper wrapper. =3D=3D8435=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D8435=3D=3D (it doesn't check if the cond is waited on) =3D=3D8435=3D=3D your program may misbehave as a result =3D=3D8435=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D8435=3D=3D (it doesn't check if the cond is waited on) =3D=3D8435=3D=3D your program may misbehave as a result =3D=3D8435=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D8435=3D=3D (it doesn't check if the cond is waited on) =3D=3D8435=3D=3D your program may misbehave as a result --8435-- INTERNAL ERROR: Valgrind received a signal 11 (SIGSEGV) - exiting --8435-- si_code=3D1 Fault EIP: 0xB003905A; Faulting address: 0xBF7FFFFC valgrind: the `impossible' happened: Killed by fatal signal Basic block ctr is approximately 654850000 =3D=3D8435=3D=3D at 0xB002BE0A: vgPlain_core_panic (vg_mylibc.c:1188) =3D=3D8435=3D=3D by 0xB002BE09: panic (vg_mylibc.c:1184) =3D=3D8435=3D=3D by 0xB002BE1E: vgPlain_core_panic (vg_mylibc.c:1189) =3D=3D8435=3D=3D by 0xB0032295: vg_sync_signalhandler = (vg_signals.c:2225) =3D=3D8435=3D=3D by 0xB0045499: (within = /usr/local/lib/valgrind/stage2) sched status: Thread 1: status =3D Runnable, associated_mx =3D 0x0, associated_cv =3D = 0x0 =3D=3D8435=3D=3D at 0x52BFF042: ??? valgrind: vg_memory.c:508 (vgPlain_find_map_space): Assertion `(addr & ((1 << 12)-1)) =3D=3D 0' failed. =3D=3D8435=3D=3D at 0xB002BD98: vgPlain_skin_assert_fail = (vg_mylibc.c:1169) sched status: Thread 1: status =3D Runnable, associated_mx =3D 0x0, associated_cv =3D = 0x0 =3D=3D8435=3D=3D at 0x52BFF042: ??? ---------------------------------------------------- I'm probably doing something wrong, but I'm stuck here at the moment. Problem is reliably reproducable and test works fine when running not under Valgrind. Machine is vanilla Mandrake 10 installation, Valgrind 2.1.2 is built from source using stock compiler. Firebird is the checkout from CVS HEAD a few days old, I may prepare testcase bundle if there is an interest. Any suggestions? Nickolay Samofatov |