bug-commoncpp
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug in thread code


From: Federico Montesino Pouzols
Subject: Re: Bug in thread code
Date: Mon, 6 Jan 2003 16:51:59 +0100
User-agent: Mutt/1.4i

        A bug in the tcpthread demo has been recently fixed. Does the
code you are testing start threads with tcp->start() or does it call
tcp->detach()?  As long as it uses detach(), it should free the thread
system resources. If it is not the case, we should look at this issue
again.

On Thu, Jan 02, 2003 at 12:25:06PM -0000, Marcel Stadtmann wrote:
> 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
> 
> 
> 
> 
>  
> 
> 
> 
> 
> _______________________________________________
> Bug-commoncpp mailing list
> address@hidden
> http://mail.gnu.org/mailman/listinfo/bug-commoncpp




reply via email to

[Prev in Thread] Current Thread [Next in Thread]