You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@storm.apache.org by "Slava Andreyev (JIRA)" <ji...@apache.org> on 2016/07/06 15:08:11 UTC
[jira] [Updated] (STORM-1946) ShellBolt.java - On busy system
BoltHeartbeatTimerTask fires before setHeartbeat() is executed
[ https://issues.apache.org/jira/browse/STORM-1946?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Slava Andreyev updated STORM-1946:
----------------------------------
Attachment: ShellBolt.java.patch
A patch to fix the issue.
> ShellBolt.java - On busy system BoltHeartbeatTimerTask fires before setHeartbeat() is executed
> ----------------------------------------------------------------------------------------------
>
> Key: STORM-1946
> URL: https://issues.apache.org/jira/browse/STORM-1946
> Project: Apache Storm
> Issue Type: Bug
> Components: storm-core
> Reporter: Slava Andreyev
> Labels: patch
> Attachments: ShellBolt.java.patch
>
>
> When storm stars a large number of ShellBolt-s that consume a lot of CPU time to initialize, it creates a lot of contention between processes for CPU resource. That leads to [BoltHeartbeatTimerTask|https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/task/ShellBolt.java#L142] being fired up after 1 second delay _before_ [setHeartbeat()|https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/task/ShellBolt.java#L145] assigns initial value to [lastHeartbeatTimestamp|https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/task/ShellBolt.java#L91] variable.
> As a result when {{BoltHeartbeatTimeTask}} fires up for the first time, [getLastHeartbeat()|https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/task/ShellBolt.java#L316] returns value of *0*. This in turn leads bolt to die with ["subprocess heartbeat timeout"|https://github.com/apache/storm/blob/master/storm-core/src/jvm/org/apache/storm/task/ShellBolt.java#L322] message.
> The fix is to place {{setHeartBeat()}} _before_ {{BoltHeartbeatTimerTask}} is created. The patch for this is attached.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)