Discussion:
[Bug 784967] New: omx: Possible deadlock in gstomxaudioenc
"GStreamer" (GNOME Bugzilla)
2017-07-15 06:01:29 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Bug ID: 784967
Summary: omx: Possible deadlock in gstomxaudioenc
Classification: Platform
Product: GStreamer
Version: 1.12.2
OS: All
Status: NEW
Severity: critical
Priority: Normal
Component: gst-omx
Assignee: gstreamer-***@lists.freedesktop.org
Reporter: ***@samsung.com
QA Contact: gstreamer-***@lists.freedesktop.org
GNOME version: ---

Hello All,

There is possible deadlock in gstomxaudioenc.c

File : gst-omx/omx/gstomxaudioenc.c

In function "gst_omx_audio_enc_drain" at line: 1154

There if g_mutex_lock (&self->drain_lock) at line: 1145 but incase of fails of
gst_omx_port_release_buffer
Threre is no unlock of self->drain_lock.

below are snippet
err = gst_omx_port_release_buffer (self->enc_in_port, buf);
if (err != OMX_ErrorNone) {
GST_ERROR_OBJECT (self, "Failed to drain component: %s (0x%08x)",
gst_omx_error_to_string (err), err);
GST_AUDIO_ENCODER_STREAM_LOCK (self);
return GST_FLOW_ERROR;
}

Solution: There should be g_mutex_unlock (&self->drain_lock) in failure case;

Please check and provide your feedback.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-15 16:07:16 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Nicolas Dufresne (stormer) <***@ndufresne.ca> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |***@ndufresne.ca

--- Comment #1 from Nicolas Dufresne (stormer) <***@ndufresne.ca> ---
This is correct, do you want to provide a patch ?
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-17 08:00:06 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

--- Comment #2 from Satya Prakash Gupta <***@samsung.com> ---
yes ... I am preparing a patch for it.. soon I will upload it.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-17 08:21:21 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

--- Comment #3 from Satya Prakash Gupta <***@samsung.com> ---
Created attachment 355740
--> https://bugzilla.gnome.org/attachment.cgi?id=355740&action=edit
Patch is attched

Hi All,

Please review attached patch and provide your feedback.
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-17 12:40:21 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Status|NEW |RESOLVED
CC| |***@coaxion.net
Resolution|--- |FIXED

--- Comment #4 from Sebastian Dröge (slomo) <***@coaxion.net> ---
commit 9db720f13efaba8f8798e2796dba66e7a6c0f29a
Author: Satya Prakash Gupta <***@samsung.com>
Date: Mon Jul 17 13:44:54 2017 +0530

omxaudioenc: Fix deadlock in error case when draining

https://bugzilla.gnome.org/show_bug.cgi?id=784967
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-17 12:40:25 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Attachment #355740|none |committed
status| |
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-17 12:41:33 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|git master |1.13.1
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
"GStreamer" (GNOME Bugzilla)
2017-07-25 08:50:08 UTC
Permalink
https://bugzilla.gnome.org/show_bug.cgi?id=784967

Sebastian Dröge (slomo) <***@coaxion.net> changed:

What |Removed |Added
----------------------------------------------------------------------------
Target Milestone|1.13.1 |1.12.3
--
You are receiving this mail because:
You are the QA Contact for the bug.
You are the assignee for the bug.
Loading...