GNOME Bugzilla – Bug 761703
Recursive backtrace that exceeds stack size with v4l
Last modified: 2017-08-05 16:31:29 UTC
If you unplug camera which is currently being used for recording, there is a chance that gstreamer will exceed stack size and application will crash.
+ Trace 235955
Stack in the middle is being repeated.
Created attachment 320617 [details] GST_DEBUG=v4l*:9
Created attachment 320618 [details] GST_DEBUG=v4l*:9 Ignore previous log, it has some unnecessary data
Can you retest on 1.6.3 and master ? Sounds familiar, I thought someone had fixed it.
Nevermind, I managed to reproduce once out of 10 tries. Will need to be investigated.
(note, I see stack trace in the kernel, there might be a miss-behaviour there too, we'll need to find what and protect against it)
A trace that matters: 0:00:07.512508644 1613 0xd26990 ERROR v4l2allocator gstv4l2allocator.c:1245:gst_v4l2_allocator_qbuf:<v4l2src0:pool:src:allocator> failed queing buffer 0: Aucun périphérique de ce type
Created attachment 354638 [details] [review] Block recursive calls to gst_v4l2_buffer_pool_resurect_buffer() I recently encountered this bug as well. I don't know the v4l2 code well enough to fully understand what is going wrong, but the immediate cause is that the group-released signal is triggering a call to gst_v4l2_buffer_pool_resurect_buffer(), which allocates and frees a buffer. The free results in group-released being sent again, so the code recurses infinitely. The simplest solution is just to block reception of the signal while the signal handler is running. This seemed to resolve the problem for me, but I don't know if it is the correct solution. I've attached a patch, can anybody comment on its correctness?
*** This bug has been marked as a duplicate of bug 759292 ***