Temporary files left under /var/tmp by mkinitramfs

Bug #1713004 reported by Thomas A. F. Thorne on 2017-08-25
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
initramfs-tools (Debian)
Fix Released
Unknown
initramfs-tools (Ubuntu)
Undecided
Unassigned
Trusty
High
Brian Murray
Xenial
High
Brian Murray

Bug Description

Test Case
---------
1) confirm there are no mkinitramfs junk files in /var/tmp
2) run 'sudo update-initramfs -k all -u -v'
3) interrupt update-initramfs with Ctrl-C
4) observe junk files in /var/tmp e.g. /var/tmp/mkinitramfs*

With the version of initramfs-tools in -proposed you should see not have any leftovers in /var/tmp.

I recently ran out of disk space on my / mount. While looking for what consumed the disk I noticed a large number (130) of directories with names / paths beginning /var/tmp/mkinitramfs. These directories seem to be either ~103 MB or ~927 MB in size. Many of these files are months old, some are almost a year.

Having had a quick look about for an explanation as to why these files are here and found Debian Bug #814345. That explains that temporary files are left behind by the initramfs-tools if something fails in the process. If this is the cause of my files then updating the Ubuntu package to version 0.123 should resolve this issue.

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: initramfs-tools 0.122ubuntu8.8
ProcVersionSignature: Ubuntu 4.4.0-72.93-generic 4.4.49
Uname: Linux 4.4.0-72-generic x86_64
ApportVersion: 2.20.1-0ubuntu2.10
Architecture: amd64
CurrentDesktop: Unity
Date: Fri Aug 25 09:40:41 2017
InstallationDate: Installed on 2015-03-12 (896 days ago)
InstallationMedia: Ubuntu 14.04.2 LTS "Trusty Tahr" - Release amd64 (20150218.1)
PackageArchitecture: all
SourcePackage: initramfs-tools
UpgradeStatus: No upgrade log present (probably fresh install)

Thomas A. F. Thorne (tafthorne) wrote :
Thomas A. F. Thorne (tafthorne) wrote :

Looks like this bug is related to bug #1597661 and bug #1515513 although both of those point the upgrade process being the prompt for a failing run of the initramfs-tools.

Changed in initramfs-tools (Debian):
status: Unknown → Fix Released
Launchpad Janitor (janitor) wrote :

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in initramfs-tools (Ubuntu):
status: New → Confirmed
Brian Murray (brian-murray) wrote :

This was fixed in initramfs-tools version 0.123 which is available in Zesty and later releases. The fix should be SRU'ed to both Ubuntu 14.04 and Ubuntu 16.04 which are affected. Here's a link to the commit which fixed this:

https://anonscm.debian.org/cgit/kernel/initramfs-tools.git/commit/?id=ac6d31fc2c707b72ff8af9944c9b4f8af303a6a3

Changed in initramfs-tools (Ubuntu):
status: Confirmed → Fix Released
Changed in initramfs-tools (Ubuntu Trusty):
importance: Undecided → High
Changed in initramfs-tools (Ubuntu Xenial):
importance: Undecided → High
Changed in initramfs-tools (Ubuntu Trusty):
status: New → Triaged
Changed in initramfs-tools (Ubuntu Xenial):
status: New → Triaged
Changed in initramfs-tools (Ubuntu Trusty):
assignee: nobody → Brian Murray (brian-murray)
Changed in initramfs-tools (Ubuntu Xenial):
assignee: nobody → Brian Murray (brian-murray)
Changed in initramfs-tools (Ubuntu Trusty):
status: Triaged → In Progress
Changed in initramfs-tools (Ubuntu Xenial):
status: Triaged → In Progress
Serhiy Zahoriya (xintx-ua) wrote :

Can https://bugs.launchpad.net/ubuntu/+source/linux/+bug/1674568 be another manifestation of this problem? In short: old kernel versions left under /var/lib/initramfs-tools

Hello Thomas, or anyone else affected,

Accepted initramfs-tools into xenial-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.122ubuntu8.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-xenial to verification-done-xenial. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-xenial. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

Changed in initramfs-tools (Ubuntu Xenial):
status: In Progress → Fix Committed
tags: added: verification-needed verification-needed-xenial
Changed in initramfs-tools (Ubuntu Trusty):
status: In Progress → Fix Committed
tags: added: verification-needed-trusty
Chris J Arges (arges) wrote :

Hello Thomas, or anyone else affected,

Accepted initramfs-tools into trusty-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/initramfs-tools/0.103ubuntu4.10 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed.Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested and change the tag from verification-needed-trusty to verification-done-trusty. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-trusty. In either case, details of your testing will help us make a better decision.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance!

description: updated
Brian Murray (brian-murray) wrote :

Verification done on xenial:

bdmurray@clean-xenial-amd64:~$ ls /var/tmp/
mkinitramfs-FW_Kd1tzJ systemd-private-9729e594cf0c492a8e20b5289d9df1a3-colord.service-22FIRG
mkinitramfs-OL_IGHYM7 systemd-private-9729e594cf0c492a8e20b5289d9df1a3-rtkit-daemon.service-jbvsR3
mkinitramfs_oqn7fE systemd-private-9729e594cf0c492a8e20b5289d9df1a3-systemd-timesyncd.service-9HxFZw
bdmurray@clean-xenial-amd64:~$ sudo vi /etc/apt/sources.list
bdmurray@clean-xenial-amd64:~$ apt-cache policy initramfs-tools
initramfs-tools:
  Installed: 0.122ubuntu8.10
  Candidate: 0.122ubuntu8.10
  Version table:
 *** 0.122ubuntu8.10 500
        500 http://192.168.10.7/ubuntu xenial-proposed/main amd64 Packages
        500 http://192.168.10.7/ubuntu xenial-proposed/main i386 Packages
        100 /var/lib/dpkg/status
     0.122ubuntu8.9 500
        500 http://192.168.10.7/ubuntu xenial-updates/main amd64 Packages
        500 http://192.168.10.7/ubuntu xenial-updates/main i386 Packages
     0.122ubuntu8 500
        500 http://192.168.10.7/ubuntu xenial/main amd64 Packages
        500 http://192.168.10.7/ubuntu xenial/main i386 Packages
bdmurray@clean-xenial-amd64:~$ sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
^C
bdmurray@clean-xenial-amd64:~$ ls /var/tmp/
mkinitramfs-FW_Kd1tzJ systemd-private-9729e594cf0c492a8e20b5289d9df1a3-colord.service-22FIRG
mkinitramfs-OL_IGHYM7 systemd-private-9729e594cf0c492a8e20b5289d9df1a3-rtkit-daemon.service-jbvsR3
mkinitramfs_oqn7fE systemd-private-9729e594cf0c492a8e20b5289d9df1a3-systemd-timesyncd.service-9HxFZw

tags: added: verification-done-xenial
removed: verification-needed-xenial
Brian Murray (brian-murray) wrote :

Verification done on trusty:

bdmurray@clean-trusty-amd64:~$ ls /var/tmp/
bdmurray@clean-trusty-amd64:~$ sudo update-initramfs -k all -u
[sudo] password for bdmurray:
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
^Cbdmurray@clean-trusty-amd64:~$ ls /var/tmp/
mkinitramfs-FW_pLwXEe
bdmurray@clean-trusty-amd64:~$ apt-cache policy initramfs-tools
initramfs-tools:
  Installed: 0.103ubuntu4.10
  Candidate: 0.103ubuntu4.10
  Version table:
 *** 0.103ubuntu4.10 0
        500 http://ubuntu.osuosl.org/ubuntu/ trusty-proposed/main amd64 Packages
        100 /var/lib/dpkg/status
     0.103ubuntu4.9 0
        500 http://ubuntu.osuosl.org/ubuntu/ trusty-updates/main amd64 Packages
     0.103ubuntu4 0
        500 http://ubuntu.osuosl.org/ubuntu/ trusty/main amd64 Packages
bdmurray@clean-trusty-amd64:~$ sudo update-initramfs -k all -u
update-initramfs: Generating /boot/initrd.img-4.4.0-38-generic
^Cbdmurray@clean-trusty-amd64:~$ ls /var/tmp/
mkinitramfs-FW_pLwXEe

tags: added: verification-done-trusty
removed: verification-needed-trusty
Andreas Hasenack (ahasenack) wrote :

There are tons of reds in the autopkg tests for initramfs-tools on trusty, were those considered and deemed flaky tests or something?

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

Other bug subscribers

Remote bug watches

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