When I see words like JUMPENV_PUSH, my instincts tell me that what’s really happening here is that your various threads are conflicting with one another in relation to the surrounding environment.   The Perl packages in question won’t be prepared to consider if, for example, two or more instances of itself are engaged in a race-condition, both of them attempting to do the same thing at the same time.

You may need to add some kind of a mutual-exclusion mechanism surrounding some of your calls, e.g. to create a new temporary file, in order to be sure that multiple threads do not attempt to do these things at precisely the same instant.   Both the unpredictability of these happenings, and the severity of them (segfault ...) seem to support this hypothesis.   In other contexts, we would say that these calls “are not thread-safe,” and it is most certainly the case that they were never designed to be.


In reply to Re: Complex and reliable signal handling. by Anonymous Monk
in thread Complex and reliable signal handling. by vsespb

Title:
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, details, 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, summary, 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.