in reply to Re^2: perl process hangs after processing the last file.
in thread perl process hangs after processing the last file.

OK, so it is reading file descriptor 7, which is a socket. So you need to look at your closedown sequence. How does the writer indicate that there is no further data? Does the reader check for this correctly?
  • Comment on Re^3: perl process hangs after processing the last file.

Replies are listed 'Best First'.
Re^4: perl process hangs after processing the last file.
by avanta (Beadle) on Jan 19, 2011 at 05:22 UTC
    Hi cdarke,

    after some analysis I found the followin info
    lsof shows it's an IPv4 connection: perl 2221 root 7u IPv4 1768226357 TCP xyz-server.com:38178->xyz-server.com:7891 (ESTABLISHED) Connection to port 7891 - the JVM used /usr/java/jdk1.6.0_21/bin/java org.perl.inline.java.InlineJavaServer 0 + localhost 7891 true false false
    Actually, we are using Inline::Java to use methods in a jar file through perl, basically for SNMP usage. that is the reason for the creation of JVM which is in Shared mode. There is a method which uses the Java module in the 4th Step mentioned in my query above.

    This is called for all the text files but why is it hanging at the last process having the last file, if java module is the cause. So any suggestions on the same.
    Thanks
    AvantA
      The first thing you should test is if the problem vanishes when you disable the SNMP code, i.e. the call to the java library.