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

Congxian Qiu commented on FLINK-23346:
--------------------------------------

[~yunta] Yes, env->ExceptionCheck() is true, it's some serializer exception 
from RocksDbTtlCompactionFilter, still debug why the exception can happen now.

> RocksDBStateBackend may core dump in flink_compactionfilterjni.cc
> -----------------------------------------------------------------
>
>                 Key: FLINK-23346
>                 URL: https://issues.apache.org/jira/browse/FLINK-23346
>             Project: Flink
>          Issue Type: Bug
>          Components: Runtime / State Backends
>    Affects Versions: 1.14.0, 1.13.1, 1.12.4
>            Reporter: Congxian Qiu
>            Priority: Major
>
> The code in [flink_compactionfilte.cpp 
> |https://github.com/ververica/frocksdb/blob/49bc897d5d768026f1eb816d960c1f2383396ef4/java/rocksjni/flink_compactionfilterjni.cc#L21]
> {code:cpp}
>     inline void CheckAndRethrowException(JNIEnv* env) const {
>     if (env->ExceptionCheck()) {
>       env->ExceptionDescribe();
>       env->Throw(env->ExceptionOccurred());
>     }
> {code}
> may core dump in some sence, please see more information here[1][2][3]
> We can fix it by changing this to
> {code:cpp}
>     inline void CheckAndRethrowException(JNIEnv* env) const {
>     if (env->ExceptionCheck()) {
>       env->Throw(env->ExceptionOccurred());
>     }
>   }
> {code}
> or
> {code:cpp}
>    inline void CheckAndRethrowException(JNIEnv* env) const {
>     if (env->ExceptionCheck()) {
>       jobject obj = env->ExceptionOccurred();
>       env->ExceptionDescribe();
>       env->Throw(obj);
>     }
>   }
> {code}
> [1] 
> [https://stackoverflow.com/questions/30971068/does-jniexceptiondescribe-implicitily-clear-the-exception-trace-of-the-jni-env]
>  [2] [https://bugs.openjdk.java.net/browse/JDK-4067541]
>  [3] [https://bugs.openjdk.java.net/browse/JDK-8051947]



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to