|
From: | Malgorzata Burek |
Subject: | Re: [Linphone-developers] Linphone core restart crash |
Date: | Thu, 18 Jan 2018 16:33:05 +0000 |
User-agent: | Zoho Mail |
ExpertLinks
Sharing Recruiting
Mgr Margaret Burek, Headhunter & Business Partner
_______________________________________________Hi Linphone dev group.
I need your help with a crash that I am trying to fix.
When logging in (successfully or not) by using remote provisioning, the linphone core is restarted, i.e. it is destroyed and then created again with a new configuration.
The problem is that there is a race condition somewhere and it results in the app crashing after a core restart or two. This happens in the official linphone app on the android store as well.
The issue probably is that a postdelayed thread tries to open the "new core" to get the information needed, but it is not created yet and the previous one was just destroyed.
I found something that resembles a small error in LinphoneManager.java in restartLinphoneCore function :
public void restartLinphoneCore() {as you can see it is not synchronized. The destroyLinphoneCore, where sExited is set to true and startLibLinphone functions are, but this means that in case the linphone core is destroyed. it can be started again, switch to another UI thread (with sExited=true), go into an lc_destoyed if condition and return null, and then switch to this thread again and change to sExited=false.
destroyLinphoneCore();
startLibLinphone(mServiceContext);
sExited = false;
}
I.e. either sExited should be inside startLibLinphone, or restartLinphoneCore should be syncronized.
However, even with this change, if you try to login with remote credentials on two different devices (Huawei P10 Lite and Pixel 2XL) it crashes, as it does on any other device if you give incorrect credentials multiple times. (i.e. restarting the core multiple times) with the same error on logcat :
01-09 12:33:23.333 22541 22550 F libc : Fatal signal 11 (SIGSEGV), code 2, fault addr 0x741cb79a30 in tid 22550 (FinalizerDaemon)
01-09 12:33:23.442 22780 22780 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-09 12:33:23.442 22780 22780 F DEBUG : Build fingerprint: 'HUAWEI/WAS-LX1/HWWAS-H:7.0/HUAWEIWAS-LX1/C432B192:user/release-keys'
01-09 12:33:23.442 22780 22780 F DEBUG : Revision: '0'
01-09 12:33:23.442 22780 22780 F DEBUG : ABI: 'arm64'
01-09 12:33:23.442 22780 22780 F DEBUG : pid: 22541, tid: 22550, name: FinalizerDaemon >>> org.linphone.softphone <<<
01-09 12:33:23.442 22780 22780 F DEBUG : signal 11 (SIGSEGV), code 2 (SEGV_ACCERR), fault addr 0x741cb79a30
01-09 12:33:23.442 22780 22780 F DEBUG : x0 000000743d6ac420 x1 000000743d780800 x2 000000743d600000 x3 0000000000000006
01-09 12:33:23.442 22780 22780 F DEBUG : x4 0000000000000180 x5 000000743547f682 x6 0000000000000001 x7 0000000000000000
01-09 12:33:23.442 22780 22780 F DEBUG : x8 000000741cb79a30 x9 000000743d67eb88 x10 0000000000000180 x11 0000000000000000
01-09 12:33:23.442 22780 22780 F DEBUG : x12 00000000000000c4 x13 0000000000000046 x14 00000074411392d0 x15 e53a9d934d105b07
01-09 12:33:23.442 22780 22780 F DEBUG : x16 000000741edeee80 x17 000000741e377f30 x18 00000000ffffffff x19 000000743d6d1e00
01-09 12:33:23.442 22780 22780 F DEBUG : x20 000000743c4eb6d0 x21 000000743d6d1e00 x22 000000743bd438dc x23 000000743547f682
01-09 12:33:23.442 22780 22780 F DEBUG : x24 000000000000000c x25 7850437e25e01813 x26 000000743d6d1e98 x27 7850437e25e01813
01-09 12:33:23.442 22780 22780 F DEBUG : x28 0000000000000003 x29 000000743bd43570 x30 000000741e377d40
01-09 12:33:23.442 22780 22780 F DEBUG : sp 000000743bd43550 pc 000000741cb79a30 pstate 0000000020000000
01-09 12:33:23.449 22780 22780 F DEBUG :
01-09 12:33:23.449 22780 22780 F DEBUG : backtrace:
01-09 12:33:23.449 22780 22780 F DEBUG : #00 pc 0000000000179a30 [anon:libc_malloc:000000741ca00000]
01-09 12:33:23.449 22780 22780 F DEBUG : #01 pc 0000000000accd3c /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so
01-09 12:33:23.449 22780 22780 F DEBUG : #02 pc 0000000000be5f50 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (belle_sip_object_delete+116)
01-09 12:33:23.449 22780 22780 F DEBUG : #03 pc 0000000000be5d54 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (belle_sip_object_unref+416)
01-09 12:33:23.449 22780 22780 F DEBUG : #04 pc 0000000000ac9d64 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (linphone_account_creator_unref+20)
01-09 12:33:23.449 22780 22780 F DEBUG : #05 pc 0000000000b78fbc /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (Java_org_linphone_core_LinphoneAccountCreatorImpl_unref+52)
01-09 12:33:23.449 22780 22780 F DEBUG : #06 pc 000000000031c2f8 /data/app/org.linphone.softphone-1/oat/arm64/base.odex (offset 0x2d6000)
01-09 13:24:48.518 29580 29591 F libc : Fatal signal 7 (SIGBUS), code 1, fault addr 0x3d65646f6d203b in tid 29591 (FinalizerDaemon)
01-09 13:24:48.643 29924 29924 F DEBUG : *** *** *** *** *** *** *** *** *** *** *** *** *** *** *** ***
01-09 13:24:48.644 29924 29924 F DEBUG : Build fingerprint: 'HUAWEI/WAS-LX1/HWWAS-H:7.0/HUAWEIWAS-LX1/C432B192:user/release-keys'
01-09 13:24:48.644 29924 29924 F DEBUG : Revision: '0'
01-09 13:24:48.644 29924 29924 F DEBUG : ABI: 'arm64'
01-09 13:24:48.644 29924 29924 F DEBUG : pid: 29580, tid: 29591, name: FinalizerDaemon >>> org.linphone.softphone <<<
01-09 13:24:48.644 29924 29924 F DEBUG : signal 7 (SIGBUS), code 1 (BUS_ADRALN), fault addr 0x3d65646f6d203b
01-09 13:24:48.644 29924 29924 F DEBUG : x0 000000743d6ac880 x1 000000741efefa40 x2 000000741ee00000 x3 0000000000000006
01-09 13:24:48.644 29924 29924 F DEBUG : x4 00000000000001ef x5 000000743547f682 x6 0000000000000001 x7 0000000000000000
01-09 13:24:48.644 29924 29924 F DEBUG : x8 413d65646f6d203b x9 000000743d67eb88 x10 00000000000001ef x11 0000000000000000
01-09 13:24:48.644 29924 29924 F DEBUG : x12 00000000000000c4 x13 00000000000000b4 x14 0000007441139310 x15 b47a0f36892fcba7
01-09 13:24:48.644 29924 29924 F DEBUG : x16 000000741dd0fe80 x17 000000741d298f30 x18 00000000ffffffff x19 00000074327cd400
01-09 13:24:48.644 29924 29924 F DEBUG : x20 000000743c4eb6d0 x21 00000074327cd400 x22 000000743bd438dc x23 000000743547f682
01-09 13:24:48.644 29924 29924 F DEBUG : x24 000000000000000c x25 7850437e25e01813 x26 00000074327cd498 x27 7850437e25e01813
01-09 13:24:48.644 29924 29924 F DEBUG : x28 0000000000000003 x29 000000743bd43570 x30 000000741d298d40
01-09 13:24:48.644 29924 29924 F DEBUG : sp 000000743bd43550 pc 003d65646f6d203b pstate 0000000020000000
01-09 13:24:48.654 29924 29924 F DEBUG :
01-09 13:24:48.654 29924 29924 F DEBUG : backtrace:
01-09 13:24:48.654 29924 29924 F DEBUG : #00 pc 003d65646f6d203b <unknown>
01-09 13:24:48.654 29924 29924 F DEBUG : #01 pc 0000000000accd3c /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so
01-09 13:24:48.654 29924 29924 F DEBUG : #02 pc 0000000000be5f50 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (belle_sip_object_delete+116)
01-09 13:24:48.654 29924 29924 F DEBUG : #03 pc 0000000000be5d54 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (belle_sip_object_unref+416)
01-09 13:24:48.654 29924 29924 F DEBUG : #04 pc 0000000000ac9d64 /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (linphone_account_creator_unref+20)
01-09 13:24:48.655 29924 29924 F DEBUG : #05 pc 0000000000b78fbc /data/app/org.linphone.softphone-1/lib/arm64/liblinphone.so (Java_org_linphone_core_LinphoneAccountCreatorImpl_unref+52)
01-09 13:24:48.655 29924 29924 F DEBUG : #06 pc 000000000031c2f8 /data/app/org.linphone.softphone-1/oat/arm64/base.odex (offset 0x2d6000)
This can be bypassed by never calling destroyLinphoneCore, but this allows multiple cores to exist i suppose, which seems to be a ticking bomb.
Could you suggest a fix on that one? Or something I could try to fix it?
BR
Ioannis
Linphone-developers mailing list
address@hidden
https://lists.nongnu.org/mailman/listinfo/linphone-developers
[Prev in Thread] | Current Thread | [Next in Thread] |