You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@bookkeeper.apache.org by "Sijie Guo (JIRA)" <ji...@apache.org> on 2013/08/08 04:01:49 UTC

[jira] [Commented] (BOOKKEEPER-669) Race condition in ledger deletion and eviction from cache

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

Sijie Guo commented on BOOKKEEPER-669:
--------------------------------------

this would be addressed on part of BOOKKEEPER-659, which we are using concurrent structures. if this jira is marked to resolve in 4.2.2, you might need to generate a simple fix for it. 
                
> Race condition in ledger deletion and eviction from cache
> ---------------------------------------------------------
>
>                 Key: BOOKKEEPER-669
>                 URL: https://issues.apache.org/jira/browse/BOOKKEEPER-669
>             Project: Bookkeeper
>          Issue Type: Bug
>          Components: bookkeeper-server
>            Reporter: Matteo Merli
>
> There is a race condition between when a ledger is delete and an eviction from
> LedgerCache occur.
> The resulting exception is:
> {code}
> 14:06:24.754 [SyncThread] ERROR org.apache.bookkeeper.bookie.Bookie  -
> Exception in SyncThread
> java.lang.NullPointerException: null
>         at
> org.apache.bookkeeper.bookie.LedgerCacheImpl.evictFileInfoIfNecessary(LedgerCacheImpl.java:809)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
>         at
> org.apache.bookkeeper.bookie.LedgerCacheImpl.getFileInfo(LedgerCacheImpl.java:267)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
>         at
> org.apache.bookkeeper.bookie.LedgerCacheImpl.flushLedger(LedgerCacheImpl.java:425)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
>         at
> org.apache.bookkeeper.bookie.LedgerCacheImpl.flushLedger(LedgerCacheImpl.java:382)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
>         at
> org.apache.bookkeeper.bookie.InterleavedLedgerStorage.flush(InterleavedLedgerStorage.java:167)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
>         at org.apache.bookkeeper.bookie.Bookie$SyncThread.run(Bookie.java:330)
> ~[bookkeeper-server-4.2.1.15.jar:4.2.2-SNAPSHOT]
> 14:06:24.755 [SyncThread] INFO  org.apache.bookkeeper.bookie.Bookie  -
> Triggering shutdown of Bookie-3181 with exitCode 5
> 14:06:24.768 [BookieShutdownTrigger] INFO  org.apache.bookkeeper.bookie.Bookie 
> - Shutting down Bookie-3181 with exitCode 5
> 14:06:24.769 [BookieJournal-3181] WARN  org.apache.bookkeeper.bookie.Journal -
> Journal exits when shutting down
> {code}
> The problem is that the openLedger list is a normal LinkedList and sometimes is
> modified while synchronizing on fileInfoCache, other times on openLedgers, and
> in other places it is accessed without synchronizing.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira