Hi All,
Ive a perl script which is multi process for processing some files. A short algorithm of the script is as follows

1. it forks child processes and divides equally all the text files among them.
2. child processes read the text files and <do something> in a loop which terminates at eof.
3. After processing each file it archives the file by compressing and moving to new location.
4. Now after all the files are processed, the process processing the last file hangs after 2nd Step in 3rd step. (we know this via logging mechanism im using)


Output of pstack for the process 1988(pid of the one of the child proc +ess that hanged) pstack 1988 #1 0x000000317d8f0990 in PerlIOUnix_read () from /usr/lib64/perl5/5.8 +.8/x86_64-linux-thread-multi/CORE/libperl.so #2 0x000000317d8f5055 in PerlIOBuf_fill () from /usr/lib64/perl5/5.8. +8/x86_64-linux-thread-multi/CORE/libperl.so #3 0x000000317d8ef8c8 in Perl_PerlIO_fill () from /usr/lib64/perl5/5. +8.8/x86_64-linux-thread-multi/CORE/libperl.so #4 0x000000317d8f4cbf in PerlIOBase_read () from /usr/lib64/perl5/5.8 +.8/x86_64-linux-thread-multi/CORE/libperl.so #5 0x000000317d8f4dfb in PerlIO_getc () from /usr/lib64/perl5/5.8.8/x +86_64-linux-thread-multi/CORE/libperl.so #6 0x000000317d8a2a20 in Perl_sv_gets () from /usr/lib64/perl5/5.8.8/ +x86_64-linux-thread-multi/CORE/libperl.so #7 0x000000317d88db93 in Perl_do_readline () from /usr/lib64/perl5/5. +8.8/x86_64-linux-thread-multi/CORE/libperl.so #8 0x000000317d88a33e in Perl_runops_standard () from /usr/lib64/perl +5/5.8.8/x86_64-linux-thread-multi/CORE/libperl.so #9 0x000000317d837e9c in perl_run () from /usr/lib64/perl5/5.8.8/x86_ +64-linux-thread-multi/CORE/libperl.so #10 0x000000000040179c in main ()

This is my issue. In case nyone need more info plz lemme know.

Thanks
AvantA

In reply to perl process hangs after processing the last file. by avanta

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.