GNOME Bugzilla – Bug 681888
PostSession no longer run when using gdm 3.5.x (git master)
Last modified: 2012-09-06 21:06:09 UTC
While I was trying to debug something else, I recognized that after an recent update of gdm (currently 3.5.5 + git), the PostSession script is no longer executed. This is what simple-slave is saying when logging out (always similar): gdm-simple-slave[29804]: DEBUG(+): GdmSession: Emitting 'session-exited' signal with exit code '0' gdm-simple-slave[29804]: DEBUG(+): Writing logout record gdm-simple-slave[29804]: DEBUG(+): using ut_type DEAD_PROCESS gdm-simple-slave[29804]: DEBUG(+): using ut_tv time 1344986006 gdm-simple-slave[29804]: DEBUG(+): using ut_pid 29897 gdm-simple-slave[29804]: DEBUG(+): using ut_id :0 gdm-simple-slave[29804]: DEBUG(+): using ut_host :0 gdm-simple-slave[29804]: DEBUG(+): using ut_line :0 gdm-simple-slave[29804]: DEBUG(+): Writing wtmp logout record to /var/log/wtmp gdm-simple-slave[29804]: DEBUG(+): GdmSimpleSlave: session exited with code 0 gdm-simple-slave[29804]: DEBUG(+): slave finished gdm-simple-slave[29804]: DEBUG(+): GdmSimpleSlave: Stopping simple_slave gdm-simple-slave[29804]: DEBUG(+): GdmSlave: Stopping slave gdm-simple-slave[29804]: DEBUG(+): GdmSession: Closing session gdm-simple-slave[29804]: DEBUG(+): GdmSession: Stopping all conversations gdm-simple-slave[29804]: DEBUG(+): GdmSessionWorkerJob: Stopping job pid:29888 gdm-simple-slave[29804]: DEBUG(+): GdmCommon: sending signal 15 to process 29888 gdm-simple-slave[29804]: DEBUG(+): GdmSessionWorkerJob: Waiting on process 29888 gdm-simple-slave[29804]: DEBUG(+): GdmCommon: process (pid:29888) done (signal:15) gdm-simple-slave[29804]: DEBUG(+): GdmSessionWorkerJob: SessionWorkerJob died gdm-simple-slave[29804]: DEBUG(+): GdmSession: Disposing session gdm-simple-slave[29804]: DEBUG(+): GdmSession: Closing session gdm-simple-slave[29804]: DEBUG(+): GdmSession: Stopping all conversations gdm-simple-slave[29804]: DEBUG(+): GdmServer: Stopping server gdm-simple-slave[29804]: DEBUG(+): GdmCommon: sending signal 15 to process 29807 gdm-simple-slave[29804]: DEBUG(+): GdmServer: Waiting on process 29807 gdm-simple-slave[29804]: DEBUG(+): GdmCommon: process (pid:29807) done (status:0) gdm-simple-slave[29804]: DEBUG(+): GdmServer: Server died gdm-simple-slave[29804]: DEBUG(+): GdmSignalHandler: Removing handler 10: signum=11 0x80529a0 gdm-simple-slave[29804]: DEBUG(+): GdmSlave: Stopping slave gdm-simple-slave[29804]: DEBUG(+): GdmSignalHandler: Finalizing signal handler gdm-simple-slave[29804]: DEBUG(+): Slave finished
In daemon/gdm-simple-slave.c: on_session_exited () self->priv->session_is_running is set to false before gdm_slave_stop () is run, where the code lives that is executing the PostSession script. When self->priv->session is false, gdm_slave_run_script () is never getting executed. So if a session exits normally, PostSession/Default is never getting executed. Is this the intended behaviour?
no, we've recently reworked how stop handling is done, this is probably fall out from that.
I think this should do it: 360772d slave: don't prematurely set is_running to FALSE Please reopen if you continue to hit issues.
Created attachment 223679 [details] [review] slave: don't prematurely set is_running to FALSE When the session ends we 1) set the session id to NULL 2) set is_running to FALSE 3) call gdm_slave_stop which 4) runs the PostSesssion script if is_running is true 5) sets is_running to FALSE 4) will always fail because of 2, and 2 is unnecessary because of 5. This commit defers settings is_running to false until gdm_session_stop. Spotted by Gert Kulyk
Yeah, your patch fixes the issue. Thank you!
just noticed in comment 2 i wrote "no," like i was disagreeing with you, but i actually meant to write "note,"