[ 
https://issues.apache.org/jira/browse/STORM-846?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14570618#comment-14570618
 ] 

Jungtaek Lim commented on STORM-846:
------------------------------------

There seems to be race condition between BoltReaderRunnable.run() and 
ShellBolt.cleanup().

ShellBolt.cleanup() interrupts ReaderThread but actually few of methods inside 
BoltReaderRunnable.run() throws InterruptedException. (Accessing _pendingWrites 
throws InterruptedException, but I cannot find any others.)
So we assume that interrupting ReaderThread doesn't stop its flow at that time 
before encountering _pendingWrite.

1. ReaderThread.run() passes "while(_running)" check and dive into loop.
2. ShellBolt.cleanup() interrupts ReaderThread. It has marked as 'interrupted'.
3. ShellBolt.cleanup() clears _inputs
4. ReaderThread.run() reads shell message, and it is emit, so it calls 
handleEmit().
5. ShellBolt.handleEmit() checks _inputs but nothing found. So it throws 
RuntimeException.

> ShellBolt throws java.lang.RuntimeException: Anchored onto <TupleId> after 
> ack/fail
> -----------------------------------------------------------------------------------
>
>                 Key: STORM-846
>                 URL: https://issues.apache.org/jira/browse/STORM-846
>             Project: Apache Storm
>          Issue Type: Bug
>            Reporter: Jungtaek Lim
>
> charlie quillard reports about strange behavior on multilang bolt.
> {quote}
> I have a problem with my shellbolt, which uses a cpp bolt(with this wrapper : 
> http://demeter.inf.ed.ac.uk/cross/stormcpp.html ) with the multilang module. 
> This one dies because the shellBolt's attribute "_inputs" is empty and call 
> the next runtime exception : "Anchored onto #Anchor after ack/fail" .
> The log: http://pastebin.com/pG9mHt8X
> {quote}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to