Uploaded image for project: 'Apache Storm'
  1. Apache Storm
  2. STORM-442

multilang ShellBolt/ShellSpout die() can be hang when Exception happened

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 0.9.3
    • Fix Version/s: 0.10.0, 0.9.7
    • Component/s: storm-multilang
    • Labels:
      None

      Description

      In ShellBolt, the _readerThread read command from python/shell process, and handle like this:

      try

      { ShellMsg shellMsg = _process.readShellMsg(); ... }

      catch (InterruptedException e) {
      } catch (Throwable t)

      { die(t); }

      And in the die function, getProcessTerminationInfoString will read getErrorsString() from processErrorStream.

      private void die(Throwable exception)

      { String processInfo = _process.getProcessInfoString() + _process.getProcessTerminationInfoString(); _exception = new RuntimeException(processInfo, exception); }

      so when ShellBolt got exception(for example, readShellMsg() throw NPE ) , but it is not an error from sub process, then getProcessTerminationInfoString will be hang because processErrorStream have no data to read.

      On the other hand, as Kang Xiao says ShellBolt should fail fast on exception ( https://github.com/apache/incubator-storm/pull/46 ) , I think it is not a good idea to read error info from stream.
      Because Kang Xiao 's PR is based old version, so I will move his code to this PR, and modify some other place in ShellSpout.

        Attachments

          Activity

            People

            • Assignee:
              dashengju DashengJu
              Reporter:
              dashengju DashengJu
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: