[
https://issues.apache.org/jira/browse/STORM-733?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14388079#comment-14388079
]
ASF GitHub Bot commented on STORM-733:
--------------------------------------
Github user itaifrenkel commented on a diff in the pull request:
https://github.com/apache/storm/pull/489#discussion_r27454715
--- Diff: storm-core/src/jvm/backtype/storm/utils/ShellProcess.java ---
@@ -121,34 +117,15 @@ public void writeTaskIds(List<Integer> taskIds)
throws IOException {
}
public void logErrorStream() {
- try {
- while (processErrorStream.available() > 0) {
- int bufferSize = processErrorStream.available();
- byte[] errorReadingBuffer = new byte[bufferSize];
- processErrorStream.read(errorReadingBuffer, 0, bufferSize);
- ShellLogger.info(new String(errorReadingBuffer));
- }
- } catch (Exception e) {
+ final Optional<String> errorsString = getErrorStreamMessage();
+ if (errorsString.isPresent()) {
+ ShellLogger.info(errorsString.get());
}
}
public String getErrorsString() {
--- End diff --
add a comment saying this method must never block since it is run during
critical shutdown phase
> ShellBolts that don't respond to heartbeats are not being killed
> ----------------------------------------------------------------
>
> Key: STORM-733
> URL: https://issues.apache.org/jira/browse/STORM-733
> Project: Apache Storm
> Issue Type: Bug
> Affects Versions: 0.9.3
> Reporter: Re'em Bensimhon
> Assignee: Re'em Bensimhon
> Priority: Critical
>
> In cases where a multilang bolt is stuck (say, an infinite loop), the
> heartbeats are supposed to detect the issue and kill the supervisor process.
> In 0.9.3 this doesn't happen due to
> backtype.storm.utils.ShellProcess.getErrorsString() call in ShellBolt.die()
> This call, which in turn executes IOUtils.toString(processErrorStream) will
> block the thread until process exits. Heartbeat flow should not assume
> process had exited.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)