[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
AW: Bug in thread code
From: |
Marcel Stadtmann |
Subject: |
AW: Bug in thread code |
Date: |
Thu, 2 Jan 2003 12:25:06 -0000 |
Hello,
-----Ursprüngliche Nachricht-----
Von: Albert Strasheim [mailto:address@hidden
Gesendet: Donnerstag, 2. Januar 2003 12:39
An: Marcel Stadtmann
Cc: address@hidden
Betreff: Re: Bug in thread code
Hello,
On Thu, 02 Jan 2003, Marcel Stadtmann wrote:
> Thanks for your help. But i think this is not the real problem.
> Maybe my discribtion was not correct. On the sample, the thread will start,
> do his job, and then terminate. For me means this, the resource of
> this thread should be free after termination. Is this not correct ??
> Are there still resources allocated ??
It seems as if final() in myTCPSession is being called, so the "delete
this" probably happens. This starts destructing the thread object, which
hopefully calls a terminate() somewhere down the line, which stops the
thread and cleans up the other bits and pieces.
The obvious scenario related to threads where you could possibly run
out of resources is when you start a bunch of joinable threads, but
never join on them again, meaning their resources stick around until the
parent process terminates.
I ran your test, and on my system (using commoncpp2 from CVS) I had
completed about 20000 connections before tcpthread segfaulted.
While you wait for someone with a proper clue (i.e. not me :-)) to help
you, you might want to try commoncpp2 from CVS and see if your problems
persist. You can find instructions for doing a checkout here:
http://savannah.gnu.org/cvs/?group=commoncpp
I'll poke around the threads code some more today. Good luck!
Cheers,
Albert
Thanks Albert for the fast answer.
I have testet this allready with the newest Code from CVS. Still the same
problem.
But your explanation with the resources seems as its true.
It's is maybe a problem with the thread cleanup code part in commoncpp.
I try to make some additional test's, to give more input.
cheers
Marcel