I think this may be a bug in eglibc's pthread implementation. In the
following gdb output, I hit a breakpoint on pa_cond_wait(), which is a
small wrapper around pthread_cond_wait(). Then I make a breakpoint on
the following instructure in the next stack frame up. In theory, when
pa_cond_wait() returns the thread should own the lock on the mutex (the
__owner field is the LWP thread id) associated with the wait condition.
However, it is owned by the other pulseaudio thread.

Breakpoint 2, pa_cond_wait (c=0x1b0eb8, m=0x1b0e98) at 
pulsecore/mutex-posix.c:134
134         pa_assert(c);
(gdb) l
129         else
130             pa_assert_se(pthread_cond_signal(&c->cond) == 0);
131     }
132
133     int pa_cond_wait(pa_cond *c, pa_mutex *m) {
134         pa_assert(c);
135         pa_assert(m);
136
137         return pthread_cond_wait(&c->cond, &m->mutex);
138     }
(gdb) up
#1  0x410cc530 in pa_threaded_mainloop_wait (m=0x11c8f8) at 
pulse/thread-mainloop.c:206
206         pa_cond_wait(m->cond, m->mutex);
(gdb) l
201         /* Make sure that this function is not called from the helper 
thread */
202         pa_assert(!m->thread || !pa_thread_is_running(m->thread) || 
!in_worker(m));
203
204         m->n_waiting ++;
205
206         pa_cond_wait(m->cond, m->mutex);
207
208         pa_assert(m->n_waiting > 0);
209         m->n_waiting --;
210     }
(gdb) b 208
Breakpoint 3 at 0x410cc530: file pulse/thread-mainloop.c, line 208.
(gdb) c
Continuing.

Breakpoint 3, pa_threaded_mainloop_wait (m=0x11c8f8) at 
pulse/thread-mainloop.c:208
208         pa_assert(m->n_waiting > 0);
(gdb) p *m->mutex
$3 = {mutex = {__data = {__lock = 10454, __count = 1, __owner = 10462, __kind = 
33, __nusers = 2, {__spins = 0, __list = {__next = 0x0}}},
    __size = 
"\326(\000\000\001\000\000\000\336(\000\000!\000\000\000\002\000\000\000\000\000\000",
 __align = 10454}}
(gdb) info thread
  Id   Target Id         Frame
  2    Thread 0x463ce2c0 (LWP 10462) "threaded-ml" pa_cond_signal (c=0x1b0eb8, 
broadcast=1) at pulsecore/mutex-posix.c:125
* 1    Thread 0x40163000 (LWP 10454) "metacity" pa_threaded_mainloop_wait 
(m=0x11c8f8) at pulse/thread-mainloop.c:208

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/932096

Title:
  [armel] Pulseaudio crashes other program using sound: Assertion
  'pthread_mutex_unlock(&m->mutex) == 0'

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/pulseaudio/+bug/932096/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to