brandoncheah
Posts: 31
Joined: Thu Sep 27, 2018 9:52 am

Linphone console application Segmentation fault

Fri Mar 01, 2019 9:12 am

I've been using linphone console application (linphonec) in the RPi 3 B+ and it works fine until yesterday, when an outgoing call is being dialed for about 2seconds, it shows segmentation fault and exits the console application.

tried to debug using gdb and I get the following messages:

Code: Select all

gdb ./linphonec
run --verbose
(gdb) run -C
Starting program: /home/pi/linphone-desktop/OUTPUT/no-ui/bin/linphonec -C
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
[New Thread 0x70c7d320 (LWP 1683)]
[New Thread 0x602ff320 (LWP 1684)]
[New Thread 0x602ff320 (LWP 1685)]
[Thread 0x602ff320 (LWP 1684) exited]
[Thread 0x602ff320 (LWP 1685) exited]
[New Thread 0x602ff320 (LWP 1686)]
linphonec> 2019-03-01 16:44:53:344 belle-sip-error-stream connect failed Network is unreachable
2019-03-01 16:44:53:344 belle-sip-error-Cannot connect to [TLS://sip.linphone.org:5223]

linphonec> 
linphonec> call myusername
Establishing call id to sip:myusername@sip.linphone.org, assigned id 1
[New Thread 0x6407b320 (LWP 1688)]
[New Thread 0x6387a320 (LWP 1689)]
linphonec> Call 1 to sip:myusername@sip.linphone.org in progress.
[New Thread 0x62cff320 (LWP 1690)]
[New Thread 0x624fe320 (LWP 1691)]
Call 1 to sip:myusername@sip.linphone.org ringing.

Thread 1 "linphonec" received signal SIGSEGV, Segmentation fault.
__GI_strcmp (p1=<optimized out>, p2=<optimized out>) at strcmp.c:39
39	strcmp.c: No such file or directory.
(gdb) bt
#0  __GI_strcmp (p1=<optimized out>, p2=<optimized out>) at strcmp.c:39
#1  0x7661c3d4 in _belle_sip_dialog_match () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#2  0x7663eb50 in belle_sip_client_transaction_notify_response () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#3  0x76638b90 in belle_sip_provider_dispatch_message () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#4  0x76617114 in belle_sip_channel_process_stream () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#5  0x76619000 in belle_sip_channel_process_data () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#6  0x76641570 in tls_process_data () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#7  0x7660b33c in belle_sip_main_loop_run () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#8  0x7660b834 in belle_sip_main_loop_sleep () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/libbellesip.so.0
#9  0x76f1ea88 in linphone_core_iterate () from /home/pi/linphone-desktop/OUTPUT/no-ui/lib/liblinphone.so.9
#10 0x00015fb4 in linphonec_idle_call ()
#11 0x00016148 in linphonec_readline ()
#12 0x00014d88 in main ()
Have no idea how to solve this :

Code: Select all

Thread 1 "linphonec" received signal SIGSEGV, Segmentation fault.
__GI_strcmp (p1=<optimized out>, p2=<optimized out>) at strcmp.c:39
39	strcmp.c: No such file or directory.
Please give some advice. cheers

User avatar
topguy
Posts: 6995
Joined: Tue Oct 09, 2012 11:46 am
Location: Trondheim, Norway

Re: Linphone console application Segmentation fault

Fri Mar 01, 2019 12:02 pm

Code: Select all

linphonec> 2019-03-01 16:44:53:344 belle-sip-error-stream connect failed Network is unreachable
2019-03-01 16:44:53:344 belle-sip-error-Cannot connect to [TLS://sip.linphone.org:5223]
Is this normal/expected ?

brandoncheah
Posts: 31
Joined: Thu Sep 27, 2018 9:52 am

Re: Linphone console application Segmentation fault

Sat Mar 02, 2019 2:27 am

I couldn't confirm that whether this is expected/normal, because sometimes this error pops out and sometimes it doesn't.
Besides, even though previously this errors appears, I am still able to dial outgoing calls without any problem, therefore I always ignore these errors

Alexlizx
Posts: 1
Joined: Fri Feb 07, 2020 4:00 pm

Re: Linphone console application Segmentation fault

Fri Feb 07, 2020 4:07 pm

Yes, I am having the same problem as well. When I ran gdb I got this:
Receiving new incoming call from sip:xxx@xxx, assigned id x

linphonec> answer

Thread 1 "linphonec" received signal SIGSEGV, Segmentation fault.
0x004624ee in linphone_call_accept_with_params ()
(gdb) bt
#0 0x004624ee in linphone_call_accept_with_params ()
#1 0x00443d50 in ()
I found two github patches that seem to relate to this bug. The problem is, they are for liblinphone and need to be compiled from source. I am very confused as to how to exactly change the source code and build from source.
https://github.com/BelledonneCommunicat ... l/57/files
https://github.com/BelledonneCommunicat ... 68e110be89

Another interesting I found out is that the regular gnu version of linphone works just fine. Only the console version has the segmentation fault. Aren't both versions running on the same source codes?

ganzgustav22
Posts: 143
Joined: Tue Feb 11, 2020 1:04 pm

Re: Linphone console application Segmentation fault

Fri Mar 20, 2020 11:52 am

Just spent a day on figuring out the mess the linphone guys did.
Here are instruction on how to build linphonec for the Raspberry Pi:
https://github.com/BelledonneCommunicat ... -601643110

Return to “Advanced users”