licl2014 opened a new issue #9775:
URL: https://github.com/apache/druid/issues/9775


   HttpPostEmitter.close will lead task to hang forever because of   
emittingThread quit.
   
   ### Affected Version
   
   0.12.3
   
   ### Description
   The task's jstack information as follows:
   
![image](https://user-images.githubusercontent.com/6941514/80302739-7c880580-87de-11ea-9f42-05c746317b83.png)
   
   - We found  `emittingThread `  quit in  jstack, but it should't quit before 
main thread.
   - `concurrentBatch` will be set `null` when close, then `needsToShutdown`  
may  be `true` due to `concurrentBatch.get()` and `emittingThread` exit 
normally.
   - So we should add lock in `concurrentBatch.get()`, such as 
   ```
           synchronized (startLock) {
             Object batch = concurrentBatch.get();
            .......
           }
   ```
   
   


----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]



---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to