TMPTIME=0 no longer clears /tmp on boot

Bug #524196 reported by Roland Hughes
74
This bug affects 12 people
Affects Status Importance Assigned to Milestone
mountall (Ubuntu)
Confirmed
Undecided
Unassigned
sysvinit (Ubuntu)
Invalid
Undecided
Unassigned
upstart (Ubuntu)
New
Undecided
Unassigned

Bug Description

Binary package hint: sysvinit

I just checked this today, and even after a fresh reboot, I still have files in /tmp from 12/2009. It appears this setting is ignored now.

roland@logikaldesktop1:~$ lsb_release -rd
Description: Ubuntu 9.10
Release: 9.10

ProblemType: Bug
Architecture: i386
Date: Thu Feb 18 20:07:48 2010
DistroRelease: Ubuntu 9.10
InstallationMedia: Kubuntu 9.10 "Karmic Koala" - Release i386 (20091028.1)
Package: initscripts 2.87dsf-4ubuntu12
ProcEnviron:
 LANGUAGE=
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 2.6.31-19.56-generic-pae
SourcePackage: sysvinit
Uname: Linux 2.6.31-19-generic-pae i686
XsessionErrors:
 (polkit-gnome-authentication-agent-1:2138): GLib-CRITICAL **: g_once_init_leave: assertion `initialization_value != 0' failed
 (<unknown>:2159): GLib-WARNING **: g_set_prgname() called multiple times

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote :
Revision history for this message
rennradler (bernhard67) wrote :

I can confirm this behaviour on Kubuntu 9.10 amd64 release . I have TMPTIME=0 in /etc/default/rcS. But df gives this after reboot:

# df -h
Dateisystem Größe Benut Verf Ben% Eingehängt auf
/dev/sda3 46G 6,5G 38G 15% /
/dev/sda1 92G 68G 20G 78% /tmp
/dev/sda4 543G 113G 403G 22% /home

68G in /tmp!

In my case /tmp is mounted as seperate file system and not pat of the root file system. /dev/sda1 is a spare partition for testing new Ubuntu installations or distribution upgrades. Since there is nothing to be tested at the moment I thought why not using it as /tmp for my production instalation.

Now, when I don't mount /dev/sda1 on /tmp, i.e. /tmp is part of the root file systen everythink works fine and /tmp is cleaned up after reboot.

It would be interesting to hear about your stetup.

I suspect it is a bug in mountall which is actually performing the cleaning job during bootup.

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote : Re: [Bug 524196] Re: TMPTIME=0 no longer clears /tmp on boot

I also put /tmp on its own partition as I do with /home and several other
important trees.

On Saturday 13 March 2010 04:31:23 am rennradler wrote:
> I can confirm this behaviour on Kubuntu 9.10 amd64 release . I have
> TMPTIME=0 in /etc/default/rcS. But df gives this after reboot:
>
> # df -h
> Dateisystem Größe Benut Verf Ben% Eingehängt auf
> /dev/sda3 46G 6,5G 38G 15% /
> /dev/sda1 92G 68G 20G 78% /tmp
> /dev/sda4 543G 113G 403G 22% /home
>
> 68G in /tmp!
>
> In my case /tmp is mounted as seperate file system and not pat of the
> root file system. /dev/sda1 is a spare partition for testing new Ubuntu
> installations or distribution upgrades. Since there is nothing to be
> tested at the moment I thought why not using it as /tmp for my
> production instalation.
>
> Now, when I don't mount /dev/sda1 on /tmp, i.e. /tmp is part of the root
> file systen everythink works fine and /tmp is cleaned up after reboot.
>
> It would be interesting to hear about your stetup.
>
> I suspect it is a bug in mountall which is actually performing the
> cleaning job during bootup.
>

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593 (cell)
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net
http://www.logikalsolutions.com

Revision history for this message
Scott James Remnant (Canonical) (canonical-scott) wrote :

This has been fixed in Lucid

Changed in sysvinit (Ubuntu):
status: New → Fix Released
Revision history for this message
Alvin (alvind) wrote :

Will this be backported to Karmic?

In some situations, KDM will not show a login screen if certain old files are in /tmp.
As a workaround, I'm using tmpfs. This is a good solution in a lot of situations, except for machines with a small amount of ram.

Revision history for this message
Hassan El Jacifi (waver) wrote :

Hello,

This bug is still present in Lucid. After a reboot the /tmp is not cleaned

#
# /etc/default/rcS
TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no

No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 10.04 LTS
Release: 10.04
Codename: lucid

/dev/mapper/jupiter-tmp /tmp xfs defaults

Changed in sysvinit (Ubuntu):
status: Fix Released → New
Revision history for this message
Dr. Muhammad Masroor Ali (mmasroorali-gmail) wrote :

For me the bug has appeared new in lucid, it was not there in karmic.

See my post at http://ubuntuforums.org/showthread.php?t=1463485

Here is my rcS

#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=yes
VERBOSE=no
FSCKFIX=no

Revision history for this message
Roland Hughes (original-seasoned-geek) wrote :

I can verify this bug is alive and well in 10.04.

On Saturday, May 08, 2010 04:57:00 am you wrote:
> For me the bug has appeared new in lucid, it was not there in karmic.
>
> See my post at http://ubuntuforums.org/showthread.php?t=1463485
>
> Here is my rcS
>
> #
> # /etc/default/rcS
> #
> # Default settings for the scripts in /etc/rcS.d/
> #
> # For information about these variables see the rcS(5) manual page.
> #
> # This file belongs to the "initscripts" package.
>
> TMPTIME=0
> SULOGIN=no
> DELAYLOGIN=no
> UTC=yes
> VERBOSE=no
> FSCKFIX=no

--
Roland Hughes, President
Logikal Solutions
(630)-205-1593
http://www.logikalsolutions.com
http://www.theminimumyouneedtoknow.com
http://www.infiniteexposure.net

Revision history for this message
RighteousJester (neil-lsd) wrote :

I can also confirm the bug is alive and well in Lucid

DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=10.04
DISTRIB_CODENAME=lucid
DISTRIB_DESCRIPTION="Ubuntu 10.04 LTS"

Linux 2.6.32-22-generic #36-Ubuntu SMP Thu Jun 3 22:02:19 UTC 2010 i686 GNU/Linux

cat /etc/default/rcS

#
# /etc/default/rcS
#
# Default settings for the scripts in /etc/rcS.d/
#
# For information about these variables see the rcS(5) manual page.
#
# This file belongs to the "initscripts" package.

TMPTIME=0
SULOGIN=no
DELAYLOGIN=no
UTC=no
VERBOSE=no
FSCKFIX=no

I resorted to the /etc/rc.local fix

Changed in sysvinit (Ubuntu):
status: New → Invalid
Changed in upstart (Ubuntu):
status: New → Confirmed
status: Confirmed → New
Changed in mountall (Ubuntu):
status: New → Confirmed
Revision history for this message
ejprinz (ejprinz) wrote :

I've also added this to bug #587995.

I am running Lucid but have separate partitions for /tmp and /usr. After reboot /tmp is not cleared. The script in

/etc/init/mounted-tmp.conf

fails before the line

    find . -depth -xdev $TEXPR $EXCEPT ! -type d -delete

I think this is because "find" is located in /usr/bin, and /usr/bin is not yet mounted.

if I copy /usr/bin/find to /bin the script runs OK and /tmp is being cleared.

So, I think the line

start on mounted MOUNTPOINT=/tmp

has to include a statement such as "if /usr is a separate partition, mount it before running the script". Unfortunately I don't know how to do this in upstart.

A temporary fix is to copy /usr/bin/find to /bin

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.