GNOME Bugzilla – Bug 303034
'hang' after exiting the session
Last modified: 2007-09-19 19:52:11 UTC
[This is with CVS sabayon (2005-05-04), gamin and python-gamin 0.26, python-gtk 2.6.1 (with python 2.4), python-gnome 2.10 and everything else basically as up-to-date as possible. OS is ubuntu breezy (aka unstable.)] I've built sabayon into /usr/local/ and run it. After creating a user type and editing it (changing only one gconf key, to test) I quit the preferences app in the user editing session. sabayon-session doesn't exit, just sort of sits there, and so the profile dialog doesn't become sensitive again. If I kill sabayon-session, the profile dialog becomes sensitive again, but no file is saved that I can find. According to gdb, sabayon-session is sitting in poll(). Suggestions for debugging, or anything else I can give you? Output on the terminal: louie@towel:~/cvs/sabayon$ sudo /usr/local/bin/sabayon Could not init font path element /usr/X11R6/lib/X11/fonts/TTF/, removing from list! Could not init font path element /usr/X11R6/lib/X11/fonts/CID/, removing from list! /etc/gdm/Xsession: Beginning session setup... Xsession: unable to launch "gnome" X session --- "gnome" not found; falling back to default session. Syntax error SESSION_MANAGER=local/towel:/tmp/.ICE-unix/27789 /dev/dsp: Permission denied ** (gnome-session:27789): WARNING **: Esound failed to start. Gnome-Message: gnome_execute_async_with_env_fds: returning -1 Window manager warning: Log level 32: could not find XKB extension. Gnome-Message: gnome_execute_async_with_env_fds: returning -1 Gnome-Message: gnome_execute_async_with_env_fds: returning -1 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 Traceback (most recent call last):
+ Trace 59171
change.get_source ().commit_change (change, mandatory)
{ "mandatory" : mandatory })
raise ProfileStorageException (_("Cannot add non-existent file '%s'") % src_path)
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.NEW' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.LCK' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-ES2bps' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-Rufvwa' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-t7QAmI' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-ILTgQ0' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-PDD7mg' Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.fonts.cache-1.TMP-ySsxQb' ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 Traceback (most recent call last):
'/tmp/sabayon-temp-home-ifjjPh/.gtkrc-1.2-gnome2.new' Traceback (most recent call last): File "/usr/local/lib/python2.4/site-packages/sabayon/monitorwindow.py", line 113, in __handle_save self.profile.sync_changes () File "/usr/local/lib/python2.4/site-packages/sabayon/userprofile.py", line 330, in sync_changes s.sync_changes () File "/usr/local/lib/python2.4/site-packages/sabayon/sources/gconfsource.py", line 200, in sync_changes self.storage.add (".gconf.xml.mandatory", self.home_dir, self.name) File "/usr/local/lib/python2.4/site-packages/sabayon/storage.py", line 516, in add raise ProfileStorageException (_("Cannot add non-existent file '%s'") % src_path) sabayon.storage.ProfileStorageException: Cannot add non-existent file '/tmp/sabayon-temp-home-ifjjPh/.gconf.xml.mandatory' ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ** (gnome-cups-icon:27913): WARNING **: failed request with status 1030 ICE default IO error handler doing an exit(), pid = 27854, errno = 0 The application '-c' lost its connection to the display :1.0; most likely the X server was shut down or you killed/destroyed the application. gnome-terminal: Fatal IO error 104 (Connection reset by peer) on X server :1.0. Window manager warning: Fatal IO error 104 (Connection reset by peer) on display ':1.0'. The application 'gnome-panel' lost its connection to the display :1.0; most likely the X server was shut down or you killed/destroyed the application. The application 'gnome-volume-manager' lost its connection to the display :1.0; most likely the X server was shut down or you killed/destroyed the application. The application 'gnome-cups-icon' lost its connection to the display :1.0; most likely the X server was shut down or you killed/destroyed the application. The application 'nautilus' lost its connection to the display :1.0; most likely the X server was shut down or you killed/destroyed the application.
Could you attach a log obtained with SABAYON_DEBUG=all ? (i.e. run SABAYON_DEBUG=all sabayon, select your profile, click Properties and exit the session after a while)
same issue here "Properties" doesn't hang, you mean "edit"?
Created attachment 46099 [details] edit's output when closing the gdmflexiserver the sabayon window hangs ctrl-C gives: Traceback (most recent call last):
+ Trace 59272
os.spawnv (os.P_WAIT, argv[0], argv)
return _spawnvef(mode, file, args, None, execv)
wpid, sts = waitpid(pid, 0) KeyboardInterrupt Traceback (most recent call last):
main_loop.run () KeyboardInterrupt
that happens with sabayon 0.17 and the current tarball versions for GNOME
(Btw, gdmflexiserver isn't involved at all :-) What's happening is that its hanging while runnig the command /usr/sbin/usermod -d "" sabayon-admin Otherwise I'd expect to see (27086) proto-session: Deleting temporary homedir '/tmp/foobar' after (27086) usermod: Executing ['/usr/sbin/usermod', '-d', '', 'sabayon-admin'] Is the command still running? What happens if you run it from the command line? Perhaps strace -f the whole thing to see what's going on?
'ps ax' gives: 14399 pts/3 S+ 0:00 python /usr/bin/sabayon 14402 pts/3 S+ 0:00 python /usr/lib/sabayon/sabayon-session sabayon-admin /tmp/profile-sabayon-admin-XNqAsj.zip 14408 pts/3 Z+ 0:00 [Xnest] <defunct> 14411 pts/3 Z+ 0:00 [python] <defunct> 14414 ? Zs 0:01 [x-session-manag] <defunct> 14463 ? Ss 0:00 /usr/bin/ssh-agent /usr/bin/dbus-launch --exit-with-session x-session-manager 14470 ? S 0:01 /usr/lib/gconf2/gconfd-2 15 14583 pts/3 Z+ 0:00 [usermod] <defunct> running "usermod -d "" sabayon-admin" from the command line works fine
Created attachment 46233 [details] new log <markmc> def __admin_tool_child_watch_handler (self, pid, status): <markmc> move the self.emit("finished") to before self.force_quit() <markmc> that way if something goes wrong in force_quit() the main loop should exit anyway log with this change
Okay, committed this fix: http://www.gnome.org/~markmc/code/sabayon-uninterruptible-spawn.patch 2005-05-09 Mark McLoughlin <mark@skynet.ie> Fix hang when exiting the prototype session on Ubuntu. Problem turned out to be that os.spawn() doesn't handle EINTR from waitpid() on Linux: http://sourceforge.net/tracker/?group_id=5470&atid=105470&func=detail&aid=686667 Thanks to Sebastien Bacher <seb128@debian.org> for help in tracking the problem down. * lib/usermod.py: (_uninterruptible_spawn): ignore EINTR from os.spawn() (set_shell), (set_homedir): use _uninterruptible_spawn() * lib/protosession.py: (ProtoSession.__session_child_watch_handler): emit the "finished" signal before anything else so that we still quit the mainloop even if we get an exception.