We're updating the issue view to help you get more done. 

GSC stdio is sometimes closed too early causing shutdown to hang forever

Description

As part of gsa managing gsc stdoio the gsc stdio is closed, before the actual process is shutdown, if shutdown contains logging that eventually print to stdout this will cause the shutdown to hang.

GSC prints "gsa-exit-done" to stdout
GSA reads "gsa-exit-done" and stops GSProcess.ProcessReader
GSC continues to write stuff to stdout, but nobody is consuming it. This works for a while until stdio pipeline cache size is reached. Then it blocks forever.
Customer comment:
Proposed fix. Only stop consuming stdout after GSA.ImplProcessMonitor detects shutdown of GSC. Which it already does, so actually only remove "gsa-exit-done" hook.

In Reproducible customer create class ParentProcess which represent a GSA and then there is the class ChildProcess which play the role of a GSC/GSM or similar. In method ChildProcess.shutdown you can easly increase or decrease the amount of data written to stdout after shutdown.

Thread dump attached.

Workaround

None

Acceptance Test

None

Status

Assignee

Unassigned

Reporter

Ester Atzmon

Labels

None

Priority

Medium

SalesForce Case ID

None

Fix versions

None

Commitment Version/s

None

Due date

None

Product

XAP

Edition

Premium

Platform

All