After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 732554 - watchdog: sometimes expire even when stopped and causes crash
watchdog: sometimes expire even when stopped and causes crash
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
Other Linux
: Normal normal
: 1.3.91
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Reported: 2014-07-01 13:54 UTC by Göran Jönsson
Modified: 2014-07-04 12:57 UTC
See Also:
GNOME target: ---
GNOME version: ---

gst-plugins-good.patch (1.18 KB, patch)
2014-07-01 13:54 UTC, Göran Jönsson
committed Details | Review

Description Göran Jönsson 2014-07-01 13:54:48 UTC
Created attachment 279680 [details] [review]

Watchdog sometimes expire even when stopped and causes crash.

This because of a gst_watchdog_stop 
is ongoing then a gst_watchdog_src_event is stuck at mutex.
As soon as stop is finish then the gst_watchdog_src_event continue.
Then in gst_watchdog_feed, a source will be attach to default context
(since watchdog->main_context is NULL).

When this expire there are no data to gst_watchdog_trigger since 
references to watchdog have been zero.

Solution is to check watchdog->main_context is not NULL before create and attach a source.
Comment 1 Sebastian Dröge (slomo) 2014-07-01 17:41:56 UTC
commit e050541f11711d2ff8edf4b80213acffbdba7a07
Author: Göran Jönsson <>
Date:   Mon Jun 23 11:53:11 2014 +0200

    watchdog: Only create a new GSource if we have a main context
    We can still get OOB events while stopping the watchdog element, and while
    stopping it we destroy the main context.
    Also let the GSource own a reference to the element for additional safety.