Semaphore lockup when using threaded mainloops excessively

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

 



Hi Colin,

On Thu, Mar 31, 2011 at 6:20 PM, Colin Guthrie <gmane at colin.guthr.ie> wrote:
> 'Twas brillig, and Daniel Mack at 31/03/11 17:08 did gyre and gimble:
>> On Thu, Mar 31, 2011 at 3:02 PM, Daniel Mack <zonque at gmail.com> wrote:
>>> I'm on Mac OS X, so it could be a platform specific issue, but maybe
>>> more test coverage shows the problem on other platforms as well. I
>>> also exchanged the semaphore implementation for an alternative, but
>>> that didn't help.
>>>
>>> Attached is a patch to add the test to the tree. Am I doing anything wrong?
>>
>> I tried this test on a Linux machine now, with PulseAudio built from
>> the current git HEAD. Interestingly, the daemon (started with -vvv)
>> crashes reproducible, and the last lines of debug output are:
>>
>> D: alsa-sink.c: Latency set to 371.52ms
>> D: alsa-sink.c: hwbuf_unused=4
>> D: alsa-sink.c: setting avail_min=15503
>> E: mcalign.c: Assertion 'l > 0' failed at pulsecore/mcalign.c:202,
>> function pa_mcalign_csize(). Aborting.
>>
>> Does that ring a bell to anyone? I'll try to debug this further, but
>> hope for some input :)
>
> Hmm, not seen this one.
>
> I'm running git master as of a couple commits back and I certainly don't
> get that :s
>
> A backtrace from the assertion would be useful...

It takes a lot longer to trigger in gdb, but here we go:

#0  0xb7fe1424 in __kernel_vsyscall ()
#1  0xb7a4c941 in raise () from /lib/libc.so.6
#2  0xb7a4fe42 in abort () from /lib/libc.so.6
#3  0xb7c97dbc in pa_mcalign_csize (m=0xae33cb38, l=0)
    at pulsecore/mcalign.c:202
#4  0xb7ca07c4 in pa_memblockq_push_align (bq=0xae31fde8, chunk=0xb34ab1ec)
    at pulsecore/memblockq.c:779
#5  0xb7fb1d06 in sink_input_process_msg (o=0xae30f380, code=11, userdata=0x0,
    offset=8192, chunk=0xb34ab1ec) at pulsecore/protocol-native.c:1381
#6  0xb7ce2a92 in pa_asyncmsgq_dispatch (object=0xae30f380, code=11,
    userdata=0x0, offset=8192, memchunk=0xb34ab1ec)
    at pulsecore/asyncmsgq.c:324
#7  0xb7d06944 in asyncmsgq_read_work (i=0x808df68) at pulsecore/rtpoll.c:565
#8  0xb7d05592 in pa_rtpoll_run (p=0x808c5b0, wait_op=true)
    at pulsecore/rtpoll.c:239
#9  0xb7e3bc93 in thread_func (userdata=0x808cf48)
    at modules/alsa/alsa-sink.c:1550
#10 0xb7cbc4b3 in internal_thread_func (userdata=0x809ae90)
    at pulsecore/thread-posix.c:83
#11 0xb7bb8cc9 in start_thread () from /lib/libpthread.so.0
#12 0xb7af269e in clone () from /lib/libc.so.6

$ ./pulseaudio --version
pulseaudio 1.0-dev-227-g6041

$ uname -a
Linux wok 2.6.38-020638-generic #201103151303 SMP Tue Mar 15 14:33:40
UTC 2011 i686 GNU/Linux

Could you try to run multiple instances of the test binary at the same time?

Daniel



[Index of Archives]     [Linux Audio Users]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux