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 733072 - camerabin: Taking a picture in cheese leads to all sort of race
camerabin: Taking a picture in cheese leads to all sort of race
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
git master
Other Linux
: Normal normal
: 1.4.0
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2014-07-11 20:17 UTC by Nicolas Dufresne (ndufresne)
Modified: 2014-07-17 13:38 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Backtrace of the deadlock (25.43 KB, text/plain)
2014-07-11 20:26 UTC, Nicolas Dufresne (ndufresne)
  Details
wrappercamerabinsrc: set src to ready when there are no pending buffers (1.45 KB, patch)
2014-07-16 21:31 UTC, Thiago Sousa Santos
committed Details | Review

Description Nicolas Dufresne (ndufresne) 2014-07-11 20:17:57 UTC
I have got 3 different race so far when trying to take a picture.

One it works but there is warning about oustanding buffers in v4l2 pool on stop. This should never happens in the ready->null state transition.

Second it fails, EBUSY, the v4l2 pool never got freed.

Third it deadlock, see attached backtrace.
Comment 1 Nicolas Dufresne (ndufresne) 2014-07-11 20:26:19 UTC
Created attachment 280531 [details]
Backtrace of the deadlock
Comment 2 Thiago Sousa Santos 2014-07-16 21:31:58 UTC
Created attachment 280888 [details] [review]
wrappercamerabinsrc: set src to ready when there are no pending buffers

Setting to ready will block waiting for buffers to be reclaimed, so flush
before setting to null to make sure no buffers are pending
Comment 3 Nicolas Dufresne (ndufresne) 2014-07-16 21:41:35 UTC
Review of attachment 280888 [details] [review]:

That's basically the only solution I could find too, lets do that and we'll revisit in 1.5
Comment 4 Thiago Sousa Santos 2014-07-17 13:38:47 UTC
commit b39c01baa1f5b40943c7a207833bb581e4530e69
Author: Thiago Santos <ts.santos@sisa.samsung.com>
Date:   Wed Jul 16 18:27:15 2014 -0300

    wrappercamerabinsrc: set src to ready when there are no pending buffers
    
    Setting to ready will block waiting for buffers to be reclaimed, so flush
    before setting to null to make sure no buffers are pending
    
    https://bugzilla.gnome.org/show_bug.cgi?id=733072