Segmentation fault when running pjsua demo app on Raspberry Pi

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello all,
 
I have successfully compiled and installed pjsip 2.7.2 on a Raspberry Pi with ARM Linux. But the problem I have now is that pjsip is permanently crashing with a segmentation fault. The segmentation fault even happens when I am using the pjsua demo application, so I am assuming that it cannot be possible related to wrong use of the pjsip library. The poblem occurs if I try to run the PJSUA demo app (located in the subdirectory "pjsip-apps/bin") with the following command line:
 
   ./pjsua-armv7l-unknown-linux-gnueabihf --realm="..." --username="..." --password="..." "sip:**701@xxxxxxxxx"
 
In order to find out where exactly the segmentation fault occured, I have compiled PJSIP with debug symbols and ran the pjsua app with GDB. This gave me the following stack trace:
Thread 3 "pjsua-armv7l-un" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7564e340 (LWP 2701)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x001a7358 in pj_lock_acquire (lock=0x7ec47ec4) at ../src/pj/lock.c:180
#2  0x0019c0dc in pj_ioqueue_poll (ioqueue=0x27f440, timeout=0x7564dccc) at ../src/pj/ioqueue_select.c:872
#3  0x0008d52c in pjsip_endpt_handle_events2 (endpt=0x277594, max_timeout=0x7564dcf8, p_count=0x7564dd00) at ../src/pjsip/sip_endpoint.c:744
#4  0x00042c18 in pjsua_handle_events (msec_timeout=10) at ../src/pjsua-lib/pjsua_core.c:1988
#5  0x0003fba4 in worker_thread (arg=0x0) at ../src/pjsua-lib/pjsua_core.c:704
#6  0x0019d97c in thread_main (param=0x29e508) at ../src/pj/os_core_unix.c:541
#7  0x76b6cfc4 in start_thread (arg=0x7564e340) at pthread_create.c:335
Backtrace stopped: Cannot access memory at address 0x66
 
I also tried to run the pjsua demo app with Valgrind, but this failed as Valgrind hung up during the execution. Does anyone have an idea what the root cause of this problem could be or what I could still do to to find out the rot cause of the issue? I am a bit lost as I don't know the code....
 
The output of the pjsua demo app up to the point of the crash looks unsuspicious to me. I have pasted it below this mail for your reference.
 
I appreciate any help!
 
 
Best regards,
 
   Christian
 
===========================================================================================
(gdb) run  --realm="fritz.box" --username="622" --password="jU78!TaQ" "sip:**701@xxxxxxxxx"
Starting program: /home/pi/projects/sip/pjsip/pjproject-2.7.2/pjsip-apps/bin/pjsua-armv7l-unknown-linux-gnueabihf --realm="fritz.box" --username="622" --password="jU78!TaQ" "sip:**701@xxxxxxxxx"
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib/arm-linux-gnueabihf/libthread_db.so.1".
20:24:20.405 os_core_unix.c !pjlib 2.7.2 for POSIX initialized
20:24:20.483 sip_endpoint.c  .Creating endpoint instance...
20:24:20.484          pjlib  .select() I/O Queue created (0x27f440)
20:24:20.484 sip_endpoint.c  .Module "mod-msg-print" registered
20:24:20.484 sip_transport.  .Transport manager created.
20:24:20.484   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
20:24:20.485 sip_endpoint.c  .Module "mod-pjsua-log" registered
20:24:20.485 sip_endpoint.c  .Module "mod-tsx-layer" registered
20:24:20.485 sip_endpoint.c  .Module "mod-stateful-util" registered
20:24:20.485 sip_endpoint.c  .Module "mod-ua" registered
20:24:20.485 sip_endpoint.c  .Module "mod-100rel" registered
20:24:20.485 sip_endpoint.c  .Module "mod-pjsua" registered
20:24:20.485 sip_endpoint.c  .Module "mod-invite" registered
20:24:20.983     alsa_dev.c  ..ALSA driver found 13 devices
20:24:20.983     alsa_dev.c  ..ALSA initialized
20:24:20.984          pjlib  ..select() I/O Queue created (0x2a4b54)
[New Thread 0x75e4e340 (LWP 2700)]
20:24:20.990 sip_endpoint.c  .Module "mod-evsub" registered
20:24:20.990 sip_endpoint.c  .Module "mod-presence" registered
20:24:20.990 sip_endpoint.c  .Module "mod-mwi" registered
20:24:20.991 sip_endpoint.c  .Module "mod-refer" registered
20:24:20.991 sip_endpoint.c  .Module "mod-pjsua-pres" registered
20:24:20.991 sip_endpoint.c  .Module "mod-pjsua-im" registered
20:24:20.991 sip_endpoint.c  .Module "mod-pjsua-options" registered
[New Thread 0x7564e340 (LWP 2701)]
20:24:20.992   pjsua_core.c  .1 SIP worker threads created
20:24:20.992   pjsua_core.c  .pjsua version 2.7.2 for Linux-4.9.59/armv7l/glibc-2.24 initialized
20:24:20.992   pjsua_core.c  .PJSUA state changed: CREATED --> INIT
20:24:20.992 sip_endpoint.c  Module "mod-default-handler" registered
20:24:20.992   pjsua_core.c  SIP UDP socket reachable at 192.168.178.27:5060
20:24:20.992    udp0x28ebf0  SIP UDP transport started, published address is 192.168.178.27:5060
20:24:20.993    pjsua_acc.c  Adding account: id=<sip:192.168.178.27:5060>
20:24:20.993    pjsua_acc.c  .Account <sip:192.168.178.27:5060> added with id 0
20:24:20.993    pjsua_acc.c  Modifying account 0
20:24:20.993    pjsua_acc.c  Acc 0: setting online status to 1..
20:24:20.993     tcptp:5060  SIP TCP listener ready for incoming connections at 192.168.178.27:5060
20:24:20.993    pjsua_acc.c  Adding account: id=<sip:192.168.178.27:5060;transport=TCP>
20:24:20.993    pjsua_acc.c  .Account <sip:192.168.178.27:5060;transport=TCP> added with id 1
20:24:20.994    pjsua_acc.c  Modifying account 1
20:24:20.995    pjsua_acc.c  Acc 1: setting online status to 1..
20:24:20.995   pjsua_pres.c  Adding buddy: sip:**701@xxxxxxxxx
20:24:20.995   pjsua_pres.c  .Buddy 0 added.
20:24:20.995   pjsua_pres.c  ..Buddy 0: updating presence..
20:24:20.995   pjsua_core.c  PJSUA state changed: INIT --> STARTING
20:24:20.996 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
20:24:20.996   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING
20:24:20.996         main.c  Ready: Success
20:24:20.996   pjsua_call.c  Making call with acc #1 to sip:**701@xxxxxxxxx
20:24:20.996    pjsua_aud.c  .Set sound device: capture=-1, playback=-2
20:24:20.996    pjsua_app.c  ..Turning sound device -1 -2 ON
20:24:20.996    pjsua_aud.c  ..Opening sound device (speaker + mic) PCM@16000/1/20ms
20:24:21.035     ec0x2a73d0  ...AEC created, clock_rate=16000, channel=1, samples per frame=320, tail length=200 ms, latency=0 ms
[New Thread 0x74e4e340 (LWP 2702)]
[New Thread 0x7464e340 (LWP 2703)]
20:24:21.038   tcpc0x2dcbac  .TCP client transport created
20:24:21.039   tcpc0x2dcbac  .TCP transport 192.168.178.27:51717 is connecting to 192.168.178.27:5060...
20:24:21.039     tcptp:5060 !TCP listener 192.168.178.27:5060: got incoming TCP connection from 192.168.178.27:51717, sock=8
20:24:21.039  pjsua_media.c  .Call 0: initializing media..
20:24:21.039 tcps0x73d0068c !TCP server transport created
20:24:21.039    pjsua_app.c  SIP TCP transport is connected to [192.168.178.27:51717]
20:24:21.039   tcpc0x2dcbac  TCP transport 192.168.178.27:51717 is connected to 192.168.178.27:5060
20:24:21.040    pjsua_app.c  SIP TCP transport is connected to [192.168.178.27:5060]
20:24:21.040  pjsua_media.c !..RTP socket reachable at 192.168.178.27:4000
20:24:21.040  pjsua_media.c  ..RTCP socket reachable at 192.168.178.27:4001
20:24:21.040  pjsua_media.c  ..Media index 0 selected for audio call 0
Thread 3 "pjsua-armv7l-un" received signal SIGSEGV, Segmentation fault.
[Switching to Thread 0x7564e340 (LWP 2701)]
0x00000000 in ?? ()
(gdb) bt
#0  0x00000000 in ?? ()
#1  0x001a7358 in pj_lock_acquire (lock=0x7ec47ec4) at ../src/pj/lock.c:180
#2  0x0019c0dc in pj_ioqueue_poll (ioqueue=0x27f440, timeout=0x7564dccc) at ../src/pj/ioqueue_select.c:872
#3  0x0008d52c in pjsip_endpt_handle_events2 (endpt=0x277594, max_timeout=0x7564dcf8, p_count=0x7564dd00) at ../src/pjsip/sip_endpoint.c:744
#4  0x00042c18 in pjsua_handle_events (msec_timeout=10) at ../src/pjsua-lib/pjsua_core.c:1988
#5  0x0003fba4 in worker_thread (arg=0x0) at ../src/pjsua-lib/pjsua_core.c:704
#6  0x0019d97c in thread_main (param=0x29e508) at ../src/pj/os_core_unix.c:541
#7  0x76b6cfc4 in start_thread (arg=0x7564e340) at pthread_create.c:335
Backtrace stopped: Cannot access memory at address 0x66
_______________________________________________
Visit our blog: http://blog.pjsip.org

pjsip mailing list
pjsip@xxxxxxxxxxxxxxx
http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org

[Index of Archives]     [Asterisk Users]     [Asterisk App Development]     [Linux ARM Kernel]     [Linux ARM]     [Linux Omap]     [Fedora ARM]     [IETF Annouce]     [Security]     [Bugtraq]     [Linux]     [Linux OMAP]     [Linux MIPS]     [Linux API]
  Powered by Linux