GNOME Bugzilla – Bug 770486
grilo plugin leaves empty directories in /tmp
Last modified: 2016-12-11 06:22:21 UTC
Created attachment 334273 [details] gdb mkdir on rhythmbox pid Steps to reproduce: 1. Launch Rhythmbox -> Plugins. 2. Activate / Deactive "Grilo Media Browser". 3. Activating creates the dir, while deactivating doesn't clear them. Step [2] needs the fix from https://bugzilla.gnome.org/show_bug.cgi?id=770044 to work. Below is strace on rhythmbox ( pid 23381 ) while toggle the plugin. dev@unstable:/tmp$ strace -e trace=file -F -p 23381 2>&1 | grep /tmp/grilo-plugin-cache [pid 23381] mkdir("/tmp/grilo-plugin-cache-VA2XMY", 0700) = 0 [pid 23381] access("/tmp/grilo-plugin-cache-VA2XMY", F_OK) = 0 [pid 23381] mkdir("/tmp/grilo-plugin-cache-KCLVMY", 0700) = 0 [pid 23381] access("/tmp/grilo-plugin-cache-KCLVMY", F_OK) = 0 [pid 23381] mkdir("/tmp/grilo-plugin-cache-0FH4MY", 0700) = 0 [pid 23381] access("/tmp/grilo-plugin-cache-0FH4MY", F_OK) = 0 [pid 23381] mkdir("/tmp/grilo-plugin-cache-7JE7MY", 0700) = 0 [pid 23381] access("/tmp/grilo-plugin-cache-7JE7MY", F_OK) = 0
Hi, I noticed this with grilo 0.3.2 and plugins 0.3.3, but it only seems to happen with the Radio France LUA plugin, so there's only one empty directory when I launch rhythmbox. Taking a quick look with gdb, it seems that the GrlLuaFactorySource object is never destroyed.
Created attachment 339928 [details] [review] Patch for rhythmbox Ok, it looks like Rhythmbox is not unregistering the sources before deleting them. This patch (for Rhythmbox) solves the problem for me, but I'm unfamiliar with this code so please someone review.
Review of attachment 339928 [details] [review]: Looks good to me
Looks like I don't have write permissions in the rhythmbox repo, please someone commit for me. Thanks.
Few basic questions: 1. rb_grilo_plugin_source_deleted appears to be a dup. Please confirm and remove. 2. Can g_signal_handlers_block be used rather than g_signal_handlers_block_by_func ? g_signal_handlers_block (pi->registry, pi->handler_id_source_removed); 3. Also, g_signal_handlers_block can be called ahead of g_hash_table_foreach rather than inside GHFunc. 4. Have unblock handlers that are equivalent to the block calls. Also, please attach a patch which fixes only the exact issue ( this bug ) in a patch, and all other changes in a separate patch. Thanks !
fixed in commit 34dc769.