[SRU] Linphone 5.0.2-4 crashes on launch

Bug #2047458 reported by Tej A. Shah, DMD
20
This bug affects 2 people
Affects Status Importance Assigned to Milestone
linphone (Ubuntu)
Fix Released
Undecided
Unassigned
Mantic
Fix Released
Undecided
Unassigned

Bug Description

[ Impact ]

linphone is completely unusable in Mantic and Noble as it will always segfault if any user tries to run the application.

The problem is an affect of LTO and it works if its built with LTO disabled.
Looking at the trace and some debugging it appears that linphone is trying to insert the address in the Cache before LruCache object has been initialized and as a result the capacity of the Cache is 0. But this only happens if LTO is enabled. On a non-LTO build the LruCache object is ready from the start.

[ Test Plan ]

 * Run linphone and confirm the gui starts

[ Where problems could occur ]

 This is only a check of the Cache capacity before linphone tries to add the address to the Cache. A worst case possibility is that LruCache is never initialized and that will mean the addresses will never be saved in the Cache list. So, any user who has used linphone on releases pre-Mantic might see that addesses they have used are not available in the Cache. But that should not affect the normal funtioning.
For users of Mantic and Noble, linphone has never worked, so they will not see any difference.

[ Other Info ]
 * This only affects Mantic and Noble.

 * The test plan is just a basic test. Ideally someone who actually uses linphone should test.

 * The patch is not forwarded upstream as upstream has completely changed this part of the code and its not using LruCache anymore. This patch can be dropped when the package is updated to latest version.

[ Original Bug Description ]

If you attempt to launch Linphone (desktop) on Ubuntu 23.10 (which has version 5.0.2-4), it will crash.

This is the output:

2023-12-26 17:44:55:903 belle-sip-warning-There is no object pool created in thread [139832270873280]. Use belle_sip_object_pool_push() to create one. Unowned objects not unref'd will be leaked.
Segmentation fault (core dumped)

I can confirm this also affects Kubuntu 23.10 as well.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I have tested and can reproduce the issue on Mantic and Noble. I have also tested and confirmed that the previous releases are not affected.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

debdiff for Noble attached.

summary: - Linphone 5.0.2-4 crashes on launch
+ [SRU] Linphone 5.0.2-4 crashes on launch
Changed in linphone (Ubuntu):
status: New → Confirmed
Changed in linphone (Ubuntu Mantic):
status: New → Confirmed
description: updated
Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

Debdiff for Mantic attached.

tags: added: mantic noble
Revision history for this message
Lena Voytek (lvoytek) wrote :

Thank you for the patches for mantic and noble! The content of each looks good to me. My only recommendation would be to have a more descriptive filename for the patch. I'll go ahead and sponsor these.

Also I created a PPA for testing and confirmed the application launches properly on my end:
https://launchpad.net/~lvoytek/+archive/ubuntu/linphone-fix-segfault

Changed in linphone (Ubuntu):
status: Confirmed → In Progress
Changed in linphone (Ubuntu Mantic):
status: Confirmed → In Progress
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linphone - 5.2.0-4.1ubuntu1

---------------
linphone (5.2.0-4.1ubuntu1) noble; urgency=medium

  * Fix segfault by using Cache after its initialized. (LP: #2047458)

 -- Sudip Mukherjee <email address hidden> Thu, 04 Jan 2024 22:25:39 +0000

Changed in linphone (Ubuntu):
status: In Progress → Fix Released
Revision history for this message
Simon Chopin (schopin) wrote :

Unsubscribing ubuntu-sponsors as everything looks to have been uploaded, the mantic package is still in the SRU queue.

Revision history for this message
Timo Aaltonen (tjaalton) wrote : Please test proposed package

Hello Tej, or anyone else affected,

Accepted linphone into mantic-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/linphone/5.2.0-4ubuntu0.23.10.1 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-mantic to verification-done-mantic. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-mantic. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

Changed in linphone (Ubuntu Mantic):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-mantic
Revision history for this message
Tej A. Shah, DMD (dentalotaku) wrote :

I just tested the fix via the PPA (https://launchpad.net/~lvoytek/+archive/ubuntu/linphone-fix-segfault). Linphone now launches without a crash! I made a few calls and they were fine as well. Therefore, I can confirm that this fix appears to fix the problem. Thank you.

Revision history for this message
Sudip Mukherjee (sudipmuk) wrote :

I can confirm the package from mantic-proposed opens linphone gui for me.

Tests done:
1. install linphone from mantic
2. try to start linphone and confirm that it fails
3. add mantic-proposed to apt sources
4. update linphone-cli from mantic-proposed
5. start linphone and confirm it starts

Test results:
The bug is fixed and linphone can be started.

Package tested:
$ dpkg -l | grep linphone
ii liblinphone++11:amd64 5.2.0-4ubuntu0.23.10.1 amd64 Linphone's shared library part (supporting the SIP protocol)
ii liblinphone11:amd64 5.2.0-4ubuntu0.23.10.1 amd64 Linphone's shared library part (supporting the SIP protocol)
ii linphone-cli 5.2.0-4ubuntu0.23.10.1 amd64 SIP softphone - console-only client
ii linphone-common 5.2.0-4ubuntu0.23.10.1 all Shared components of the linphone SIP softphone
ii linphone-desktop 5.0.2-4 amd64 SIP softphone - graphical client

tags: added: verification-done verification-done-mantic
removed: verification-needed verification-needed-mantic
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package linphone - 5.2.0-4ubuntu0.23.10.1

---------------
linphone (5.2.0-4ubuntu0.23.10.1) mantic; urgency=medium

  * Fix segfault by using Cache after its initialized. (LP: #2047458)

 -- Sudip Mukherjee <email address hidden> Fri, 05 Jan 2024 00:42:23 +0000

Changed in linphone (Ubuntu Mantic):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Update Released

The verification of the Stable Release Update for linphone has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.