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 726122 - g_volume_mount() doesn't close error pipe when spawned mount command is finished
g_volume_mount() doesn't close error pipe when spawned mount command is finished
Status: VERIFIED DUPLICATE of bug 724916
Product: glib
Classification: Platform
Component: gio
2.39.x
Other Linux
: Normal normal
: ---
Assigned To: gtkdev
gtkdev
Depends on:
Blocks:
 
 
Reported: 2014-03-11 17:38 UTC by Vitaly Bogdanov
Modified: 2014-03-13 12:06 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Vitaly Bogdanov 2014-03-11 17:38:28 UTC
eject_mount_do() function creates new task to notify caller when asynchronous mount operation is finished. Task has two attached sources: 
(1) error_channel_source which tracks error pipe of spawned mount command
(2) command pid watch source. Both sources has references to task. 
So there are 3 references to task.

When mount command is finished and eject_mount_cb() is called then two of references are released:
(1) by g_object_unref(task) call;
(2) when child_watch source is destroyed from context.

Error channel source reference is not released so: 
(1) task is not released;
(2) eject_mount_op_free() callback is not called;
(3) error stream pipe is not closed.

On my machine it also leads to high CPU usage.
Comment 1 Allison Karlitskaya (desrt) 2014-03-11 17:51:57 UTC
hi.  Bug 724916 has some patches that I think will fix this issue.  Can you please test them?

*** This bug has been marked as a duplicate of bug 724916 ***
Comment 2 Vitaly Bogdanov 2014-03-13 12:06:14 UTC
Tested with patches from bug 724916. 
Issue is fixed.