S
Sergio
Hi everybody,
My Java application blocks in Runtime.exec() as these thread dump shows:
"main" prio=1 tid=0x804e360 nid=0x7ecc waiting on monitor
[0xbfffa000..0xbfffc564]
at java.lang.Object.wait(Native Method)
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:139)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:546)
at java.lang.Runtime.exec(Runtime.java:413)
at java.lang.Runtime.exec(Runtime.java:356)
at java.lang.Runtime.exec(Runtime.java:320)
at...
It does not seem to be a problem of exhausting the resources associated to
the process's streams (as some postings in the internet suggest). The
funny thing is that the execution of that exec only hangs when I am
executing it from within an application that I am trying to debug (if I
execute the exec outside that code, it works!). The only thing I see that
maybe could have an impact is that in my code I am launching several other
processes through Runtime.exec(...); however, these exec's do not block.
The goal of the exec is to execute "cat /proc/loadavg" to see the load of
the system at that point in the Java code. However, I don't think the
specific command is relevant.
Any ideas?
Thanks in advance,
Sergio
My Java application blocks in Runtime.exec() as these thread dump shows:
"main" prio=1 tid=0x804e360 nid=0x7ecc waiting on monitor
[0xbfffa000..0xbfffc564]
at java.lang.Object.wait(Native Method)
at java.lang.UNIXProcess.forkAndExec(Native Method)
at java.lang.UNIXProcess.<init>(UNIXProcess.java:139)
at java.lang.Runtime.execInternal(Native Method)
at java.lang.Runtime.exec(Runtime.java:546)
at java.lang.Runtime.exec(Runtime.java:413)
at java.lang.Runtime.exec(Runtime.java:356)
at java.lang.Runtime.exec(Runtime.java:320)
at...
It does not seem to be a problem of exhausting the resources associated to
the process's streams (as some postings in the internet suggest). The
funny thing is that the execution of that exec only hangs when I am
executing it from within an application that I am trying to debug (if I
execute the exec outside that code, it works!). The only thing I see that
maybe could have an impact is that in my code I am launching several other
processes through Runtime.exec(...); however, these exec's do not block.
The goal of the exec is to execute "cat /proc/loadavg" to see the load of
the system at that point in the Java code. However, I don't think the
specific command is relevant.
Any ideas?
Thanks in advance,
Sergio