sound stops working / seg. fault on cpu load

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

 



Thank you for reply, Benny!

Now i do these things:
1. run pjsua from gdb debugger
2. connect mic port to output in pjsua ("cc 0 0")
3. give some load (using "stress -c 1" command) and hit a segfault
(but sometimes just the sound stops with no segfault)

Here how it looks:

(gdb) run
Starting program: /pjdebug/pjsua
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
warning: Unable to find libthread_db matching inferior's thread library, thread debugging will not be available.
[New LWP 3369]

Program received signal SIGSEGV, Segmentation fault.
[Switching to LWP 3369]
0x08120cc0 in Copy_16_To_16 ()
(gdb) bt
#0  0x08120cc0 in Copy_16_To_16 ()
#1  0x0812252f in AdaptingProcess ()
#2  0x081229d5 in PaUtil_EndBufferProcessing ()
#3  0x0811c69c in CallbackThreadFunc ()
#4  0xb7f83fa5 in ?? () from /usr/lib/libpthread.so.0
#5  0xb7e3597e in clone () from /usr/lib/libc.so.6
(gdb)

Is that enough to debug?




BTW, when connecting ports using "cc 0 0" there are also strange warnings,
but still it connects ok and a hear myself:

>>> cc 0 0
 00:59:30.575  pjsua_media.c  Opening sound device PCM at 16000/1/20ms
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994
Expression 'SetApproximateSampleRate( pcm, hwParams, sr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1294
Expression 'PaAlsaStreamComponent_InitialConfigure( &self->capture, inParams, self->primeBuffers, hwParamsCapture, &realSr )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1870
Expression 'PaAlsaStream_Configure( stream, inputParameters, outputParameters, sampleRate, framesPerBuffer, &inputLatency, &outputLatency, &hostBufferSizeMode )' failed in 'src/../../../portaudio/src/hostapi/alsa/pa_linux_alsa.c', line: 1994
 00:59:30.577  pjsua_media.c  Opening sound device PCM at 44100/1/20ms
 00:59:30.602    ec0x81d8a78  AEC created, clock_rate=44100, channel=1, samples per frame=882, tail length=200 ms, latency=115 ms
 00:59:30.623   conference.c  Port 0 (HDA Intel: ALC662 rev1 Analog (hw:0,0) (44KHz)) transmitting to port 0 (HDA Intel: ALC662 rev1 Analog (hw:0,0) (44KHz))
Success

Do i have to worry about there warnings?


-----Original Message-----
From: Igor Kravets <megaboots@xxxxxxx>
To: pjsip at lists.pjsip.org
Date: Wed, 29 Sep 2010 02:53:51 +0400
Subject: sound stops working / seg. fault on cpu load

> Hello Everyone!
> 
> I got an issue with pjsip which i can't resolve by myself. Any help would be great!
> 
> I compile pjsip 1.8 with no OSS support and make a test call with pjsua test application.
> If i don't run anything besides pjsua the call goes on normally.
> But when i give the machine some load the sound just stops and does not work in any direction. On another machine it does 'Segmentation fault'
> 
> There's no such issue with 1.0.3 version. It might just give a short sound crack loosing
> a couple of frames while giving some heavy load but then the sound stays ok.
> To be honest this does happen with 1.0.3 version but very very seldom.
> 
> It does NOT happen with playfile application playing wave file in a loop.
> 
> Debug set on maximum level on the first machine gives this right after sound stop (Discarding frame):
> 
> 02:03:36.326  strm0x822b3e4  jb updated(2), lvl=4 pre=0, size=3
>  02:03:36.744  strm0x822b3e4  Discarding frame #1062: eff=12 disc=0 orig:1050 seq_delta:1062
>  02:03:36.762  strm0x822b3e4  jb updated(2), lvl=5 pre=0, size=12
>  02:03:36.904  strm0x822b3e4  Discarding frame #1078: eff=15 disc=1 orig:1062 seq_delta:16
>  02:03:36.944  strm0x822b3e4  Discarding frame #1083: eff=15 disc=1 orig:1067 seq_delta:5
>  02:03:36.984  strm0x822b3e4  Discarding frame #1087: eff=18 disc=2 orig:1067 seq_delta:4
>  02:03:37.024  strm0x822b3e4  Discarding frame #1091: eff=21 disc=3 orig:1067 seq_delta:4
> 
> If i hang up the broken call, pjsua hangs while closing sound device:
> 
>  02:09:06.227  pjsua_media.c  Closing sound device after idle for 1 seconds
>  02:09:06.227  pjsua_media.c  Closing CS5535 Audio: CS5535 Audio (hw:0,0) sound playback device and CS5535 Audio: CS5535 Audio (hw:0,0) sound capture device
>  02:09:08.631       pa_dev.c  Stopping stream..
> 
> 
> The other machine gives just a 'Segmentation fault':
> 
>  06:32:25.026  strm0x8287adc  jb updated(1), lvl=2 pre=0, size=3
>  06:32:25.453  strm0x8287adc  jb updated(2), lvl=4 pre=0, size=3
>  06:32:25.880  strm0x8287adc  jb updated(1), lvl=3 pre=0, size=3
>  06:32:26.306  strm0x8287adc  jb updated(1), lvl=2 pre=0, size=3
>  06:32:26.713  strm0x8287adc  jb updated(2), lvl=4 pre=0, size=3
>  06:32:27.139  strm0x8287adc  jb updated(1), lvl=3 pre=0, size=3
>  06:32:27.566  strm0x8287adc  jb updated(1), lvl=2 pre=0, size=3
>  06:32:27.657  strm0x8287adc  jb updated(2), lvl=4 pre=0, size=5
> Segmentation fault
> 
> 
> 
> 
> I got a kernel:
> Linux 2.6.32.9 #8 Fri Sep 24 12:34:31 UTC 2010 i586 GNU/Linux
> And alsa:
> Advanced Linux Sound Architecture Driver Version 1.0.22.1.
> Compiled on Jul  1 2010 for kernel 2.6.32.9.
> 
> The OS itself is a thinstation based pxe environment.
> 
> Please give a hint. Where to start digging?
> Thank you.
> 
> 
> 
> 
> _______________________________________________
> Visit our blog: http://blog.pjsip.org
> 
> pjsip mailing list
> pjsip at lists.pjsip.org
> 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