New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Leaking when joining threads? #8104
Comments
From gthomas@netstarnetworks.comHi, Thanks |
From @iabynOn Sat, Sep 10, 2005 at 07:10:26PM -0700, Garry wrote:
I can reduce the leak to this astonishingly small test case: use threads; sub ThreadRoutine {} while (1) { This leaks like a sieve on 5.8.1+ and bleedperl (but not on 5.8.0 funnily I haven't got time at the moment to investigate further (lots of other -- |
The RT System itself - Status changed from 'new' to 'open' |
From gthomas@netstarnetworks.comIf I put an "undef $thread;" in your example, the leak "seems" to be So your example becomes... use threads; sub ThreadRoutine {} while (1) { Is this the expected behaviour? Shouldn't the old thread object be I'm yet to try this in my code, so I hope its the same leak that I've
|
From gthomas@netstarnetworks.comI've modified the example small script to closer emulate my actual My feeling is that the leak I'm getting in my actual program is more a #!/usr/bin/perl our $thr : shared; sub ThreadRoutine { sub jointhread $thr=0;
|
From @iabynOn Sun, Sep 11, 2005 at 02:18:06PM +0100, Dave Mitchell wrote:
I've fixed this by changing when the old interpreter is freed from when { What was happening was that the second time round the loop, a new thread (Actually the code above still leaks slighty but not nearly as much. I'm -- Change 25769 by davem@davem-splatty on 2005/10/16 14:53:45 free a thread's interpreter after $t->join() rather than after undef $t Affected files ... ... //depot/perl/ext/threads/threads.xs#88 edit Differences ... ==== //depot/perl/ext/threads/threads.xs#88 (xtext) ==== @@ -86,14 +86,49 @@ +/* free any data (such as the perl interpreter) attached to an + thread->params = Nullsv; - if(thread->interp) { int |
From @nwc10On Sun, Oct 16, 2005 at 04:52:43PM +0100, Dave Mitchell wrote: Good stuff nailing this one.
Traditionally aren't static functions named S_* rather than Perl_* ? Nicholas Clark |
From @iabynOn Sun, Oct 16, 2005 at 06:12:14PM +0100, Nicholas Clark wrote:
Ah yes. Lazy cut-n-paste. Fixed by #25770. -- |
@iabyn - Status changed from 'open' to 'resolved' |
From gthomas@netstarnetworks.comHi Dave, Thanks -----Original Message----- On Sun, Oct 16, 2005 at 06:12:14PM +0100, Nicholas Clark wrote:
Ah yes. Lazy cut-n-paste. Fixed by #25770. -- |
From @iabynOn Mon, Oct 17, 2005 at 01:26:52PM +1000, Garry Thomas wrote:
Yes, essentially. -- |
Migrated from rt.perl.org#37134 (status was 'resolved')
Searchable as RT37134$
The text was updated successfully, but these errors were encountered: