aloyszhang opened a new issue #2879:
URL: https://github.com/apache/bookkeeper/issues/2879


   **BUG REPORT**
   Bookie does not exist when the on journal thread exists.
   ***Describe the bug***
   I have a bookie which has three directories, after running for some days, 
the bookie is not healthy when test by 
   ```shell
   bin/bookkeeper shell bookiesanity 
   ```
   And the jstack show almost all `bookie-io` thread are waiting for journal 
adding an entry to the queue.
   
   ```
   "bookie-io-1-20" #44 prio=5 os_prio=0 tid=0x00007f4741f02800 nid=0x57d8 
waiting on condition [0x00007f46f7074000]
      java.lang.Thread.State: WAITING (parking)
        at sun.misc.Unsafe.park(Native Method)
        - parking to wait for  <0x00000005778a3c88> (a 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject)
        at java.util.concurrent.locks.LockSupport.park(LockSupport.java:175)
        at 
java.util.concurrent.locks.AbstractQueuedSynchronizer$ConditionObject.await(AbstractQueuedSynchronizer.java:2039)
        at 
java.util.concurrent.ArrayBlockingQueue.put(ArrayBlockingQueue.java:353)
        at org.apache.bookkeeper.bookie.Journal.logAddEntry(Journal.java:863)
        at org.apache.bookkeeper.bookie.Journal.logAddEntry(Journal.java:852)
        at org.apache.bookkeeper.bookie.Journal.logAddEntry(Journal.java:842)
        at 
org.apache.bookkeeper.bookie.Bookie.addEntryInternal(Bookie.java:1265)
   ```
   And also, there are only two threads for the journal left which means one 
journal thread exists.
   So, all `addEntry` requests to this journal will be blocked after the queue 
is full, and eventually, all `bookie-io` threads will be blocked.
   
   
   
   ***Expected behavior***
   
   Bookie should suicide at the point the journal thread exit.
   
   
   ***Additional context***
   
   
   


-- 
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.

To unsubscribe, e-mail: [email protected]

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


Reply via email to