Hm. Which versions of what on what platforms? What size and types of files when it fails? Any other pertinent information besides "the script ends"?

I set the following going. It picks two files--from a few hundred bytes to 25MB; source files, text data; binary data; images; video--at random, and feeds them to your script (modified with warn instead of print for informational messages):

perl -E"@f=grep{ -s $_ < 25e6} glob'*'; $p = system qq[junk10 $f[ ran +d @f ] $f[ rand @f ] >nul] for 1 .. 1e3" successfully opened up . junk48.pl successfully opened up . 800691.dat2.png Done [800691.dat2.png junk48.pl] successfully opened up . IC-junk1.pl successfully opened up . 834245.13 successfully opened up . 797136-a.pl successfully opened up . 2x1e5+2x20.dat Done [797136-a.pl 2x1e5+2x20.dat] successfully opened up . smallints.txt successfully opened up . 8828831.trc.txt Done [smallints.txt 8828831.trc.txt] successfully opened up . Service.pl successfully opened up . 759033.pl Done [Service.pl 759033.pl] Terminating on signal SIGINT(2)

It completed the 1000 pairs of files in a few minutes with no apparent failures, which I take to mean that there is little wrong with the functionality of the code (on my system & versions).

So, then I thought about how could I make it fail, and fed it a 4GB binary file that contained no newlines and watched as the memory grew and grew, and the IO rate dropped & dropped until it ran the machine out of memory and died silently. The last messages displayed were the two "successfully open up" messages.

Does that fit your symptoms?


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.
RIP an inspiration; A true Folk's Guy

In reply to Re: Crahes due to threads. by BrowserUk
in thread Crahes due to threads. by jasoncollins

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.