[gstreamer-bugs] [Bug 311496] New: Race condition in optimal scheduler

bugzilla-daemon at bugzilla.gnome.org bugzilla-daemon at bugzilla.gnome.org
Mon Jul 25 08:12:10 PDT 2005


Please DO NOT reply to this by email. All additional comments should be made in
the comments box of this bug report.

 http://bugzilla.gnome.org/show_bug.cgi?id=311496
 GStreamer | gstreamer (core) | Ver: 0.8.x

           Summary: Race condition in optimal scheduler
           Product: GStreamer
           Version: 0.8.x
          Platform: Other
        OS/Version: Linux
            Status: UNCONFIRMED
          Severity: critical
          Priority: Normal
         Component: gstreamer (core)
        AssignedTo: gstreamer-bugs at lists.sourceforge.net
        ReportedBy: josef.zlomek at xeris.cz
         QAContact: gstreamer-bugs at lists.sourceforge.net
                CC: all-bugs at bugzilla.gnome.org


When the gstreamer application is multithreaded and the threads begins with
queue, the queue between the threads is used by both threads. In
gstoptimalscheduler in function schedule_group near line 1233, the reference
count of group->entry, which is a queue in my application, is increased and
later decreased. But because the queue is used from two threads, race condition
occurs while increasing/decreasing reference counts. The result is that the
reference count gets decreased to 0 and the queue is destroyed, which breaks the
pipe and the application halts.
On SMP machine, this bug appears in 5 minutes.

The patch, which will be uploaded in a minute, fixes this by surrounding the
refcount increase/decrease by mutex lock and unlock. This might not be the
correct solution but it helps (the application with the patched gstreamer did
not halt yet).

------- You are receiving this mail because: -------
You are the assignee for the bug.
You are the QA contact for the bug.




More information about the Gstreamer-bugs mailing list