|
From: Dhirendra P. S. <dp...@ka...> - 2003-11-06 16:08:36
|
Hi All,
I am new to this valgrind. I am trying to valgrind my code. Its a pretty
decent size code with lot of multithreading. Now when I start valgrind
using the following command...
valgrind --num-callers=20 --alignment=8 --leak-check=yes
--leak-resolution=med --error-limit=no --show-reachable=yes
/usr/sbin/myprog
It shows me some error messages in the beginig, and then goes to sleep.
By sleep I mean that the process dosent dies but dosent do anything
either... It shows 0.0 percent cpu usage, and does not respond to key
stroke.
The last lines I can see on the screen are
==13919== Thread 2:
==13919== Conditional jump or move depends on uninitialised value(s)
==13919== at 0x804DBC1: TcpConnLis::ThreadProc() (tcplist.cxx:251)
==13919== by 0x804F960: ListenerThreadProc(void*) (tcplist.cxx:1088)
==13919== by 0x40A2BD8A: __thread_startup__(void*)
(../../osdep/posix/posix_thread.cxx:378)
==13919== by 0x411B0572: thread_wrapper (vg_libpthread.c:667)
==13919== by 0x4016C16B: do__quit (vg_scheduler.c:2146)
TcpConnLis::TcpConnLis() error: no TCP fixed port config
ListenerThreadProc() end, arg 1152967432
==13919== valgrind's libpthread.so: KLUDGED call to: sem_destroy
==13919== valgrind's libpthread.so: IGNORED call to:
pthread_attr_setinheritsched
==13919== valgrind's libpthread.so: IGNORED call to: pthread_setschedparam
As you would have assumed that myprog uses extensive posix thread and tpcip.
Now I tried to attach gdb/totalview to it this myprog while valgrinding.
And it shows the myprog is stuck at line 2154 of vg_scheduler.c ..
the code is as follows...
***********************
/* Should never be entered. If it is, will be on the simulated
CPU. */
static
void do__apply_in_new_thread_bogusRA ( void )
{
VG_(core_panic)("do__apply_in_new_thread_bogusRA");
}
******************************************
Following is the stack trace in total view..
vgPlain_do_syscall, FP=46d0bde4
recvmsg, FP=46d0be18
pollForFdXfers, FP=46d0bec8
_Z18__thread_startup__Pv, FP=46d0bf98
thread_wrapper, FP=46d0bfd4
do__quit, FP=46d0bfd4
PC: bfffe648, FP=bfffe648
...eRjPFiPvES0_16ThreadAttributesj, FP=bfffe6b8
main, FP=bfffe918
__libc_start_main, FP=bfffe948
Anyhelp would be very much appreciated as I want to get out of this ASAP
and continue valgrinding...
Thanks in advance
Dp
|
|
From: Dimitri Papadopoulos-O. <pap...@sh...> - 2003-11-07 07:04:38
|
Hi, > I am new to this valgrind. I am trying to valgrind my code. Its a pretty > decent size code with lot of multithreading. Now when I start valgrind > using the following command... Did you have a look at Q10 of the FAQ? http://developer.kde.org/~sewardj/docs-20031012/FAQ.txt Maybe it applies to you, depending on the version of valgrind and your operating system. -- Dimitri |
|
From: Dhirendra P. S. <dp...@ka...> - 2003-11-07 16:44:50
|
I dont think thats the case because my program does not dies with a segmentation fault....? the process still keeps running as i can see it using ps -eaf. Any body with any other idea ? Dimitri Papadopoulos-Orfanos wrote: > Hi, > >> I am new to this valgrind. I am trying to valgrind my code. Its a >> pretty decent size code with lot of multithreading. Now when I start >> valgrind using the following command... > > > Did you have a look at Q10 of the FAQ? > http://developer.kde.org/~sewardj/docs-20031012/FAQ.txt > > Maybe it applies to you, depending on the version of valgrind and your > operating system. > > -- > Dimitri |
|
From: Jeremy F. <je...@go...> - 2003-11-07 17:18:15
|
On Thu, 2003-11-06 at 08:08, Dhirendra Pal Singh wrote: > Hi All, > I am new to this valgrind. I am trying to valgrind my code. Its a pretty > decent size code with lot of multithreading. Now when I start valgrind > using the following command... > > valgrind --num-callers=20 --alignment=8 --leak-check=yes > --leak-resolution=med --error-limit=no --show-reachable=yes > /usr/sbin/myprog > > It shows me some error messages in the beginig, and then goes to sleep. > By sleep I mean that the process dosent dies but dosent do anything > either... It shows 0.0 percent cpu usage, and does not respond to key > stroke. > [...] > Now I tried to attach gdb/totalview to it this myprog while valgrinding. > And it shows the myprog is stuck at line 2154 of vg_scheduler.c .. > the code is as follows... It's probably blocked in a syscall. What does strace -p <pid> show? Attaching with gdb/totalview is more likely to be confusing than useful, since your program isn't even really running when it's under Valgrind. BTW, the message it prints is probably a real bug, so you should look at fixing that first. J |