couchbase-lite-core icon indicating copy to clipboard operation
couchbase-lite-core copied to clipboard

Crash in JNI from Android: null pointer dereference

Open lhg-turingvideo opened this issue 3 years ago • 4 comments

Revision: '0'
ABI: 'arm64'
pid: 6909, tid: 6957, name: Thread-7852944
signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0xc
Cause: null pointer dereference
    x0   0000007e246f6440  x1   000000000000000c  x2   0000007e24e00000  x3   0000000000000009
    x4   0000000000000044  x5   0000007dde779258  x6   6f72702050494c42  x7   7265206c6f636f74
    x8   0000007e28486f28  x9   0000000000000000  x10  0000000000000000  x11  0000000000000000
    x12  0000000000000002  x13  0000000000000002  x14  000bbb7c16e0d02a  x15  0000536a54e22371
    x16  0000007e284a8e80  x17  0000007e283a8154  x18  0000000000000455  x19  0000007dc87253c0
    x20  0000007daeb85020  x21  0000007e24e44680  x22  0000007e2780b180  x23  0000007e3a305d00
    x24  0000007e2847c4e8  x25  0000000000000001  x26  0000007e3a305d08  x27  0000007e0596dad8
    x28  0000007e284b15d0  x29  0000007e2780b080  x30  0000007e281e92dc
    sp   0000007e2780b070  pc   0000007e281b2b98  pstate 0000000060000000
    v0   00000000000000000000000a00000001  v1   00000000000000000000000040e00000
    v2   00000000000000000000000041300000  v3   00000000000000000000007eca148524
    v4   00000000000000000000000040100400  v5   00000000000000004010040140100401
    v6   00000000000000005540005455545554  v7   00000000000000003dbb9438ca9aadd5
    v8   00000000000000000000000000000000  v9   00000000000000000000000000000000
    v10  00000000000000000000000000000000  v11  00000000000000000000000000000000
    v12  00000000000000000000000000000000  v13  00000000000000000000000000000000
    v14  00000000000000000000000000000000  v15  00000000000000000000000000000000
    v16  40100401401004014010040140100401  v17  400040004000000040404000a800a800
    v18  40000000400000004000000000000000  v19  000000000000000000000000ebad8083
    v20  000000000000000000000000ebad8084  v21  000000000000000000000000ebad8085
    v22  000000000000000000000000ebad8086  v23  000000000000000000000000ebad8087
    v24  000000000000000000000000ebad8088  v25  000000000000000000000000ebad8089
    v26  000000000000000000000000ebad808a  v27  000000000000000000000000ebad808b
    v28  000000000000000000000000ebad808c  v29  000000000000000000000000ebad808d
    v30  000000000000000000000000ebad808e  v31  000000000000000000000000ebad808f
    fpsr 00000013  fpcr 00000000

backtrace:
    #00 pc 0000000000270b98  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so
    #01 pc 00000000002a72d8  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so (litecore::websocket::MessageImpl::~MessageImpl()+48)
    #02 pc 000000000029823c  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so (litecore::blip::BLIPIO::_onWebSocketMessages(int)+1796)
    #03 pc 00000000002aa4d4  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so (litecore::actor::ThreadedMailbox::safelyCall(std::__ndk1::function<void ()> const&) const+36)
    #04 pc 00000000002abd0c  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so
    #05 pc 00000000002a9c24  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so (litecore::actor::ThreadedMailbox::performNextMessage()+160)
    #06 pc 00000000002a9a30  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so (litecore::actor::Scheduler::task(unsigned int)+152)
    #07 pc 00000000002aa9ac  /data/app/com.turingvideo.robot-T1A7bIzcEAYG3fITT_hfRw==/lib/arm64/libLiteCoreJNI.so
    #08 pc 0000000000067d84  /system/lib64/libc.so (__pthread_start(void*)+36)
    #09 pc 000000000001ec18  /system/lib64/libc.so (__start_thread+68)

lhg-turingvideo avatar Mar 25 '22 07:03 lhg-turingvideo

Version? Circumstances?

borrrden avatar Mar 31 '22 02:03 borrrden

Circumstances 2.8.0

03-24 10:06:17.180 I/CouchbaseManager$Abstra( 6909): Replication type: PUSH 03-24 10:06:17.183 I/CouchbaseManager$Abstra( 6909): Document ID: 03-24 10:06:17.191 E/CouchbaseLite/REPLICATOR( 6909): {Repl#903} Got LiteCore error: WebSocket error 1001 "WebSocket connection closed by peer"

03-24 10:06:17.194 I/Camera360Agent( 6909): checking 360camera status: health = false, status = DEVICE_NOT_READY, caption = 360 device not found or waiting permission 03-24 10:06:17.196 I/RosCliNode$6( 6909): set depth camera 2 enable success, enable=true 03-24 10:06:17.198 E/CouchbaseLite/REPLICATOR( 6909): {C4Replicator#5} State: busy, progress=99.07%, error=WebSocket error 1001 "WebSocket connection closed by peer" 03-24 10:06:17.200 E/CouchbaseLite/NETWORK( 6909): {N8litecore4blip6BLIPIOE#905} Caught exception handling incoming BLIP message: BLIP protocol error: Bad incoming RES #266 (no request waiting) 03-24 10:06:17.201 I/RosCliNode( 6909): calling set depth camera 1 enable service, enable=true --------- beginning of crash 03-24 10:06:17.203 F/libc ( 6909): Fatal signal 11 (SIGSEGV), code 1, fault addr 0xc in tid 6957 (Thread-7852944), pid 6909 (ringvideo.robot) 03-24 10:06:17.222 I/scrcpy ( 1341): ======> HEAD:(12) 65870606053:1594 03-24 10:06:17.237 I/scrcpy ( 1341): ======> HEAD:(12) 65870621884:844 03-24 10:06:17.269 I/RosCliNode( 6909): calling set depth camera 2 enable service, enable=true 03-24 10:06:17.271 E/CouchbaseManager$Abstra( 6909): CouchbaseLiteException{CouchbaseLite,11001,'WebSocket connection closed by peer 03-24 10:06:17.271 E/CouchbaseManager$Abstra( 6909): (CouchbaseLite Android v2.8.0-SNAPSHOT (CE/release, Commit/[email protected] Core/0.0.0 (e2588435+) at 2020-12-09T03:51:32.486249Z) on Java; Android 8.1.0; rk3399_navigation)'}

lhg-turingvideo avatar Mar 31 '22 03:03 lhg-turingvideo

With an issue like this it is not likely that the cause will be found just from the logs. These BLIP errors happen exceedingly rarely and the cause is not clear. Sadly without a reproduction the only thing I can recommend is to keep trying newer versions.

borrrden avatar Sep 06 '22 02:09 borrrden