Hi, I have a multithreaded daemon (called ased) that runs ok when started without valgrind. The daemon forks a child process and the parent exits soon afterwards. The child runs forever. When started with valgrind 2.1.2 the process comes up for a few secs and then quietly exits (see below). I tried with valgrind 2.2.0 and got the same results. Gcc : 3.2.2 Linux : 2.4.20 Valgrind used to work for an old version of ased. The new version adds more threads and also uses a custom pthread library. I modified LD_LIBRARY_PATH so as to use the regular thread library thinking it may have something to do with the problem. Again, I got the same results. =20 Appreciate if anyone can help me. The information is probably insufficient to pinpoint the problem, but even pointers on where to look would help. Thanks, SN. ************************************************** [root@localhost etc]# ps -ef |grep ased root 32245 12087 0 17:43 pts/65 00:00:00 grep ased [root@localhost etc]# ps -ef |grep ased ^[[Aroot 32246 22393 91 17:43 pts/70 00:00:00 /usr/local/bin/valgrind --tool=3Dmemcheck --trace-children=3Dyes --logfile=3D/valgrind = ../bin/ased -d root 32249 12087 0 17:43 pts/65 00:00:00 grep ased ^^^^^^^^^^^ 1 process [root@localhost etc]# ps -ef |grep ased root 32246 22393 75 17:43 pts/70 00:00:02 /usr/local/bin/valgrind --tool=3Dmemcheck --trace-children=3Dyes --logfile=3D/valgrind = ../bin/ased -d root 32253 12087 0 17:43 pts/65 00:00:00 grep ased root 32254 32246 0 17:43 pts/70 00:00:00 /usr/local/bin/valgrind --tool=3Dmemcheck --trace-children=3Dyes --logfile=3D/valgrind = ../bin/ased -d ^^^^^^^^^^^ 2 processes [root@localhost etc]# ps -ef |grep ased root 32260 12087 0 17:43 pts/65 00:00:00 grep ased [root@localhost etc]# ^^^^^^^^^^ processes gone! ************************************************** The following is the tail of the log file generated by valgrind. =3D=3D24267=3D=3D TRANSLATE: 0x1BA7FFD0 redirected to 0x1B90404E =3D=3D24267=3D=3D TRANSLATE: 0x42073880 redirected to 0x1B9041C8 =3D=3D24290=3D=3D TRANSLATE: 0x42073880 redirected to 0x1B9041C8 =3D=3D24292=3D=3D TRANSLATE: 0x42073880 redirected to 0x1B9041C8 =3D=3D24292=3D=3D Warning: ignored attempt to set SIGSTOP handler in sigaction(); =3D=3D24292=3D=3D the SIGSTOP signal is uncatchable ^^^^^^^^^^^^^could this be the problem?? =3D=3D24267=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D24292=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D24292=3D=3D (it doesn't check if the cond is waited on) =3D=3D24292=3D=3D your program may misbehave as a result ^^^^^^^^^^^^^ or this perhaps??? =3D=3D24290=3D=3D warning: Valgrind's pthread_cond_destroy is incomplete =3D=3D24290=3D=3D (it doesn't check if the cond is waited on) =3D=3D24290=3D=3D your program may misbehave as a result =3D=3D24267=3D=3D (it doesn't check if the cond is waited on) =3D=3D24267=3D=3D your program may misbehave as a result =3D=3D24290=3D=3D =3D=3D24290=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: = 39 from 1) --24290-- --24290-- supp: 39 Ugly strchr error in /lib/ld-2.3.2.so =3D=3D24290=3D=3D malloc/free: in use at exit: 1972 bytes in 12 blocks. =3D=3D24290=3D=3D malloc/free: 18 allocs, 6 frees, 4652 bytes allocated. =3D=3D24290=3D=3D --24290-- TT/TC: 0 tc sectors discarded. --24290-- 5805 tt_fast misses. --24290-- translate: new 5652 (90046 -> 1222320; ratio 135:10) --24290-- discard 1 (23 -> 320; ratio 139:10). --24290-- chainings: 2933 chainings, 2 unchainings. --24290-- dispatch: 450000 jumps (bb entries); of them 46048 (10%) unchained. --24290-- 154/6548 major/minor sched events. --24290-- reg-alloc: 694 t-req-spill, 225755+5355 orig+spill uis, --24290-- 27120 total-reg-rank --24290-- sanity: 107 cheap, 5 expensive checks. --24290-- ccalls: 26861 C calls, 64% saves+restores avoided (102990 bytes) --24290-- 35232 args, avg 0.89 setup instrs each (7090 bytes) --24290-- 0% clear the stack (80469 bytes) --24290-- 7789 retvals, 33% of reg-reg movs avoided (5044 bytes) =3D=3D24292=3D=3D =3D=3D24292=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: = 39 from 1) --24292-- --24292-- supp: 39 Ugly strchr error in /lib/ld-2.3.2.so =3D=3D24292=3D=3D malloc/free: in use at exit: 1972 bytes in 12 blocks. =3D=3D24292=3D=3D malloc/free: 19 allocs, 7 frees, 5004 bytes allocated. =3D=3D24292=3D=3D --24292-- TT/TC: 0 tc sectors discarded. --24292-- 6129 tt_fast misses. --24292-- translate: new 5975 (94930 -> 1286225; ratio 135:10) --24292-- discard 1 (23 -> 320; ratio 139:10). --24292-- chainings: 3090 chainings, 2 unchainings. --24292-- dispatch: 450000 jumps (bb entries); of them 56445 (12%) unchained. --24292-- 158/9371 major/minor sched events. --24292-- reg-alloc: 729 t-req-spill, 237512+5547 orig+spill uis, --24292-- 28668 total-reg-rank --24292-- sanity: 109 cheap, 5 expensive checks. --24292-- ccalls: 28219 C calls, 64% saves+restores avoided (108012 bytes) --24292-- 37074 args, avg 0.89 setup instrs each (7494 bytes) --24292-- 0% clear the stack (84495 bytes) --24292-- 8201 retvals, 33% of reg-reg movs avoided (5356 bytes) =3D=3D24267=3D=3D =3D=3D24267=3D=3D ERROR SUMMARY: 0 errors from 0 contexts (suppressed: = 39 from 1) --24267-- --24267-- supp: 39 Ugly strchr error in /lib/ld-2.3.2.so =3D=3D24267=3D=3D malloc/free: in use at exit: 1972 bytes in 12 blocks. =3D=3D24267=3D=3D malloc/free: 18 allocs, 6 frees, 4652 bytes allocated. =3D=3D24267=3D=3D --24267-- TT/TC: 0 tc sectors discarded. --24267-- 5769 tt_fast misses. --24267-- translate: new 5616 (89683 -> 1216761; ratio 135:10) --24267-- discard 1 (23 -> 320; ratio 139:10). --24267-- chainings: 2912 chainings, 2 unchainings. --24267-- dispatch: 450000 jumps (bb entries); of them 45914 (10%) unchained. --24267-- 154/6503 major/minor sched events. --24267-- reg-alloc: 692 t-req-spill, 224770+5351 orig+spill uis, --24267-- 26978 total-reg-rank --24267-- sanity: 107 cheap, 5 expensive checks. --24267-- ccalls: 26726 C calls, 64% saves+restores avoided (102526 bytes) --24267-- 35056 args, avg 0.89 setup instrs each (7034 bytes) --24267-- 0% clear the stack (80067 bytes) --24267-- 7748 retvals, 33% of reg-reg movs avoided (5010 bytes) |