Ticket #1257 (new defect)

Opened 4 years ago

Last modified 3 years ago

sugar-datastore not stopped on logout (+automatic re-login)

Reported by: sascha_silbe Owned by: tomeu
Priority: Urgent Milestone: 0.86
Component: sugar Version: Git as of bugdate
Severity: Critical Keywords:
Cc: Distribution/OS: Unspecified
Bug Status: Needinfo

Description

After choosing "Logout" sugar-datastore keeps running, so when the next Sugar session starts up (which is immediately afterwards on DebXO) two sugar-datastore instances are running, both trying to write the Xapian index and both failing. We should make sure sugar-datastore has stopped (wait for DBus signal Stopped) before exiting sugar-session.

On unclean shutdowns (e.g. zapping the X server with Alt+Ctrl+BS) the situation is similar, though it's less clear how to handle that case (as the old instance cannot be reached via DBus from the new session - maybe use a PID file?).

Attachments

datastore.log Download (39.7 KB) - added by sascha_silbe 4 years ago.
old session: datastore.log
shell.log Download (36.4 KB) - added by sascha_silbe 4 years ago.
old session: shell.log
datastore.2.log Download (40.6 KB) - added by sascha_silbe 4 years ago.
new session: datastore.log
shell.2.log Download (78.1 KB) - added by sascha_silbe 4 years ago.
new session: shell.log

Change History

Changed 4 years ago by sascha_silbe

old session: datastore.log

Changed 4 years ago by sascha_silbe

old session: shell.log

Changed 4 years ago by sascha_silbe

new session: datastore.log

Changed 4 years ago by sascha_silbe

new session: shell.log

Changed 4 years ago by tomeu

The DBus session should be closed when the sugar-session client finishes, and the DS process should exit when the dbus connection closes. We should see why this isn't working.

Changed 4 years ago by erikos

  • priority changed from Unspecified by Maintainer to Urgent
  • status_field changed from New to Needinfo
  • milestone changed from Unspecified by Release Team to 0.86

Changed 4 years ago by sascha_silbe

I've just discovered another reason for this to happen: My ~/.xsession (created a long time ago) used dbus-launch without --exit-with-session (probably because I didn't know this option). I need to investigate why I put the dbus-launch there / whether it's still necessary (since dbus support is activated in /etc/X11/Xsession.options).

Changed 3 years ago by tomeu

Ok, so my understanding of the issue is that we need to make the shell process exit only after the DS has disappeared from the bus by either listening to the NameOwnerChanged signal or the less standard Closed signal in the Datastore iface as Sascha suggests. I'm not sure which one is best.

Note: See TracTickets for help on using tickets.