Freeze on pulse sound device

HN
Hector Nunez
Wed, Nov 28, 2018 5:29 PM

Hi,
I have similar problem running on Centos 7.5 ans using pulseaudio, my CPU goes to 97% and not RTP packages goes out.
If I try disabling the audio with --null-audio and the CPU is ok.
pjsua-x86_64-unknown-linux-gnu sip:100@ip_address --quality=N --null-audio

Hi, I have similar problem running on Centos 7.5 ans using pulseaudio, my CPU goes to 97% and not RTP packages goes out. If I try disabling the audio with --null-audio and the CPU is ok. pjsua-x86_64-unknown-linux-gnu sip:100@ip_address --quality=N --null-audio
HN
Hector Nunez
Wed, Nov 28, 2018 6:15 PM

I did more test running pjsystest and no audio, see below the results.I tested the audio card with aplay and it plays the wav file.# aplay ../../tests/pjsua/wavs/input.8.wavaplay

./pjsip-apps/bin/pjsystest-x86_64-unknown-linux-gnu

13:07:50.761 os_core_unix.c !pjlib 2.6 for POSIX initialized
13:07:50.762 sip_endpoint.c  .Creating endpoint instance...
13:07:50.762          pjlib  .select() I/O Queue created (0x19d3ff0)
13:07:50.762 sip_endpoint.c  .Module "mod-msg-print" registered
13:07:50.762 sip_transport.  .Transport manager created.
13:07:50.762   pjsua_core.c  .PJSUA state changed: NULL --> CREATED
13:07:50.762 sip_endpoint.c  .Module "mod-pjsua-log" registered
13:07:50.762 sip_endpoint.c  .Module "mod-tsx-layer" registered
13:07:50.762 sip_endpoint.c  .Module "mod-stateful-util" registered
13:07:50.762 sip_endpoint.c  .Module "mod-ua" registered
13:07:50.762 sip_endpoint.c  .Module "mod-100rel" registered
13:07:50.762 sip_endpoint.c  .Module "mod-pjsua" registered
13:07:50.762 sip_endpoint.c  .Module "mod-invite" registered
13:07:50.889     alsa_dev.c  ..ALSA driver found 8 devices
13:07:50.889     alsa_dev.c  ..ALSA initialized
13:07:50.890          pjlib  ..select() I/O Queue created (0x1a02788)
13:07:50.894 sip_endpoint.c  .Module "mod-evsub" registered
13:07:50.894 sip_endpoint.c  .Module "mod-presence" registered
13:07:50.895 sip_endpoint.c  .Module "mod-mwi" registered
13:07:50.895 sip_endpoint.c  .Module "mod-refer" registered
13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-pres" registered
13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-im" registered
13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-options" registered
13:07:50.895   pjsua_core.c  .1 SIP worker threads created
13:07:50.895   pjsua_core.c  .pjsua version 2.6 for Linux-3.10.3.94/x86_64/glibc-2.17 initialized
13:07:50.895   pjsua_core.c  .PJSUA state changed: CREATED --> INIT
13:07:50.895   pjsua_core.c  PJSUA state changed: INIT --> STARTING
13:07:50.895 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered
13:07:50.895   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING
M E N U :

0: Tests
  00: Run test wizard
  01: Device Test
  02: Play Tone
  03: Play WAV File1
  04: Play WAV File2
  05: Record Audio
  06: Latency Test
  07: AEC/AES Test  09: Exit
1: Options
  10: View Devices
  11: View SettingsEnter the menu number: 00
13:07:55.434      systest.c  Running test wizard
13:07:55.434      systest.c  Running Audio Device List
Audio Device List
Found 8 devices
  0: ALSA [pulse] (1/1)
  1: ALSA [sysdefault:CARD=I82801AAICH] (1/1)
  2: ALSA [front:CARD=I82801AAICH,DEV=0] (1/1)
  3: ALSA [surround21:CARD=I82801AAICH,DEV=0] (1/1)
  4: ALSA [surround40:CARD=I82801AAICH,DEV=0] (1/1)
  5: ALSA [surround41:CARD=I82801AAICH,DEV=0] (1/1)
  6: ALSA [surround50:CARD=I82801AAICH,DEV=0] (1/1)
  7: ALSA [surround51:CARD=I82801AAICH,DEV=0] (1/1)1:OK 
1
13:08:05.707      systest.c  Running Audio Settings
Audio Settings
Version: 2.6
Test clock rate: 8000
Device clock rate: 8000
Aud frame ptime: 20
Channel count: 1
Audio switching: Conf bridge
Snd buff count: 8
Rec dev : -1 (pulse) [ALSA]
Rec  buf : 100 msec
Play dev: -2 (pulse) [ALSA]
Play buf: 140 msec1:OK 
1
Audio Tone Playback Test
This test will play simple ringback tone to the speaker. Please listen carefully for audio impairments such as stutter. You may need to let this test running for a while to make sure that everything is okay. Press OK to start, CANCEL to skip
1:OK  9:Cancel 
1
13:08:16.641      systest.c  Running Audio Tone Playback Test
13:08:16.641    pjsua_aud.c  Conf connect: 1 --> 0
13:08:16.641    pjsua_aud.c  .Set sound device: capture=-1, playback=-2
13:08:16.641    pjsua_aud.c  ..Opening sound device (speaker + mic) PCM@8000/1/20ms
13:08:16.695   conference.c  .Port 1 (ringback) transmitting to port 0 (pulse)
Audio Tone Playback Test
Ringback tone should be playing now in the speaker. Press OK to stop.
1:OK 
1
Audio Tone Playback Test
Is the audio okay?
1:Yes  0:No 
13:08:32.574    pjsua_aud.c !Closing sound device after idle for 0 second(s)
13:08:32.574    pjsua_aud.c  .Closing pulse sound playback device and pulse sound capture device
13:09:18.585     alsa_dev.c !ALSA lib: PulseAudio: Unable to create stream: Timeout

I did more test running pjsystest and no audio, see below the results.I tested the audio card with aplay and it plays the wav file.# aplay ../../tests/pjsua/wavs/input.8.wavaplay # ./pjsip-apps/bin/pjsystest-x86_64-unknown-linux-gnu 13:07:50.761 os_core_unix.c !pjlib 2.6 for POSIX initialized 13:07:50.762 sip_endpoint.c  .Creating endpoint instance... 13:07:50.762          pjlib  .select() I/O Queue created (0x19d3ff0) 13:07:50.762 sip_endpoint.c  .Module "mod-msg-print" registered 13:07:50.762 sip_transport.  .Transport manager created. 13:07:50.762   pjsua_core.c  .PJSUA state changed: NULL --> CREATED 13:07:50.762 sip_endpoint.c  .Module "mod-pjsua-log" registered 13:07:50.762 sip_endpoint.c  .Module "mod-tsx-layer" registered 13:07:50.762 sip_endpoint.c  .Module "mod-stateful-util" registered 13:07:50.762 sip_endpoint.c  .Module "mod-ua" registered 13:07:50.762 sip_endpoint.c  .Module "mod-100rel" registered 13:07:50.762 sip_endpoint.c  .Module "mod-pjsua" registered 13:07:50.762 sip_endpoint.c  .Module "mod-invite" registered 13:07:50.889     alsa_dev.c  ..ALSA driver found 8 devices 13:07:50.889     alsa_dev.c  ..ALSA initialized 13:07:50.890          pjlib  ..select() I/O Queue created (0x1a02788) 13:07:50.894 sip_endpoint.c  .Module "mod-evsub" registered 13:07:50.894 sip_endpoint.c  .Module "mod-presence" registered 13:07:50.895 sip_endpoint.c  .Module "mod-mwi" registered 13:07:50.895 sip_endpoint.c  .Module "mod-refer" registered 13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-pres" registered 13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-im" registered 13:07:50.895 sip_endpoint.c  .Module "mod-pjsua-options" registered 13:07:50.895   pjsua_core.c  .1 SIP worker threads created 13:07:50.895   pjsua_core.c  .pjsua version 2.6 for Linux-3.10.3.94/x86_64/glibc-2.17 initialized 13:07:50.895   pjsua_core.c  .PJSUA state changed: CREATED --> INIT 13:07:50.895   pjsua_core.c  PJSUA state changed: INIT --> STARTING 13:07:50.895 sip_endpoint.c  .Module "mod-unsolicited-mwi" registered 13:07:50.895   pjsua_core.c  .PJSUA state changed: STARTING --> RUNNING M E N U : --------- 0: Tests   00: Run test wizard   01: Device Test   02: Play Tone   03: Play WAV File1   04: Play WAV File2   05: Record Audio   06: Latency Test   07: AEC/AES Test  09: Exit 1: Options   10: View Devices   11: View SettingsEnter the menu number: 00 13:07:55.434      systest.c  Running test wizard 13:07:55.434      systest.c  Running Audio Device List Audio Device List Found 8 devices   0: ALSA [pulse] (1/1)   1: ALSA [sysdefault:CARD=I82801AAICH] (1/1)   2: ALSA [front:CARD=I82801AAICH,DEV=0] (1/1)   3: ALSA [surround21:CARD=I82801AAICH,DEV=0] (1/1)   4: ALSA [surround40:CARD=I82801AAICH,DEV=0] (1/1)   5: ALSA [surround41:CARD=I82801AAICH,DEV=0] (1/1)   6: ALSA [surround50:CARD=I82801AAICH,DEV=0] (1/1)   7: ALSA [surround51:CARD=I82801AAICH,DEV=0] (1/1)1:OK  1 13:08:05.707      systest.c  Running Audio Settings Audio Settings Version: 2.6 Test clock rate: 8000 Device clock rate: 8000 Aud frame ptime: 20 Channel count: 1 Audio switching: Conf bridge Snd buff count: 8 Rec dev : -1 (pulse) [ALSA] Rec  buf : 100 msec Play dev: -2 (pulse) [ALSA] Play buf: 140 msec1:OK  1 Audio Tone Playback Test This test will play simple ringback tone to the speaker. Please listen carefully for audio impairments such as stutter. You may need to let this test running for a while to make sure that everything is okay. Press OK to start, CANCEL to skip 1:OK  9:Cancel  1 13:08:16.641      systest.c  Running Audio Tone Playback Test 13:08:16.641    pjsua_aud.c  Conf connect: 1 --> 0 13:08:16.641    pjsua_aud.c  .Set sound device: capture=-1, playback=-2 13:08:16.641    pjsua_aud.c  ..Opening sound device (speaker + mic) PCM@8000/1/20ms 13:08:16.695   conference.c  .Port 1 (ringback) transmitting to port 0 (pulse) Audio Tone Playback Test Ringback tone should be playing now in the speaker. Press OK to stop. 1:OK  1 Audio Tone Playback Test Is the audio okay? 1:Yes  0:No  13:08:32.574    pjsua_aud.c !Closing sound device after idle for 0 second(s) 13:08:32.574    pjsua_aud.c  .Closing pulse sound playback device and pulse sound capture device 13:09:18.585     alsa_dev.c !ALSA lib: PulseAudio: Unable to create stream: Timeout
HN
Hector Nunez
Sun, Dec 30, 2018 3:27 PM

Hi,
I added this error in stackoverflow, if I use any previous versions like 2.7 it works fine.
https://stackoverflow.com/questions/53507832/pjsip-2-8-transport-adapter-sample-segmentation-fault?noredirect=1#comment94003334_53507832

Thanks

Hi, I added this error in stackoverflow, if I use any previous versions like 2.7 it works fine. https://stackoverflow.com/questions/53507832/pjsip-2-8-transport-adapter-sample-segmentation-fault?noredirect=1#comment94003334_53507832 Thanks
M
Ming
Mon, Dec 31, 2018 12:58 AM

Hi Hector,

We fixed this in the trunk version. Please have a look at ticket #2157 (
https://trac.pjsip.org/repos/ticket/2157).

Regards,
Ming

On Sun, Dec 30, 2018 at 11:28 PM Hector Nunez via pjsip <
pjsip@lists.pjsip.org> wrote:

Hi Hector, We fixed this in the trunk version. Please have a look at ticket #2157 ( https://trac.pjsip.org/repos/ticket/2157). Regards, Ming On Sun, Dec 30, 2018 at 11:28 PM Hector Nunez via pjsip < pjsip@lists.pjsip.org> wrote: > Hi, > > I added this error in stackoverflow, if I use any previous versions like > 2.7 it works fine. > > > https://stackoverflow.com/questions/53507832/pjsip-2-8-transport-adapter-sample-segmentation-fault?noredirect=1#comment94003334_53507832 > > Thanks > > _______________________________________________ > Visit our blog: http://blog.pjsip.org > > pjsip mailing list > pjsip@lists.pjsip.org > http://lists.pjsip.org/mailman/listinfo/pjsip_lists.pjsip.org >