This repository was archived by the owner on Dec 8, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 47
This repository was archived by the owner on Dec 8, 2024. It is now read-only.
PostSession-Script gets terminated by SIGKILL (mint 18 MATE) #188
Copy link
Copy link
Open
Description
If i use a PostSession-Script in stock Mint 18 MATE, it will be killed on shutdown or restart while it's running
Sep 22 14:16:10 alice systemd-logind[700]: System is rebooting.
Sep 22 14:16:10 alice mdm[1046]: DEBUG: Sending SESSPID == 0 for slave 1046
Sep 22 14:16:10 alice mdm[1029]: mdm[1029]: DEBUG: Got SESSPID == 0
Sep 22 14:16:10 alice mdm[1046]: DEBUG: mdm_slave_session_stop: bob on :0
Sep 22 14:16:10 alice mdm[1046]: DEBUG: mdm_slave_session_stop: Running post session script
Sep 22 14:16:10 alice mdm[1029]: DEBUG: Got SESSPID == 0
Sep 22 14:16:10 alice mdm[1046]: DEBUG: Forking extra process: /etc/mdm/PostSession/Default
Sep 22 14:16:10 alice mdm[1029]: mdm[1029]: DEBUG: mainloop_sig_callback: Got signal 17
Sep 22 14:16:10 alice mdm[1029]: mdm[1029]: WARNING: mdm_cleanup_children: child 1046 crashed of signal 1
Sep 22 14:16:10 alice mdm[1029]: mdm[1029]: WARNING: mdm_cleanup_children: Slave crashed, killing its children
Sep 22 14:16:10 alice mdm[1029]: mdm[1029]: DEBUG: mdm_sleep_no_signal 1
Sep 22 14:16:10 alice mdm[1029]: DEBUG: mainloop_sig_callback: Got signal 17
Sep 22 14:16:10 alice mdm[1029]: WARNING: mdm_cleanup_children: child 1046 crashed of signal 1
Sep 22 14:16:10 alice mdm[1029]: WARNING: mdm_cleanup_children: Slave crashed, killing its children
Sep 22 14:16:10 alice mdm[1029]: DEBUG: mdm_sleep_no_signal 1
Sep 22 14:16:10 alice systemd[1]: Stopping Session c1 of user bob.
The problem is easily reproducable on a stock system, just insert some sleep in the /etc/mdm/PostSession/Default-File:
#!/bin/bash
echo "$(date) start" >> /var/log/post_debug.log
logger -i post-session "PID: $$ - Shutting Down"
sleep 60
echo "$(date) stop" >> /var/log/post_debug.log
exit 0
The Log statement will sometimes work, but mostly the script gets killed before that.
If i comment the function call for mdm_slave_quick_exit (exit_code_to_use); in line 697 of daemon/slave.c (in function term_session_stop_and_quit) the post session scripts gets executed until it does an exit by itself.
Metadata
Metadata
Assignees
Labels
No labels