[
https://issues.apache.org/jira/browse/EXEC-99?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Siegfried Goeschl updated EXEC-99:
----------------------------------
Description:
Sometimes the current PumpStreamHandler when a process is killed but its child
process streams are processed by PumpStreamHandler
* The behaviour is not always reproducable and might depend on JDK and/or OS
* Closing the processed stream does not seem work
* Using Thread.interrupt() on reading from a stream does not work due to an old
JDK issue
* Thread.stop() is deprecated and has no effect on JDK 8
* Hence the the stream pumper thread is stuck and can't terminate
* So we hang in PumpStreamHandler().stop
There was a bug fix to avoid hanging forever but this leaves the pumper thread
behind which could break a production system.
As a work-around I propose a "NonBlockingPumpStreamHandler"
* use only on worker thread to process a streams
* using Thread.sleep() between processing of the streams
* can be stopped safely since there are no blocking operations
* it will be much slower processing the streams which could block the child
process
It might be a good idea to hide those implementation behind a factory
was:
Sometimes the current PumpStreamHandler when a process is killed but its child
process streams are processed by PumpStreamHandler
* Closing the processed stream does seem not work
* Using Thread.interrupt() does not work
* Thread.stop() is deprecated and has no effect on JDK 8
* Hence the the stream pumper thread is stuck and can't terminate
* So we hand in PumpStreamHandler().stop
There was a bug fix to avoid hanging forever but this leaves the pumper thread
behind which could break a production system.
As a work-around I propose a "NonBlockingPumpStreamHandler"
* use only on worker thread to process a streams
* using Thread.sleep() between processing of the streams
* can be stopped safely since there are no blocking operations
* it will be much slower processing the streams which could block the child
process
It might be a good idea to hide those implementation behind a factory
> Provide a non-blocking PumpStreamHandler
> ----------------------------------------
>
> Key: EXEC-99
> URL: https://issues.apache.org/jira/browse/EXEC-99
> Project: Commons Exec
> Issue Type: Improvement
> Affects Versions: 1.3
> Reporter: Siegfried Goeschl
> Assignee: Siegfried Goeschl
> Fix For: 1.4
>
>
> Sometimes the current PumpStreamHandler when a process is killed but its
> child process streams are processed by PumpStreamHandler
> * The behaviour is not always reproducable and might depend on JDK and/or OS
> * Closing the processed stream does not seem work
> * Using Thread.interrupt() on reading from a stream does not work due to an
> old JDK issue
> * Thread.stop() is deprecated and has no effect on JDK 8
> * Hence the the stream pumper thread is stuck and can't terminate
> * So we hang in PumpStreamHandler().stop
> There was a bug fix to avoid hanging forever but this leaves the pumper
> thread behind which could break a production system.
> As a work-around I propose a "NonBlockingPumpStreamHandler"
> * use only on worker thread to process a streams
> * using Thread.sleep() between processing of the streams
> * can be stopped safely since there are no blocking operations
> * it will be much slower processing the streams which could block the child
> process
> It might be a good idea to hide those implementation behind a factory
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)