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 774462 - glwindow: found memory leak of navigation_thread
glwindow: found memory leak of navigation_thread
Status: RESOLVED FIXED
Product: GStreamer
Classification: Platform
Component: gst-plugins-bad
1.10.0
Other Linux
: Normal normal
: 1.10.1
Assigned To: GStreamer Maintainers
GStreamer Maintainers
Depends on:
Blocks:
 
 
Reported: 2016-11-15 10:04 UTC by Haihua Hu
Modified: 2016-11-15 10:27 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
glwindow: use g_thread_unref() to release navigation thread (1.01 KB, patch)
2016-11-15 10:17 UTC, Haihua Hu
committed Details | Review

Description Haihua Hu 2016-11-15 10:04:41 UTC
Hi, navigation thread memory leak has been fixed in below bugzilla:
https://bugzilla.gnome.org/show_bug.cgi?id=758820

But the g_thread_join() has been removed again in gstreamer 1.10.0 which will cause memory leak again.

It was removed in this commit:

From 9ad4c67578e95a48e2969c8272e2c94ff3fc50b5 Mon Sep 17 00:00:00 2001
From: Matthew Waters <matthew@centricular.com>
Date: Wed, 5 Oct 2016 18:32:09 +1100
Subject: glwindow: don't use g_thread_join() to join the navigation thread

Using g_thread_join() in _finalize() handlers may result in a deadlock
joining the current thread when the last reference is held by a signal
handler.

I think if g_thread_join() will cause deadlock, then we also need use g_thread_unref() to release this thread. Is that right?
Comment 1 Matthew Waters (ystreet00) 2016-11-15 10:10:04 UTC
Yes.  Would you like to provide a patch?

Note that the navigation thread doesn't exist anymore in master.
Comment 2 Haihua Hu 2016-11-15 10:12:38 UTC
(In reply to Matthew Waters (ystreet00) from comment #1)
> Yes.  Would you like to provide a patch?
> 
> Note that the navigation thread doesn't exist anymore in master.

Ok, I will submit a patch. Let's use it only for 1.10.x bugfix branch.
Comment 3 Haihua Hu 2016-11-15 10:17:30 UTC
Created attachment 339909 [details] [review]
glwindow: use g_thread_unref() to release navigation thread
Comment 4 Matthew Waters (ystreet00) 2016-11-15 10:27:04 UTC
Thanks!

commit d0026b32e823014cb019ce0ab63b3b1d5b3dde10
Author: Haihua Hu <jared.hu@nxp.com>
Date:   Tue Nov 15 18:10:24 2016 +0800

    glwindow: use g_thread_unref() to release navigation thread
    
    use g_thread_unref() to release navigation thread to avoid memory leak
    
    https://bugzilla.gnome.org/show_bug.cgi?id=774462