[jira] [Comment Edited] (EXEC-62) PumpStreamHandler hangs if process is terminated by timeout and it has not generated stdout / stderr output

2018-05-29 Thread Matthieu Ghilain (JIRA)


[ 
https://issues.apache.org/jira/browse/EXEC-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=16493298#comment-16493298
 ] 

Matthieu Ghilain edited comment on EXEC-62 at 5/29/18 9:33 AM:
---

Exact same problem here. Do you have any solution in mind?

*Version*


 org.zeroturnaround
 zt-exec
 1.10
 test


*Stack* 

pool-2-thread-1" #17 prio=5 os_prio=0 tid=0x7f6218e47000 nid=0x175 in 
Object.wait() [0x7f61f729f000]
 java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x00071f9fa968> (a java.lang.Thread)
 at java.lang.Thread.join(Thread.java:1252)
 - locked <0x00071f9fa968> (a java.lang.Thread)
 at java.lang.Thread.join(Thread.java:1326)
 at 
org.zeroturnaround.exec.stream.PumpStreamHandler.stop(PumpStreamHandler.java:219)
 at 
org.zeroturnaround.exec.close.StandardProcessCloser.close(StandardProcessCloser.java:41)
 at org.zeroturnaround.exec.WaitForProcess.call(WaitForProcess.java:110)
 at org.zeroturnaround.exec.ProcessExecutor.waitFor(ProcessExecutor.java:1097)
 at org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:925)


was (Author: ghila...@gmail.com):
Exact same problem here. Do you have any solution in mind?

 

pool-2-thread-1" #17 prio=5 os_prio=0 tid=0x7f6218e47000 nid=0x175 in 
Object.wait() [0x7f61f729f000]
 java.lang.Thread.State: WAITING (on object monitor)
 at java.lang.Object.wait(Native Method)
 - waiting on <0x00071f9fa968> (a java.lang.Thread)
 at java.lang.Thread.join(Thread.java:1252)
 - locked <0x00071f9fa968> (a java.lang.Thread)
 at java.lang.Thread.join(Thread.java:1326)
 at 
org.zeroturnaround.exec.stream.PumpStreamHandler.stop(PumpStreamHandler.java:219)
 at 
org.zeroturnaround.exec.close.StandardProcessCloser.close(StandardProcessCloser.java:41)
 at org.zeroturnaround.exec.WaitForProcess.call(WaitForProcess.java:110)
 at org.zeroturnaround.exec.ProcessExecutor.waitFor(ProcessExecutor.java:1097)
 at org.zeroturnaround.exec.ProcessExecutor.execute(ProcessExecutor.java:925)

> PumpStreamHandler hangs if process is terminated by timeout and it has not 
> generated stdout / stderr output
> ---
>
> Key: EXEC-62
> URL: https://issues.apache.org/jira/browse/EXEC-62
> Project: Commons Exec
>  Issue Type: Bug
>Affects Versions: 1.1
> Environment: Ubuntu 11.04, 
> $ java -version
> java version "1.6.0_29"
> Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
> Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode)
>Reporter: Ignat Zapolsky
>Assignee: Siegfried Goeschl
>Priority: Major
> Attachments: sample.tar.gz
>
>
> Hi,
> I've found an issue with DefaultExecutor hanging while waiting for 
> PumpStreamHandler to close all subprocess streams if child process was 
> terminated by watchdog (e.g. on timeout).
> I've created a test case for the issue demonstrating working behaviour & 
> issue.
> Test requires commons-io 1.4, Junit 4.x and commons-exec 1.1 to compile



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)


[jira] [Comment Edited] (EXEC-62) PumpStreamHandler hangs if process is terminated by timeout and it has not generated stdout / stderr output

2016-01-08 Thread Siegfried Goeschl (JIRA)

[ 
https://issues.apache.org/jira/browse/EXEC-62?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel=15086164#comment-15086164
 ] 

Siegfried Goeschl edited comment on EXEC-62 at 1/8/16 9:26 PM:
---

The joy of multi-platform support - the problem under Ubuntu

* the process is indeed killed by the watchdog
* the StreamPumper is blocked reading from the child process streams and never 
returns
* therefore the the worker threads are not terminated (since the are still in 
InputStream.read())
* the Thread.join will never succeed 

Some thoughts along the line

* Some other bug report indicates that the problem is caused by no process 
output but adding an echo statement does not help either
* I tried interrupting the StreamPumper threads but this does not work (see 
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4514257)


was (Author: sgoeschl):
The joy of milt-platform support - the problem under Ubuntu

* the process is indeed killed by the watchdog
* the StreamPumper is blocked reading from the child process streams and never 
returns
* therefore the the worker threads are not terminated (since the are still in 
InputStream.read())
* the Thread.join will never succeed 

Some thoughts along the line

* Some other bug report indicates that the problem is caused by no process 
output but adding an echo statement does not help either
* I tried interrupting the StreamPumper threads but this does not work (see 
http://bugs.java.com/bugdatabase/view_bug.do?bug_id=4514257)

> PumpStreamHandler hangs if process is terminated by timeout and it has not 
> generated stdout / stderr output
> ---
>
> Key: EXEC-62
> URL: https://issues.apache.org/jira/browse/EXEC-62
> Project: Commons Exec
>  Issue Type: Bug
>Affects Versions: 1.1
> Environment: Ubuntu 11.04, 
> $ java -version
> java version "1.6.0_29"
> Java(TM) SE Runtime Environment (build 1.6.0_29-b11)
> Java HotSpot(TM) Server VM (build 20.4-b02, mixed mode)
>Reporter: Ignat Zapolsky
>Assignee: Siegfried Goeschl
> Attachments: sample.tar.gz
>
>
> Hi,
> I've found an issue with DefaultExecutor hanging while waiting for 
> PumpStreamHandler to close all subprocess streams if child process was 
> terminated by watchdog (e.g. on timeout).
> I've created a test case for the issue demonstrating working behaviour & 
> issue.
> Test requires commons-io 1.4, Junit 4.x and commons-exec 1.1 to compile



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)