Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#25033 - [initscripts]Cleaning /tmp/ in rc.sysinit fails if too many files

Attached to Project: Arch Linux
Opened by Dmytro Bagrii (dimich) - Tuesday, 05 July 2011, 22:09 GMT
Last edited by Tom Gundersen (tomegun) - Tuesday, 26 July 2011, 11:05 GMT
Task Type Bug Report
Category System
Status Closed
Assigned To Tom Gundersen (tomegun)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

If /tmp/ directory contains many files (about tens of thousands) rm -rf /tmp/* fails with "Argument list is too long".

Possible solutions:
find /tmp/ -mindepth 1 -delete
or
find /tmp/ -mindepth 1 -depth -print0 | xargs -r0 rm -rf
This task depends upon

Closed by  Tom Gundersen (tomegun)
Tuesday, 26 July 2011, 11:05 GMT
Reason for closing:  Fixed
Comment by Tom Gundersen (tomegun) - Wednesday, 06 July 2011, 22:54 GMT
Thanks for the report. I will try to have a look at this at the end of the week.

A workaround is to mount /tmp on tmpfs (which is almost always a good idea anyway).
Comment by Tom Gundersen (tomegun) - Monday, 25 July 2011, 14:49 GMT
We are moving to using a new script for cleaning up /tmp on boot: <http://projects.archlinux.org/initscripts.git/commit/?id=e6c21e612838581c53c7742eb6071697f2d9e5a3>. This is not very well tested, so use with caution. It will be in the next initscripts release, once it has been tested thoroughly (to make sure it does not eat your whole rootfs).

If anyone can, it would be greatly appreciated if you could check that this script solves the problem.
Comment by Tom Gundersen (tomegun) - Monday, 25 July 2011, 21:27 GMT
@dimich: can you verify that initscripts from [testing] fixes your problem?
Comment by Dmytro Bagrii (dimich) - Tuesday, 26 July 2011, 09:07 GMT
testing/initscripts 2011.07.1-1 works correctly. I tested with 1 million files in /tmp/.

Loading...