Hello dchidelf, and welcome to the Monastery!

I can’t pretend to understand what your code is doing, but I’ve done some debugging on it and I’ll share my findings in the hope that they help. My system is as follows:

First, a couple of minor problems: (1) There’s a semicolon missing in the test script at the end of the line: print $in "HI AGAIN\n". (2) The second return statement in ProcInHandle::PRINT can never be reached.

Now, to the main issue. When I run the test script it either crashes (“Perl interpreter has stopped working”) or reports panic: COND_DESTROY (6). But whereas for you the interpreter ”eventually crashes,” I’ve found that if I change the for loop in the test script to make just two iterations, the script reliably crashes on the second.

The crash occurs during the call $p->close(); on the second iteration of the for loop. Further, within ProcOpen::close the crash occurs in the line $othr->join(). If I comment out that line, the crash occurs in the line $ethr->join(). And if I comment out both of those lines, the script runs successfully to completion after 25 iterations, but of course leaves active threads:

... LOOP DONE ProcOpen[DEBUG] Requested close on ProcOpen Object About to close Join Threads threads=SCALAR(0x28d9080) threads=SCALAR(0x28da680) part done Join Threads threads=SCALAR(0x28d9080) threads=SCALAR(0x28da680) Threads joined WORKED!! Perl exited with active threads: 0 running and unjoined 50 finished and unjoined 0 running and detached 23:27 >

Maybe this will give you (or one of the other monks) a clue as to what is going wrong.

Hope that helps,

Athanasius <°(((><contra mundum Iustus alius egestas vitae, eros Piratica,


In reply to Re: Having Win32 Perl crashes using ithreads by Athanasius
in thread Having Win32 Perl crashs using ithreads by dchidelf

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.