Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 674150 - sys-apps/openrc-0.40.3 - /etc/init.d/savecache is able to create a depconfig file with size = 87TB
Summary: sys-apps/openrc-0.40.3 - /etc/init.d/savecache is able to create a depconfig ...
Alias: None
Product: Gentoo Hosted Projects
Classification: Unclassified
Component: OpenRC (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: OpenRC Team
Depends on:
Reported: 2018-12-31 03:30 UTC by Jochen Schlick
Modified: 2019-01-02 01:29 UTC (History)
0 users

See Also:
Package list:
Runtime testing required: ---


Note You need to log in before you can comment on or make changes to this bug.
Description Jochen Schlick 2018-12-31 03:30:49 UTC
I somehow ended up with a very big depconfig file after the last shutdown of my laptop.

localhost:/lib64/rc/cache  # ls -al
total 10
-rw-r--r-- 1 root root 94824499013408 Dec 30 21:52 depconfig
-rw-r--r-- 1 root root              0 Dec 30 21:52 deptree
-rw-r--r-- 1 root root           4080 Apr 19  2016 nettree
-rw-r--r-- 1 root root              0 Dec 30 21:52 softlevel

localhost:/lib64/rc/cache # du -h --apparent-size depconfig 
87T     depconfig
localhost:/lib64/rc/cache # du -h depconfig 
4,5K    depconfig

It's a sparse file - the beginning contains the usual content:

As far as I understand is /etc/init.d/savecache responsible for storing the depconfig file, but I assume that something went wrong during this normal shutdown.

It's not reproducible. But it's not the first time - it occured some month ago with an earlier version of openrc also with a size of 87TB.
The configuration of this host is a little bit special (rootfs is ZFS and the concerning ZFS pool contains also a FreeBSD12 installation)
First I assumed that it's a file system corruption, but the underlying file system is fine (neither FreeBSD's native ZFS tools nor the ZoL tools show an error or have problems with this file system....
Comment 1 William Hubbs gentoo-dev 2019-01-01 01:28:53 UTC
The live copy of this file is /run/openrc/depconfig. savecache uses
"cp -p" to back it up.

Does the live copy look like this also?
Comment 2 Jochen Schlick 2019-01-02 01:29:00 UTC
I'm not sure - I only recognized it after I rebooted the laptop. The system was then no longer able to boot successfully this special Gentoo Linux.

When this happened the first time I started a backup with tar of the mounted file system and the zipped tar file got bigger than the original partition  (<-- sparse file). I stopped it after an hour or so and et voila the last file of the tar file was /lib64/rc/cache/depconfig. After removing setting the file length to 0. The system rebooted fine again.

Yesterday, when it happened again (with the symptom that the boot hangs - without output on screen). I immediately looked into this directory and the depconfig file was again 87TB.

If savecache does only a 'cp',  then the original depconfig file in /run must have been a 87TB sparse file too.