Crash in output handling of SynchronousExternalProcess

Bug #605404 reported by Arseniy Alekseyev
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Workcraft
Triaged
Low
Unassigned

Bug Description

I've had an IndexOutOfBoundsException in
org.workcraft.interop.SynchronousExternalProcess.mergeChunksToArray() called from
SynchronousExternalProcess.getOutputData().

I think this is caused by the fact that there is no effort made to ensure that the process output stream is closed before returning from the SynchronousExternalProcess.start() method.
In this case SynchronousExternalProcess.start() followed by SynchronousExternalProcess.getOutputData() can cause a read concurrent to write, which can cause all sorts of bad behaviour (from incomplete output to crashes like above).

I don't see a quick fix for this because org.workcraft.interop.ExternalProcess class does not provide means to detect or enforce the end of stream.
So, ExternalProcess will probably need modifications too.

Tags: exception
Ivan Poliakov (mech)
Changed in workcraft:
importance: Undecided → High
status: New → Triaged
Changed in workcraft:
milestone: none → 3.0
tags: added: exception
Changed in workcraft:
milestone: 3.0 → none
importance: High → Low
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.