"As to why it's failing -- without more information, hard to tell. My guess is that in the process of opening a file -- usually an atomic operation -- the thread may have stepped on something another thread was doing (or vice versa), and failed without a highly visible cause."

I agree with your comment in principle, however the error returned by open indicates something a bit more basic is occurring. Its as though the arguments I am passing to open aren't being received (at least that is how I interpret the error).

I've also done everything I can think of to separate the threads and prevent any toe stomping (such as not share'ing variables, using Thread::Queue for IPC, having a single control to ensure work units that interact with each other can only be passed to the same thread). Although thinking about it now, it is entirely possible that an external process is attempting something it shouldn't be doing. Thanks for your comments and suggestions so far, I'll go have a look at what else is running on the server.


In reply to Re^2: Problem opening file by SimonPratt
in thread Problem opening file by SimonPratt

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.