Beefy Boxes and Bandwidth Generously Provided by pair Networks
more useful options
 
PerlMonks  

Re^3: threads: work crew memory leak

by BrowserUk (Pope)
on Oct 16, 2010 at 20:03 UTC ( #865721=note: print w/ replies, xml ) Need Help??


in reply to Re^2: threads: work crew memory leak
in thread threads: work crew memory leak

I am using perl v5.12.2, threads v1.75, threads::shared v1.32.

It might be worth your while trying threads v1.81 & threads::shared v1.34.

As others replied this could be an underlying problem with pthread.

*nix/pthreads isn't something I know much about, but my gut feel is this is more likely to be a problem with (perl) memory allocation than the underlying threading libraries.

One thing that should be done, if this is going to get fixed, is to find a minimal test case that demonstrates the problem and a bug report raised. Something like:

perl -Mthreads -wE"{sleep 1 while threads->list>20;async(sub{1})->deta +ch;redo}"

Assuming that actually leaks on your system, because the memory usage is rock solid at 12.5MB here.

For now I'll rewrite the code to reuse threads.

Once you do, you'll never go back to using throw-away threads.


Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.


Comment on Re^3: threads: work crew memory leak
Download Code
Re^4: threads: work crew memory leak
by rakzer (Novice) on Oct 16, 2010 at 23:19 UTC
    After 20 minutes the process used 2.3GB of memory. I will repeat the same test as soon as I have the proposed threads/threads::shared version available. Thank you very much for your help.
Re^4: threads: work crew memory leak
by zwon (Monsignor) on Oct 17, 2010 at 02:46 UTC
    One thing that should be done, if this is going to get fixed, is to find a minimal test case that demonstrates the problem and a bug report raised.

    It's already there, no need to clog RT with identical reports. #69598

      Cool++ Thanks for the heads up.


      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority".
      In the absence of evidence, opinion is indistinguishable from prejudice.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://865721]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (6)
As of 2014-12-25 14:46 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (160 votes), past polls