|
From: arryoo h. <the...@gm...> - 2008-10-10 02:08:33
|
hi,
Here the problem.
$ valgrind --tool=memcheck --trace-children=yes --error-limit=no
--leak-check=full --log-file=leak_hxx ./hxx
the content of leak_hxx is not so much as expected. And I am sure
there are memory problems in the program.
program hxx, pthread_create() a lot of threads ( about 50 ). There is
a thread listen on socket 0.0.0.0:2000,
and many of threads are created when receive a socket connect.
$ ./hxx
$ netstat
tcp 0 0 0.0.0.0:2000 0.0.0.0:* LISTEN
this is fine. But call like
$ valgrind --tool=memcheck --trace-children=yes --error-limit=no
--leak-check=full --log-file=leak_hxx ./hxx
$ netstat -na | grep 2000
$
there is nothing.
It seems that the listener thread haven't be created. Is there any bug
in valgrind mentioned previously about pthread_create
or socket?
regards
---
BTW, send your dulplicate reply to me. thanks.
|
|
From: Bart V. A. <bar...@gm...> - 2008-10-10 06:03:32
|
On Fri, Oct 10, 2008 at 4:08 AM, arryoo hoo <the...@gm...> wrote: > It seems that the listener thread haven't be created. Is there any bug > in valgrind mentioned previously about pthread_create > or socket? Not that I know of. There might be a threading bug in your program however -- checking your program with helgrind or drd might learn you more. Helgrind is included in Valgrind, and instructions for obtaining drd can be found here: http://www.nabble.com/-ANNOUNCEMENT--DRD,-a-Thread-Error-Detector-td18336351.html. Bart. |