kern/55025: machine crashed/rebooted from tar/find/rm fight

William D. Colburn (aka Schlake) wcolburn at nmt.edu
Tue Jul 29 14:20:11 PDT 2003


>Number:         55025
>Category:       kern
>Synopsis:       machine crashed/rebooted from tar/find/rm fight
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jul 29 14:20:09 PDT 2003
>Closed-Date:
>Last-Modified:
>Originator:     William D.Colburn
>Release:        FreeBSD 4.7-STABLE i386
>Organization:
New Mexico Institute of Mining and Technology
>Environment:
eh?
System: FreeBSD userhost 4.7-STABLE FreeBSD 4.7-STABLE #0: Thu Jan 9 11:59:54 MST 2003 wcolburn at userhost:/usr/obj/usr/src/sys/USERHOST i386


>Description:

Ok, so my file system is pretty full:
  wcolburn at userhost<~>$ df .
  Filesystem  1K-blocks     Used   Avail Capacity  Mounted on
  /dev/da1s1e  81305544 65457788 9343313    88%    /tedium

But I've got this tar file:
  wcolburn at userhost<~>$ ll fermium.tar.gz 
  -rw-r--r--  1 wcolburn  5702  34471720960 Jul 22 14:00 fermium.tar.gz

It contains thousands of files I need, and many more that I don't need.
It would be annoyingly hard to name all the the ones I want on the
command line, but I have a better idea!

  tar zxf fermium.tar.gz & while true ; do find fermium -type f ! -size 0 ! -perm 0 -exec rm '{}' \; ; done

A few minutes later, from an NFS mounted linux box, I do an ls to make
sure the find is progressing right.  I notice that there is a directory
that contains filenames, but not inodes for any of the files.

Uh oh, this is bad.  Kill the while loop, kill the tar, rm -rf the whole
tree.  Whew.  Disaster averted.

A few minutes later, while I'm formulating a new plan of attack the
machine drops off the face of the world.  Since every computer and its
mother depends on this machine for user accounts, I hide.  Eventually,
the fsck is complete (hurray!) and it comes up.  There is useful info in
dmesg, and a handy bug submittal form!

panic: dqget: free dquot isn't
mp_lock = 01000001; cpuid = 1; lapic.id = 01000000
boot() called on cpu#1

syncing disks... 175 35 5 5 5 5 5 5 5 6 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 5 
gi07]: ./fs/tedium/accounts/u/usul unmounted fstype link from
./fs/tedium/accounts/u/usul
cpu_reset_proxy: Grabbed mp lock for BSP
cpu_reset_proxy: Stopped CPU 1

>How-To-Repeat:

I'm not positive this will work, but I'm also not willing to try again
to see if it crashes again.  I was using a 34 gig tar file.

  tar zxf fermium.tar.gz & while true ; do find fermium -type f ! -size 0 ! -perm 0 -exec rm '{}' \; ; done

>Fix:

My fix is not to run the command listed above in the "How-To-Repeat"
section.  I will untar my 34 gig tar file on a larger disk, and then run
the find after it has finished.
>Release-Note:
>Audit-Trail:
>Unformatted:


More information about the freebsd-bugs mailing list