[gstreamer-bugs] [Bug 625442] New: crash: pa_threaded_mainloop_stop is called from the pa thread
GStreamer (bugzilla.gnome.org)
bugzilla at gnome.org
Tue Jul 27 15:30:21 PDT 2010
https://bugzilla.gnome.org/show_bug.cgi?id=625442
GStreamer | gst-plugins-good | 0.10.22
Summary: crash: pa_threaded_mainloop_stop is called from the
pa thread
Classification: Desktop
Product: GStreamer
Version: 0.10.22
OS/Version: Linux
Status: UNCONFIRMED
Severity: critical
Priority: Normal
Component: gst-plugins-good
AssignedTo: gstreamer-bugs at lists.sourceforge.net
ReportedBy: gudake at gmail.com
QAContact: gstreamer-bugs at lists.sourceforge.net
GNOME target: ---
GNOME version: ---
If gst_pulseringbuffer_stop is immediately followed by unreffing the pulsesink,
there is a chance that mainloop_leave_defer_cb decreases pulsesink refcount
from 1 to 0 and calling pa_threaded_mainloop_stop(), this is prohibit in
pulseaudio and causing assertion failure: pa_threaded_mainloop_stop() should
not be called from pa worker thread
pulseaudio source code: pa_assert(!in_worker(m)) is where crashes
void pa_threaded_mainloop_stop(pa_threaded_mainloop *m) {
pa_assert(m);
if (!m->thread || !pa_thread_is_running(m->thread))
return;
/* Make sure that this function is not called from the helper thread */
pa_assert(!in_worker(m));
pa_mutex_lock(m->mutex);
pa_mainloop_quit(m->real_mainloop, 0);
pa_mutex_unlock(m->mutex);
pa_thread_join(m->thread);
}
example crashing stack trace where pa_threaded_mainloop_stop() is triggered by
mainloop_leave_defer_cb() inside pulse worker thread.
#00 pc 2c62ac0c(20c0c) in /usr/lib/libpulse.so.0.7.1/pa_threaded_mainloop_stop
()
#01 pc 2c5f8e28(ce28) in
/usr/lib/gstreamer-0.10/libgstpulse.so/gst_pulsesink_finalize ()
#02 pc 2b27c4b0(c4b0) in /usr/lib/libgobject-2.0.so.0.1600.6/g_object_unref ()
#03 pc 2c5f5f44(9f44) in
/usr/lib/gstreamer-0.10/libgstpulse.so/mainloop_leave_defer_cb ()
#04 pc 2c61ef08(14f08) in /usr/lib/libpulse.so.0.7.1/once_callback ()
#05 pc 2c61ddfc(13dfc) in /usr/lib/libpulse.so.0.7.1/pa_mainloop_dispatch ()
#06 pc 2c61e1f0(141f0) in /usr/lib/libpulse.so.0.7.1/pa_mainloop_iterate ()
#07 pc 2c61e2b0(142b0) in /usr/lib/libpulse.so.0.7.1/pa_mainloop_run ()
#08 pc 2c62ad70(20d70) in /usr/lib/libpulse.so.0.7.1/thread ()
#09 pc 2c651ec0(47ec0) in /usr/lib/libpulse.so.0.7.1/internal_thread_func ()
#10 pc 2aae2774(6774) in /lib/libpthread-2.8.so/start_thread ()
#11 pc 2b1d7af4(d6af4) in /lib/libc-2.8.so/__clone ()
--
Configure bugmail: https://bugzilla.gnome.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
You are the assignee for the bug.
More information about the Gstreamer-bugs
mailing list