I have a daily Perl script that runs and sends out several hundred emails (opt-in only of course). For the last several days, I have been noticing that it is not completing. It just "hangs" and stays on the process table. There is nothing printed either in the logs, in stderr, or in stdout. When I modified the program to print lots of debugging information, the output just stops halfway through printing a variable (it doesn't even complete printing the variable). My first thought was that I had run out of disk space, but running df showed that space was not a problem. Perhaps memory is a problem, although in the past, I have seen Perl print "out of memory!" to stderr and the program dies (not the program in question). This program is NOT dying, it just hangs out. It's not just moving slowly either and system performance does not seem to be impacted. I am sure that I am not trapped in an infinite loop because I have so many print statements that if I were in a loop, the logs would eventually consume all remaining disk space.

So, the question I have is this: If I keep the process running, is there a way to look inside to find out what's going on?

While I would love to post the code, company policy prohibits.

Thanks!

P.S. Perl 5.6.0
R.H. Linux
Oracle 8i

In reply to Program hangs by Stegalex

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.