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 650029 - delay in gnome log out
delay in gnome log out
Status: RESOLVED FIXED
Product: tomboy
Classification: Applications
Component: General
1.8.x
Other Linux
: Normal normal
: ---
Assigned To: Tomboy Maintainers
Tomboy Maintainers
: 663422 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2011-05-12 11:29 UTC by Mariusz Libera
Modified: 2012-01-16 16:53 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
exit on Stop signal of session manager (709 bytes, patch)
2012-01-08 01:45 UTC, Sam Lin
reviewed Details | Review
exit on Stop signal of session manager (709 bytes, patch)
2012-01-08 01:47 UTC, Sam Lin
committed Details | Review
exit on OnEndSession (390 bytes, patch)
2012-01-16 02:15 UTC, Sam Lin
committed Details | Review

Description Mariusz Libera 2011-05-12 11:29:50 UTC
When tomboy is running logging out of gnome take about 30 seconds. Dmesg shows:

gnome-settings-[3061]: segfault at 7f5141e3f210 ip 00007f5141e3f210 sp 00007fff3cb33d58 error 14 in libdbus-1.so.3.5.5[7f51424b0000+42000]

Without tomboy everything work fine.

tomboy 1.6.1
gnome 3.0.1
Archlinux
Comment 1 Sandy Armstrong 2011-05-12 14:05:33 UTC
Maybe some sort of session handling nonsense.

If you start Tomboy from the terminal with `tomboy --debug &> ~/tomboy-debug.log` instead of the way you normally start it, and then reproduce the bug, do you get any additional info in ~/tomboy-debug.log?
Comment 2 Jared Jennings 2011-05-12 14:29:07 UTC
Could this possibly change if we switch to dbus sharp?
Comment 3 Mariusz Libera 2011-05-12 14:34:08 UTC
This is what I got:

** Running Mono with --debug    **
[DEBUG 16:28:17.688] NoteManager created with note path "/home/mariusz/.local/share/tomboy".
[DEBUG 16:28:17.751] EnableDisable Called: enabling... True
[DEBUG 16:28:17.753] Binding key '<Ctrl><Alt>I' for '/apps/tomboy/global_keybindings/create_new_note'
[DEBUG 16:28:17.755] Binding key '<Ctrl><Alt>U' for '/apps/tomboy/global_keybindings/open_recent_changes'
[DEBUG 16:28:17.763] Unable to load icon 'tomboy-panel'.
[INFO 16:28:18.216] Initializing Mono.Addins
[DEBUG 16:28:18.289] AddinManager.OnAddinLoaded: Tomboy.Tomboy
[DEBUG 16:28:18.293] 	       Name: Tomboy.Tomboy,0.10
[DEBUG 16:28:18.293] 	Description: 
[DEBUG 16:28:18.293] 	  Namespace: Tomboy
[DEBUG 16:28:18.293] 	    Enabled: True
[DEBUG 16:28:18.294] 	       File: /usr/lib/tomboy/Tomboy.exe
[DEBUG 16:28:19.016] Loading notes
[DEBUG 16:28:19.080] AddinManager.OnAddinLoaded: Tomboy.PrintNotesAddin
[DEBUG 16:28:19.081] 	       Name: Printing Support
[DEBUG 16:28:19.081] 	Description: Allows you to print a note.
[DEBUG 16:28:19.081] 	  Namespace: Tomboy
[DEBUG 16:28:19.081] 	    Enabled: True
[DEBUG 16:28:19.081] 	       File: /usr/lib/tomboy/addins/PrintNotes.dll
[DEBUG 16:28:19.160] Tomboy remote control active.

(Tomboy:6839): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
[INFO 16:29:13.828] Received end session query
[INFO 16:29:15.038] Received end session signal
[DEBUG 16:29:15.042] Saving unsaved notes...
Tomboy: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.
Comment 4 Sandy Armstrong 2011-05-12 16:03:45 UTC
(In reply to comment #2)
> Could this possibly change if we switch to dbus sharp?

Extremely unlikely.  dbus-sharp is a fork of ndesk-dbus, with only a few new fixes and features.  The point of switching to that is simply to be using a maintained codebase.
Comment 5 Sandy Armstrong 2011-05-12 16:07:48 UTC
(In reply to comment #3)
> [INFO 16:29:13.828] Received end session query
> [INFO 16:29:15.038] Received end session signal
> [DEBUG 16:29:15.042] Saving unsaved notes...
> Tomboy: Fatal IO error 11 (Resource temporarily unavailable) on X server :0.0.

Well, it looks like we're getting all the signals we should be getting, and we're saving in response, which is expected.  Unfortunately that's not a lot of info on the error, but I guess we're probably not playing nice with the session manager anymore.  I guess you're using gnome-shell and all the standard gnome 3.0 components?
Comment 6 Mariusz Libera 2011-05-12 16:15:30 UTC
Yes, I'm using gnome-shell but tested also in fallback mode and result is the same.
Comment 7 Aaron D Borden 2011-05-12 17:13:00 UTC
Once Tomboy gets the end session signal, it should start the exit process. For some reason, the exit takes longer than the 30 second timeout so the session manager kills it.

There doesn't seem to be an issue responding to the end session query, so I don't expect it's related to the Gnome 3.0 components, but I wouldn't rule it out completely.
Comment 8 Keffin Barnaby 2011-06-20 19:04:18 UTC
I can confirm that the problem is not Gnome 3 specific. I believe this issue also occurred in Fedora 14 (90% sure, though I haven't used it since F15 beta), and it definitely occurs on a stock Ubuntu 11.04.

No such problem occurs with Banshee running on log out, which I assume rules out the core Mono runtime and the C# dbus library/bindings.
Comment 9 Mariusz Libera 2011-10-02 09:00:01 UTC
Still present in 1.8.
Comment 10 Simón 2011-10-06 12:48:36 UTC
I think is a problem with Gnome 3 or GTK-3.
I tested this in Ubuntu 11.04 with Unity (the backend is gnome 2.3x): it didn't fail.
In Ubuntu 11.10 with Unity (but the backend is gnome 3): it fails.
In Arch Linux with last Gnome Shell (3.2.0): it fails.
Comment 11 Sandy Armstrong 2011-11-04 17:56:58 UTC
*** Bug 663422 has been marked as a duplicate of this bug. ***
Comment 12 Sandy Armstrong 2011-11-04 17:57:29 UTC
From the dupe:

https://bugs.launchpad.net/tomboy/+bug/880299

Tomboy: 1.8.0
GTK: 3
Platform: Ubuntu 11.10

Tomboy slows down going out from Gnome session, both Gnome-shell, fallback, or
Ubuntu's Unity (3D and 2D). 

Testcase:
1) Open Tomboy and leave it running
2) Log out from a user session
3) Log out takes about 30 second
4) Open session and kill Tomboy before logging out
5) Logout is instantaneous
Comment 13 Janvitus 2011-12-03 10:44:01 UTC
Same trouble here: quit Tomboy before to logout from the session fix the delay.

Tomboy 1.8.0
GNOME 3.2.1
Ubuntu 11.10
GDM 3.0.4
Comment 14 esleggiero 2011-12-16 19:00:38 UTC
Same here.

Tomboy 1.8.0
Ubuntu 11.10 - amd64
Comment 15 Jared Jennings 2011-12-20 14:34:23 UTC
I've tested by building out of the git repo and the issue is gone.
The tarballs on the site look too old though, which means you have to build
from the repo.

Link for git
https://github.com/mono/dbus-sharp.git
Comment 16 Sebastien Bacher 2012-01-04 15:12:32 UTC
Jared; what did you build from git? the url you gave returns a 404 error
Comment 17 Jared Jennings 2012-01-04 15:26:31 UTC
Weird. This link appears to work though.
http://www.github.com/mono/dbus-sharp

Although at the moment I'm second guessing if that was it. I found in an issues list somewhere, that this was the issue, but yet I might have tried a different build option in Tomboy. So this for sure needs more testing.
Comment 18 Gustavo Rubio 2012-01-05 02:22:35 UTC
Jared: What version did you build? Master?
Comment 19 Jared Jennings 2012-01-05 02:25:12 UTC
Yup.
(In reply to comment #18)
> Jared: What version did you build? Master?
Comment 20 Gustavo Rubio 2012-01-05 02:30:25 UTC
I have OpenSuSE 12.1 64bit, would you happen to know what prefix or lib prefix I have to pass to the configure script? Thanks!
Comment 21 Jared Jennings 2012-01-05 02:34:18 UTC
I used the defaults for that, but then I did have to create a link.


# cd dbush-sharp/
# ./autogen.sh && make
# make
# sudo make install
# sudo ln -s /usr/local/lib64/mono/dbus-sharp-1.0/dbus-sharp.dll /usr/local/lib/mono/dbus-sharp-1.0/dbus-sharp.dll

I did rebuild Tomboy after this (don't know if it matters or not.)
Comment 22 vsteenhoute 2012-01-05 13:48:38 UTC
I build a new package for OpenSUSE 12.1 x86_64 using the last version from GIT and I still have a delay in gnome logout.
The good part is that the message saying that tomboy is not responding does not appear anymore.
But I have to wait for 20s before the logout process to continue.

Tomboy logs :

(Tomboy:13676): GdkPixbuf-WARNING **: GdkPixbufLoader finalized without calling gdk_pixbuf_loader_close() - this is not allowed. You must explicitly end the data stream to the loader before dropping the last reference.
[INFO 14:32:22.092] Received end session query
[INFO 14:32:23.027] Received end session signal
[DEBUG 14:32:23.035] Saving unsaved notes...

(Tomboy:13676): GConf-WARNING **: Got Disconnected from DBus.

Tomboy: Fatal IO error 11 (Ressource temporairement non disponible) on X server :0.0.

Do we have to rebuild dbus-sharp-glib-0.5.0-3.1.2.noarch too ?
Comment 23 Gustavo Rubio 2012-01-05 22:00:42 UTC
I built the source for dbus-sharp from GIT and tried building both tomboy 1.8 and 1.9 (unstable) with the same results, no change, logout takes like 20-30 seconds.

Using OpenSuSE 12.1 x86_64

Any advice will be welcome.
Comment 24 Sam Lin 2012-01-08 01:45:25 UTC
Created attachment 204821 [details] [review]
exit on Stop signal of session manager
Comment 25 Sam Lin 2012-01-08 01:47:51 UTC
Created attachment 204822 [details] [review]
exit on Stop signal of session manager

I checked dbus messages of gnome session manager and it seems tomboy doesn't take action to response to Stop signal.

I add Stop signal callback in Tomboy and it solved the issue.
Comment 26 Jared Jennings 2012-01-09 21:36:53 UTC
Review of attachment 204822 [details] [review]:

Doesn't work for me.
I added logging to that method and it never fired the log message.
I'm on 12.1 GNOME-SHELL 3.2
Comment 27 Jared Jennings 2012-01-09 21:39:46 UTC
Review of attachment 204821 [details] [review]:

Duplicate?
Comment 28 vsteenhoute 2012-01-09 23:08:26 UTC
Work like a charm for me :-)
I'm using OpenSUSE 12.1 x86_64.

I have build updated package for dbus-sharp and tomboy and submited it to OpenSUSE 12.1 updates.
You can wait for the update to come throught the official canal or you can use this repo to test :
http://download.opensuse.org/repositories/home:/civ75:/branches:/openSUSE:/12.1:/Update/standard/

Just install/update dbus-sharp, tomboy and tomboy-lang.
Comment 29 Sam Lin 2012-01-16 02:06:33 UTC
Review of attachment 204822 [details] [review]:

another way:

exit on end of OnEndSession() if your session doesn't fire stop signal.



diff --git a/Tomboy/GnomeApplication.cs b/Tomboy/GnomeApplication.cs
index b076003..58491c8 100644
--- a/Tomboy/GnomeApplication.cs
+++ b/Tomboy/GnomeApplication.cs
@@ -175,6 +175,7 @@ namespace Tomboy
 			} catch (Exception e) {
 				Logger.Debug ("Failed to respond to session manager: {0}", e.Message);
 			}
+			Exit(0);
 		}
Comment 30 Sam Lin 2012-01-16 02:15:33 UTC
Created attachment 205329 [details] [review]
exit on OnEndSession

another way by exiting on OnEndSession in case session manager doesn't fire stop signal.
Comment 31 Jared Jennings 2012-01-16 03:21:14 UTC
How come it still doesn't work for me. I even tried the Repo from Steenhoute.
Comment 32 Sam Lin 2012-01-16 03:30:08 UTC
(In reply to comment #31)
> How come it still doesn't work for me. I even tried the Repo from Steenhoute.

I think the tomboy side should be well handled with this patch.

if it doesn't work for you, you may need to check if your session manager work normally (send EndSession signal). dbus-monitor can confirm this.

I tested this with Ubuntu 11.10, cinnamon and unity, tomboy 1.8.0 + patch.
Comment 33 Jared Jennings 2012-01-16 03:54:29 UTC
(In reply to comment #32)
> I tested this with Ubuntu 11.10, cinnamon and unity, tomboy 1.8.0 + patch.

Bummer. I don't see what I'm suppose to. Maybe another time.
I'm going to mark these as commit and give the others a chance to comment.
Comment 34 Jared Jennings 2012-01-16 03:55:04 UTC
Review of attachment 204822 [details] [review]:

Works for several different builds.
Comment 35 Jared Jennings 2012-01-16 03:56:10 UTC
Review of attachment 205329 [details] [review]:

Commit in next build.
Comment 36 Jared Jennings 2012-01-16 16:52:37 UTC
Review of attachment 204822 [details] [review]:

r84797b9a9df3
Comment 37 Jared Jennings 2012-01-16 16:52:48 UTC
Review of attachment 205329 [details] [review]:

r84797b9a9df3