Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl Monk, Perl Meditation

Comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
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.

In reply to Re^3: threads: work crew memory leak by BrowserUk
in thread threads: work crew memory leak by rakzer

Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":

  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?

    What's my password?
    Create A New User
    and the grasshoppers chirp...

    How do I use this? | Other CB clients
    Other Users?
    Others surveying the Monastery: (4)
    As of 2018-05-22 03:23 GMT
    Find Nodes?
      Voting Booth?