Thread 20 terminated abnormally: panic: COND_SIGNAL (298) at cm.pl line 487. Terminating on signal SIGINT(2)

The error breaks down into several parts:

  1. Thread 20 terminated abnormally:

    Fairly obviously means that thread number 20 was started, but it terminated as a result of something other than return or 'running off the end of the sub'.

  2. panic: COND_SIGNAL (298) at cm.pl line 487.

    This is the reason it terminated. Perl (threads.pm) itself terminated it because of an unexpected internal error condition (panic).

    In this case, the code is executing (either explicitly in your code or implicitly through perl internal code):

    #define COND_SIGNAL(c) \ STMT_START { \ if ((c)->waiters > 0 && \ ReleaseSemaphore((c)->sem,1,NULL) == 0) \ Perl_croak_nocontext("panic: COND_SIGNAL (%ld)",GetLastError() +); \ } STMT_END

    The 298 is the system error code returned by GetLastError after the ReleaseSemaphore() call fails.

    It translates to "Too many posts were made to a semaphore." which is further explained as

    There is a limited number of times that an event semaphore can be posted. You tried to post an event semaphore that has already been posted the maximum number of times.

    If you are making extensive use of threads::shared::cond_* calls in your code, that could be the root of the problem. If you want help in debugging that further, you will have to "show us the code".

    If you are not using the cond_* calls in your code, then it could be that you've unearthed a bug in Perl itself. You might try upgrading your versions of Perl to (say) 5.10.1. And/or your version of threads &| threads::shared.

  3. Terminating on signal SIGINT(2)

    Under most circumstances, this will only occur if you (or someone) types ^C. Did you fail to mention that your application is hanging and you get the above error message only when you interrupt it?


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^3: Perl Thread Quitting Abnormally by BrowserUk
in thread Perl Thread Quitting Abnormally by Anonymous Monk

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.