Debian Bug report logs -
#701916
Kill local user processes on logout
Reported by: Alkis Georgopoulos <alkisg@gmail.com>
Date: Thu, 28 Feb 2013 18:30:01 UTC
Severity: important
Tags: moreinfo, patch, unreproducible, upstream
Found in version ltsp/5.4.2-5
Fixed in version ltsp/5.4.6-1
Done: Alkis Georgopoulos <alkisg@gmail.com>
Bug is archived. No further changes may be made.
Toggle useless messages
Report forwarded
to debian-bugs-dist@lists.debian.org, LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#701916; Package ltsp-client-core.
(Thu, 28 Feb 2013 18:30:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Alkis Georgopoulos <alkisg@gmail.com>:
New Bug report received and forwarded. Copy sent to LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>.
(Thu, 28 Feb 2013 18:30:04 GMT) (full text, mbox, link).
Message #5 received at submit@bugs.debian.org (full text, mbox, reply):
Package: ltsp-client-core
Version: 5.4.2-5
Severity: grave
Tags: patch upstream
LTSP fat clients and also thin clients that use localapps, mount
/home/username with SSHFS and unmount it on logout.
Unfortunately at the point where the unmount happens, local processes
are still running, and when Xorg killed them later on, they end up
writing their data to the local tmpfs filesystem because the SSHFS mount
is no longer there.
That's one reason for data loss (hence the grave severity), but there's
another, worse one:
On the next login of the same user, /home/username/<data of the
processes I mentioned above> exist locally on the tmpfs, so the LTSP
code thinks that the sysadmin has taken care to mount the user home dirs
via other means (e.g. NFS), so the SSHFS mount is no longer needed.
Thus, all user sessions after the first one, use a local tmpfs
/home/username. Users don't see their existing documents or settings,
and any new document they write, will be saved in the local tmpfs and
lost on client reboot.
Here's the upstream bug report:
https://bugs.launchpad.net/ltsp/+bug/1093144
And the patch:
http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2462
Only one file needs to be patched,
client/localapps/ldm-rc.d/X99-zlocalapps-cleanup.
Added tag(s) pending.
Request was from Vagrant Cascadian <vagrant@debian.org>
to 700881-submit@bugs.debian.org.
(Fri, 01 Mar 2013 02:09:06 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#701916; Package ltsp-client-core.
(Fri, 01 Mar 2013 02:09:09 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@debian.org>:
Extra info received and forwarded to list. Copy sent to LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>.
(Fri, 01 Mar 2013 02:09:09 GMT) (full text, mbox, link).
Message #12 received at 701916@bugs.debian.org (full text, mbox, reply):
Control: tags 701916 pending
Control: tags 700881 pending
Committed the following to the ltsp-debian-packaging bzr branch:
diff -Nru ltsp-5.4.2/debian/changelog ltsp-5.4.2/debian/changelog
--- ltsp-5.4.2/debian/changelog 2013-01-08 22:01:18.000000000 -0800
+++ ltsp-5.4.2/debian/changelog 2013-02-28 17:46:18.000000000 -0800
@@ -1,3 +1,15 @@
+ltsp (5.4.2-6) UNRELEASED; urgency=low
+
+ * Add patch to run jetpipe from ltsp-client-core init script rather than
+ init-ltsp.d hook (Closes: #700881). Running from init-ltsp.d is far too
+ early in the boot process and causes daemonization to fail, which stops
+ boot from continuing. Thanks to James McQuillan for the report.
+ * Avoid data loss with fatclients or localapps by killing local user
+ processes at end of session (LP: #1093144, Closes: #701916).
+ Thanks to Alkis Georgopoulos for the patch!
+
+ -- Vagrant Cascadian <vagrant@debian.org> Mon, 18 Feb 2013 13:50:35 -0800
+
ltsp (5.4.2-5) unstable; urgency=low
* ltsp-client-core: Depend on initramfs-tools 0.99, to ensure /run is
diff -Nru ltsp-5.4.2/debian/patches/jetpipe-from-ltsp-client-core-init-script ltsp-5.4.2/debian/patches/jetpipe-from-ltsp-client-core-init-script
--- ltsp-5.4.2/debian/patches/jetpipe-from-ltsp-client-core-init-script 1969-12-31 16:00:00.000000000 -0800
+++ ltsp-5.4.2/debian/patches/jetpipe-from-ltsp-client-core-init-script 2013-02-18 14:14:37.000000000 -0800
@@ -0,0 +1,82 @@
+Author: Vagrant Cascadian <vagrant@debian.org>
+Bug-Debian: http://bugs.debian.org/700881
+Upstream-Bug: https://bugs.launchpad.net/ltsp/+bug/996533
+
+Start jetpipe from ltsp-client-core init script, as it fails to daemonize when
+executed from init-ltsp.d, which is run before /sbin/init is started.
+
+Index: ltsp-5.4.2/client/initscripts/ltsp-core
+===================================================================
+--- ltsp-5.4.2.orig/client/initscripts/ltsp-core 2013-02-18 14:07:20.509826079 -0800
++++ ltsp-5.4.2/client/initscripts/ltsp-core 2013-02-18 14:07:25.593851287 -0800
+@@ -35,6 +35,33 @@
+ . /lib/lsb/init-functions
+ . /usr/share/ltsp/ltsp-init-common
+
++start_printers() {
++for I in 0 1 2; do
++ eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\}
++ if [ -n "${PRINTER_DEVICE}" ]; then
++ eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\}
++ eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\}
++ eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\}
++ eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\}
++ eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\}
++
++ JETPIPE_ARGS=
++ [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}"
++ [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}"
++ [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}"
++ if [ -n "$FLOW" ]; then
++ if [ "$FLOW" = "soft" ]; then
++ JETPIPE_ARGS="${JETPIPE_ARGS} -x"
++ else
++ JETPIPE_ARGS="${JETPIPE_ARGS} -r"
++ fi
++ fi
++
++ /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT}
++ fi
++done
++}
++
+ case "$1" in
+ start)
+ log_action_begin_msg "Starting LTSP client..."
+@@ -48,6 +75,7 @@
+ /bin/plymouth quit --retain-splash
+ fi
+
++ start_printers || true
+ start_screen_sessions || true
+ start_sound || true
+
+Index: ltsp-5.4.2/client/share/ltsp/init-ltsp.d/50-jetpipe
+===================================================================
+--- ltsp-5.4.2.orig/client/share/ltsp/init-ltsp.d/50-jetpipe 2013-02-18 14:07:20.509826079 -0800
++++ /dev/null 1970-01-01 00:00:00.000000000 +0000
+@@ -1,24 +0,0 @@
+-for I in 0 1 2; do
+- eval PRINTER_DEVICE=\$\{PRINTER_${I}_DEVICE\}
+- if [ -n "${PRINTER_DEVICE}" ]; then
+- eval PORT=\$\{PRINTER_${I}_PORT:="910${I}"\}
+- eval BAUD=\$\{PRINTER_${I}_SPEED:-"9600"\}
+- eval SIZE=\$\{PRINTER_${I}_DATABITS:-"8"\}
+- eval PARITY=\$\{PRINTER_${I}_PARITY:-"none"\}
+- eval FLOW=\$\{PRINTER_${I}_FLOWCTRL:-"soft"\}
+-
+- JETPIPE_ARGS=
+- [ -n "$BAUD" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -b ${BAUD}"
+- [ -n "$SIZE" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -y ${SIZE}"
+- [ -n "$PARITY" ] && JETPIPE_ARGS="${JETPIPE_ARGS} -p ${PARITY}"
+- if [ -n "$FLOW" ]; then
+- if [ "$FLOW" = "soft" ]; then
+- JETPIPE_ARGS="${JETPIPE_ARGS} -x"
+- else
+- JETPIPE_ARGS="${JETPIPE_ARGS} -r"
+- fi
+- fi
+-
+- /usr/sbin/jetpipe ${JETPIPE_ARGS} ${PRINTER_DEVICE} ${PORT}
+- fi
+-done
diff -Nru ltsp-5.4.2/debian/patches/kill-local-processes ltsp-5.4.2/debian/patches/kill-local-processes
--- ltsp-5.4.2/debian/patches/kill-local-processes 1969-12-31 16:00:00.000000000 -0800
+++ ltsp-5.4.2/debian/patches/kill-local-processes 2013-02-28 17:19:10.000000000 -0800
@@ -0,0 +1,53 @@
+ 2462 Alkis Georgopoulos 2013-02-27
+ revision-id:alkisg@gmail.com-20130227091132-h2ql7stdqy42yhx8
+ Kill local user processes on logout (LP: #1093144).
+
+=== modified file 'client/localapps/ldm-rc.d/X99-zlocalapps-cleanup'
+--- old/client/localapps/ldm-rc.d/X99-zlocalapps-cleanup 2013-02-27 09:09:17 +0000
++++ new/client/localapps/ldm-rc.d/X99-zlocalapps-cleanup 2013-02-27 09:11:32 +0000
+@@ -1,9 +1,4 @@
+ if boolean_is_true "$LOCAL_APPS"; then
+- # Copy back passwd and group
+- for i in passwd group; do
+- [ -e "${LOCALAPPS_CACHE}/${i}" ] && cp "${LOCALAPPS_CACHE}/${i}" /etc/${i}
+- done
+-
+ # Clean up cups config
+ [ -r "/etc/cups/client.conf" ] && rm -f /etc/cups/client.conf
+
+@@ -16,6 +11,22 @@
+
+ # Unmount sshfs and remove the mount dir
+ if [ -n "$SSHFS_HOME" ]; then
++ if [ -n "$LDM_USERNAME" ]; then
++ # The user processes need to be terminated before $LDM_HOME gets
++ # unmounted, otherwise they end up writing their data in the local
++ # tmpfs filesystem.
++ # Give them up to 3 seconds to terminate, then kill them.
++ pkill -u "$LDM_USERNAME"
++ i=0
++ while pgrep -u "$LDM_USERNAME" >/dev/null; do
++ if [ "$i" -ge 3 ]; then
++ pkill -KILL -u "$LDM_USERNAME"
++ break
++ fi
++ sleep 1
++ i=$(($i+1))
++ done
++ fi
+ fusermount -uqz ${LDM_HOME}
+ rmdir ${LDM_HOME}
+ fi
+@@ -32,6 +43,11 @@
+ fi
+
+ rm $LOCALAPPSD_PIDFILE
++
++ # Copy back passwd and group
++ for i in passwd group; do
++ [ -e "${LOCALAPPS_CACHE}/${i}" ] && cp "${LOCALAPPS_CACHE}/${i}" /etc/${i}
++ done
+ fi
+
+ # Clean up remote apps tmpdir
+
diff -Nru ltsp-5.4.2/debian/patches/series ltsp-5.4.2/debian/patches/series
--- ltsp-5.4.2/debian/patches/series 2012-11-20 21:27:32.000000000 -0800
+++ ltsp-5.4.2/debian/patches/series 2013-02-28 17:46:38.000000000 -0800
@@ -10,3 +10,5 @@
move-ltspconfig-cache
fatclients-return-0
cryptsetup-swap-with-nbd
+jetpipe-from-ltsp-client-core-init-script
+kill-local-processes
I don't have time to test and upload this weekend, but should be able to get to
it by 2013-03-05 or so...
live well,
vagrant
Information forwarded
to debian-bugs-dist@lists.debian.org, LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#701916; Package ltsp-client-core.
(Fri, 08 Mar 2013 23:39:03 GMT) (full text, mbox, link).
Acknowledgement sent
to Vagrant Cascadian <vagrant@debian.org>:
Extra info received and forwarded to list. Copy sent to LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>.
(Fri, 08 Mar 2013 23:39:03 GMT) (full text, mbox, link).
Message #17 received at 701916@bugs.debian.org (full text, mbox, reply):
Control: tags 701916 -pending +unreproducible
I'm having trouble reproducing the problem on a fatclient... I've tried with
icewm, LXDE, XFCE and GNOME, with a variety of applications open.
None seem to linger after logout as a fatclient, and the homedir gets
unmounted appropriately...
Also tried with localapps, but couldn't reproduce the problem.
Please provide more information about how to reproduce the problem when you
get a chance!
live well,
vagrant
Removed tag(s) pending.
Request was from Vagrant Cascadian <vagrant@debian.org>
to 701916-submit@bugs.debian.org.
(Fri, 08 Mar 2013 23:39:03 GMT) (full text, mbox, link).
Added tag(s) unreproducible.
Request was from Vagrant Cascadian <vagrant@debian.org>
to 701916-submit@bugs.debian.org.
(Fri, 08 Mar 2013 23:39:04 GMT) (full text, mbox, link).
Added tag(s) moreinfo.
Request was from Vagrant Cascadian <vagrant@debian.org>
to control@bugs.debian.org.
(Fri, 08 Mar 2013 23:48:03 GMT) (full text, mbox, link).
Information forwarded
to debian-bugs-dist@lists.debian.org, LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>:
Bug#701916; Package ltsp-client-core.
(Wed, 20 Mar 2013 04:06:04 GMT) (full text, mbox, link).
Acknowledgement sent
to Michael Gilbert <michael.s.gilbert@gmail.com>:
Extra info received and forwarded to list. Copy sent to LTSP Debian Maintainers <pkg-ltsp-devel@lists.alioth.debian.org>.
(Wed, 20 Mar 2013 04:06:04 GMT) (full text, mbox, link).
Message #28 received at 701916@bugs.debian.org (full text, mbox, reply):
control: severity -1 important
Downgrading severity since it seems unreproducible on debian.
Best wishes,
Mike
Severity set to 'important' from 'grave'
Request was from Michael Gilbert <michael.s.gilbert@gmail.com>
to 701916-submit@bugs.debian.org.
(Wed, 20 Mar 2013 04:06:04 GMT) (full text, mbox, link).
Reply sent
to Alkis Georgopoulos <alkisg@gmail.com>:
You have taken responsibility.
(Sat, 30 Apr 2016 05:57:05 GMT) (full text, mbox, link).
Notification sent
to Alkis Georgopoulos <alkisg@gmail.com>:
Bug acknowledged by developer.
(Sat, 30 Apr 2016 05:57:05 GMT) (full text, mbox, link).
Message #35 received at 701916-done@bugs.debian.org (full text, mbox, reply):
Version: 5.4.6
Fix released in LTSP 5.4.6
(http://bazaar.launchpad.net/~ltsp-upstream/ltsp/ltsp-trunk/revision/2502 <http://bazaar.launchpad.net/%7Eltsp-upstream/ltsp/ltsp-trunk/revision/2502>).
No longer marked as fixed in versions 5.4.6.
Request was from Andreas Beckmann <anbe@debian.org>
to control@bugs.debian.org.
(Tue, 14 Jun 2016 23:27:03 GMT) (full text, mbox, link).
Marked as fixed in versions ltsp/5.4.6-1.
Request was from Andreas Beckmann <anbe@debian.org>
to control@bugs.debian.org.
(Tue, 14 Jun 2016 23:27:04 GMT) (full text, mbox, link).
Bug archived.
Request was from Debbugs Internal Request <owner@bugs.debian.org>
to internal_control@bugs.debian.org.
(Wed, 13 Jul 2016 07:26:30 GMT) (full text, mbox, link).
Send a report that this bug log contains spam.
Debian bug tracking system administrator <owner@bugs.debian.org>.
Last modified:
Sat Jul 1 12:52:52 2023;
Machine Name:
buxtehude
Debian Bug tracking system
Debbugs is free software and licensed under the terms of the GNU
Public License version 2. The current version can be obtained
from https://bugs.debian.org/debbugs-source/.
Copyright © 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson,
2005-2017 Don Armstrong, and many other contributors.