You are viewing a plain text version of this content. The canonical link for it is here.
Posted to jira@kafka.apache.org by "Matthias J. Sax (JIRA)" <ji...@apache.org> on 2019/05/09 12:44:00 UTC

[jira] [Commented] (KAFKA-8343) streams application crashed due to rocksdb

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

Matthias J. Sax commented on KAFKA-8343:
----------------------------------------

I don't think that the code is executed in a different order. However, the may still be a race condition...

> streams application crashed due to rocksdb
> ------------------------------------------
>
>                 Key: KAFKA-8343
>                 URL: https://issues.apache.org/jira/browse/KAFKA-8343
>             Project: Kafka
>          Issue Type: Bug
>          Components: streams
>    Affects Versions: 1.0.0
>         Environment: centos 7 jdk8 kafka-streams1.0
>            Reporter: gaoshu
>            Priority: Major
>         Attachments: fullsizeoutput_6.jpeg
>
>
> my streams application always crashed in few days.  The crash log looks like [https://github.com/facebook/rocksdb/issues/5234|[https://github.com/facebook/rocksdb/issues/5234].]  so I think it may because of RocksDBStore.java closed incorrectly in multithread.  I look through the below code,  it means the db.close()  should after openiterators.close(). However, db.close() may be executed before iterators.close() due to instructions reorder. I hope my guess is correct.
> {code:java}
> // RocksDBStore.java
> @Override
> public synchronized void close() {
>     if (!open) {
>         return;
>     }
>     open = false;
>     closeOpenIterators();
>     options.close();
>     wOptions.close();
>     fOptions.close();
>     db.close();
>     options = null;
>     wOptions = null;
>     fOptions = null;
>     db = null;
> }
> {code}



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)