Bug 1181746 - linphone crashes on start if ~/.local/share/linphone/linphone.db exists
linphone crashes on start if ~/.local/share/linphone/linphone.db exists
Status: RESOLVED FIXED
Classification: openSUSE
Product: openSUSE Tumbleweed
Classification: openSUSE
Component: Other
Current
x86-64 openSUSE Tumbleweed
: P5 - None : Normal (vote)
: ---
Assigned To: Mariusz Fik
E-mail List
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2021-02-03 13:34 UTC by Rolf Eike Beer
Modified: 2021-09-27 20:24 UTC (History)
6 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments
Linphone crash from CLI (23.71 KB, text/plain)
2021-02-19 17:03 UTC, Stakanov Schufter
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Rolf Eike Beer 2021-02-03 13:34:27 UTC
linphone-4.2.1-2.2.x86_64

Looks like this:

[07:47:27:955][0x55e1bd3e47c0][Info]"Running app..."
[07:47:27:957][0x55e1bd3e47c0][Info]"Activated selectors:" ("custom", "de_DE", "unix", "linux", "opensuse-tumbleweed")
[07:47:27:957][0x55e1bd3e47c0][Info]"Registering types..."
[07:47:27:957][0x55e1bd3e47c0][Info]"Registering shared types..."
[07:47:27:957][0x55e1bd3e47c0][Info]"Registering tool types..."
[07:47:27:957][0x55e1bd3e47c0][Info]"Registering shared tool types..."
[07:47:27:994][0x55e1bd3e47c0][Info]"Loading main view..."
[07:47:28:031][0x55e1bd3e47c0][Info]"Launch async core creation."
Abgebrochen (Speicherabzug geschrieben)

Removing that file fixes it. This happens every once in a while when this file gets recreated by something, afterwards I wipe it to get things working again without any negative effect I can see.
Comment 1 Florian Zumkeller-Quast 2021-02-10 15:34:25 UTC
I just experienced the same behaviour. Just seconds before filing another bug submission of my own I just checked if the deletion of said file would help in my case (or, to be more specific: I renamed the file by appending .old to the file name). And it does fix it.

What I wrote for my bug submission:
Linphone stopped working for me (It used to work on this very tumbleweed installation a few days ago) and crashes (silently from the gui or when run from the shell without the verbose flag).

The verbose flag on the command line seems to reveal the problem:

$ linphone -V
<snip ...>
[16:19:10:629][Info]Core:linphone: Invalidating friends maps for list [0x55b434476f60]
[16:19:10:630][Info]Core:linphone: Core callbacks [0x55b43473cfd0] registered on core [0x55b4346cb140]
[16:19:10:630][Info]Core:linphone: Linphone core [0x55b4346cb140] notified [global_state_changed]
[16:19:10:630][Info]Core:linphone: Opening linphone database <snip>/.local/share/linphone/linphone.db with backend Sqlite3
[16:19:10:631][Info]Core:linphone: Start measurement of [Get chat rooms.].
[16:19:10:632][Error]Core:linphone: Could not load grammar identity_grammar because the file could not be located.

I first tried to remove and reinstall the package, but it keeps crashing with the very same error. It looks to me like it could be a version mismatch error as all other linphone-* packages seem to be version 4.4.0 and the package itself is only available in version 4.2.1 - but it could be very well something else due to the fact that the deletion of the said file in the homedir seems to fix the problem.

zypper> in linphone
<snip ..>
Continue? [y/n/v/...? shows all options] (y): v

The following 6 NEW packages are going to be installed:
  liblinphone++10   4.4.0-2.1
  liblinphone10     4.4.0-2.1
  liblinphone-data  4.4.0-2.1
  liblinphone-lang  4.4.0-2.1
  linphone          4.2.1-2.3
  linphone-cli      4.4.0-2.1
Comment 2 Stakanov Schufter 2021-02-19 17:03:07 UTC
Created attachment 846326 [details]
Linphone crash from CLI

I am also hit by what the OP experience. I confirm this bug for the current TW.
Prior to the latest large update Linphone did work well, now it dumps core.
I join the output from CLI.
Comment 3 S. B. 2021-03-02 20:17:33 UTC
Thanks for the tip on removing the linphone.db file. Another option meanwhile is to use the Linphone AppImage, seems to work well.
Comment 4 Luiz Angelo Daros de Luca 2021-03-24 23:20:02 UTC
I'm joining the club.

It looks like it calls 

/usr/src/debug/belr-4.4.0-1.4.x86_64/src/grammarbuilder.cpp
shared_ptr<Grammar> GrammarLoader::load(const string &fileName){

With "identity_grammar" as fileName.

It should exist a identity_grammar file, just like this one:

/usr/share/belr/grammars/vcard_grammar

That seems to be added only to -devel:

https://build.opensuse.org/package/view_file/network:telephony/linphone/linphone.spec?expand=1

If you install liblinphone-devel, it will launch as expected.
Comment 5 Luiz Angelo Daros de Luca 2021-04-16 02:32:24 UTC
I just submitted an update to linphoneqt (4.2.5) and company (4.5.3).

https://download.opensuse.org/repositories/home:/luizluca:/branches:/network:/telephony/openSUSE_Factory/
Comment 6 Rolf Eike Beer 2021-04-16 05:21:54 UTC
I updated linphone* and liblinphone*, but there is are some dependencies missing:

linphone: symbol lookup error: /usr/bin/../lib64/liblinphone.so.10: undefined symbol: belle_sip_stack_create_http_provider_with_transports

Installed libbellesip1-4.5.3-43.1.x86_64.rpm

linphone: symbol lookup error: /usr/bin/../lib64/liblinphone.so.10: undefined symbol: _ZN4lime11LimeManager14stale_sessionsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEES8_

Installed liblime0-4.5.3-8.1.x86_64.rpm

Finally worked…
Comment 7 Luiz Angelo Daros de Luca 2021-04-16 16:48:39 UTC
(In reply to Rolf Eike Beer from comment #6)
> I updated linphone* and liblinphone*, but there is are some dependencies
> missing:
> 
> linphone: symbol lookup error: /usr/bin/../lib64/liblinphone.so.10:
> undefined symbol: belle_sip_stack_create_http_provider_with_transports
> 
> Installed libbellesip1-4.5.3-43.1.x86_64.rpm
> 
> linphone: symbol lookup error: /usr/bin/../lib64/liblinphone.so.10:
> undefined symbol:
> _ZN4lime11LimeManager14stale_sessionsERKNSt7__cxx1112basic_stringIcSt11char_t
> raitsIcESaIcEEES8_
> 
> Installed liblime0-4.5.3-8.1.x86_64.rpm
> 
> Finally worked…

A simple "zypper up" didn't offer me to update liblinphone. Upstream project broke ABI without changing the %{sover} (version number after libXXX.so). So, the new linphoneqt does not ask for an updated liblinphone.so. The same might happen for every other library. I could manually add a dependency to libXXX but rpmlint will blame me that manual library dependencies is not the right way to do it.

Anyway, I think "update" is not supported in tumbleweed/factory. A "zypper dup" might do the job.

I'm not sure the upstream project uses the best practices for versions and dependencies. pkgconfig versions, for example, always use patchlevel 0 (4.5.0) even when library is actually 4.5.3.

They also recover version from .git or its SDK folder (I guess SDK consists of the sum of all libraries). However, while building in OBS, both options are missing. I got a patch from archlinux to workaround this issue.
https://github.com/BelledonneCommunications/linphone-desktop/issues/415
Comment 8 Giacomo Comes 2021-09-27 20:24:53 UTC
This bug was probably due to the fact that the grammar file from the package belle-sip was missing. Such file was packaged in the rpm belle-sip-devel 
which normally in not installed.
I have repackaged the grammar file in the rpm belle-sip-data, which is now installed automatically with linphone.
Please update or install linphone from network:telephony to fix your problem.