Network error makes crash the whole application

Good morning,
We are trying the p2p feature with CB lite 2.8.1
We have a “master” device which is connecting to the SG (continuous pull/push) and it is going to be also the passive listener for the p2p network.

It happens quite often, and I don’t have understand if it’ related to the SG or P2P but it looks like when a client connects to the P2P the master brutally crashes.
Here you can find the stacktrace of the crash.

2021-03-03 10:39:57.068 4525-5969/? E/CouchbaseLite/NETWORK: {N8litecore9websocket16BuiltInWebSocketE#1} Unexpected or unclean socket disconnect! (reason=errno 32)
2021-03-03 10:39:57.068 4525-5969/? A/libc: Fatal signal 11 (SIGSEGV), code 1, fault addr 0x8 in tid 5969 (Thread-3792)
2021-03-03 10:39:57.069 4525-5962/? E/CouchbaseLite/REPLICATOR: {repl#2} Got LiteCore error: POSIX error 32 "Broken pipe"
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: Build fingerprint: 'Android-x86/android_x86_64/x86_64:7.1.2/N2G48H/lh05151409:userdebug/test-keys'
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: Revision: '0'
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: ABI: 'x86_64'
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: pid: 4525, tid: 5969, name: Thread-3792  >>> asten.epele.com.afame.qa <<<
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG: signal 11 (SIGSEGV), code 1 (SEGV_MAPERR), fault addr 0x8
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     rax de1474d0c1b98122  rbx 00007092081f60a0  rcx 0000000000000000  rdx 0000000000000002
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     rsi 0000000000000000  rdi 0000000000000000
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     r8  000000000000000a  r9  0000000000000000  r10 0000000000000000  r11 0000000000000246
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     r12 00007092081f60c0  r13 000070920affa748  r14 000070920a1fb2f0  r15 000070921f25a000
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     cs  0000000000000033  ss  000000000000002b
2021-03-03 10:39:57.135 6672-6672/? A/DEBUG:     rip 000070920acb1f70  rbp 0000000000000000  rsp 000070920a1fb288  eflags 0000000000010206
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG: backtrace:
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #00 pc 00000000002b6f70  /data/app/asten.epele.com.afame.qa-1/lib/x86_64/libLiteCoreJNI.so (deleted)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #01 pc 00000000002bbf07  /data/app/asten.epele.com.afame.qa-1/lib/x86_64/libLiteCoreJNI.so (deleted)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #02 pc 00000000002b5943  /data/app/asten.epele.com.afame.qa-1/lib/x86_64/libLiteCoreJNI.so (deleted)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #03 pc 00000000002b5ced  /data/app/asten.epele.com.afame.qa-1/lib/x86_64/libLiteCoreJNI.so (deleted)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #04 pc 00000000002b65d7  /data/app/asten.epele.com.afame.qa-1/lib/x86_64/libLiteCoreJNI.so (deleted)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #05 pc 0000000000089831  /system/lib64/libc.so (_ZL15__pthread_startPv+177)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #06 pc 0000000000029aab  /system/lib64/libc.so (__start_thread+11)
2021-03-03 10:39:57.139 6672-6672/? A/DEBUG:     #07 pc 000000000001cb25  /system/lib64/libc.so (__bionic_clone+53)

Could you please share the Android device version and model

… and also a lot more stacktrace. There’s no way we are going to figure out what went wrong from that tiny little clip.

It happened on several devices.
At the moment I am testing with a Pos PC X86 with android 7.1.2 API 25 and a Galaxy Tab A SM-T595 Android version 10

thanks for any help. It happened right now, this is the all the log I could get at the moment.
log_cb.zip (137.6 KB)

This does seem very suspicious and my first reaction is that it smells like a bug. This is the first time I’ve ever seen someone get this particular error before. Obviously it shouldn’t cause a crash but we will be hard pressed to prove that it doesn’t without a reproduction case. I’ll file a ticket to examine this area though. However the next time you get logs could you increase the Couchbase Lite log verbosity? Also since this is an Enterprise feature you might want to engage your Enterprise contact on this as well.

Hi, I’ve contacted our contact. I have also the log in verbose mode.
log_cb_verbose.zip (105.1 KB)

Thanks for any feedback. Have a nice day.

If you have filed a support ticket, we will continue to use that as our channel of communication to avoid confusion and redundant efforts