[Bugme-new] [Bug 10981] New: XFS filesystem corruption when running out of space

bugme-daemon at bugzilla.kernel.org bugme-daemon at bugzilla.kernel.org
Wed Jun 25 06:40:49 PDT 2008


http://bugzilla.kernel.org/show_bug.cgi?id=10981

           Summary: XFS filesystem corruption when running out of space
           Product: File System
           Version: 2.5
     KernelVersion: 2.6.26-rc4-00168-gc3b25b3
          Platform: All
        OS/Version: Linux
              Tree: Mainline
            Status: NEW
          Severity: normal
          Priority: P1
         Component: XFS
        AssignedTo: xfs-masters at oss.sgi.com
        ReportedBy: edwintorok at gmail.com


Latest working kernel version: Unknown
Earliest failing kernel version: 2.6.26-rc4-00168-gc3b25b3
Distribution: Debian sid
Hardware Environment: 
    Dell Inspiron 6400, CPU Intel Core Duo T2300 @ 1.66Ghz, 1G RAM, HDD 60G
5400 rpm Seagata ST96812as, ICH7 family chipset, 945GM graphics
Software Environment:
   Linux 2.6.26-rc4-00168-gc3b25b3
   Distribution: Debian sid(unstable)
   Kernel built with gcc 4.2
   xfsprogs: latest from Debian (2.9.8-1)
Filesystem information:
   2 partitions: / and /var, both XFS
   Filesystem was created with lazy-count enabled
Problem Description:
  I have run out of space on /, which is using an XFS filesystem. Now the
filesystem is corrupt, and unmountable.

  I was running the following commands in a gnome terminal:
     dd if=/dev/zero of=xt bs=100M count=9&
     dd if=/dev/zero of=yt bs=100M count=9&
     rm xt; rm yt
    I have run out of space on / (got a message from gnome that it is more than
99% full). 
    After that point I couldn't run any commands (not even cat and df), it said
no such command. I guess the root filesystem got unmounted automatically.
    I switched to the console, but it was garbled, and switching back to X was
impossible too. I have rebooted, and then I got a failure when mounting /
filesystem (see below).
   This is with a 2.6.26-rc4 kernel (and since I cannot boot I can't try
building a newer kernel). I also tried booting a 2.6.25-2 distro kernel, and I
got a similar error message.
   I've got Fedora 8 installed on another partition, and I could attempt
recovery from there. 
   Before doing that is there any information you would need to analyze this
problem?

Running 'xfs_repair /dev/sda6' from Fedora shows:
Phase 1 - find and verify superblock...
Phase 2 - using internal log
        - zero log...
ERROR: The filesystem has valuable metadata changes in a log which needs to be
replayed. Mount the filesystem to replay the log, and unmount it before
re-running xfs-repari. If you are unable to mount the filesystem, then use the
-L option to destroy the log and attempt a repair.
Note that destroying the log may cause corruption -- please attempt a mount of
the filesystem before doing this.

 So should I go ahead and destroy the log, or is there anything inthere that
you need to diagnose the problem?


XFS: correcting sb_features alignment problem
XFS mounting filesystem sda6
Starting XFS recovery on filesystem: sda6 (logdev: internal)
00000000: 58 41 47 46 00 00 00 01 00 00 00 04 00 02 54 29  XAGF..........T
Filesystem "sda6": XFS internal error xfs_alloc_read_agf at line 2194 of file
/var/local/src/linux-2.6/fs/xfs/xfs_alloc.c. Caller 0xc023b75a
Pid: 2273, comm: mount Not tainted 2.6.26-rc4-00168-gc3b25b3 #26
 [<c02615c7>] xfs_error_report+0x4e/0x50
 [<c023b75a>] ? xfs_alloc_pagf_init+0x1e/0x3b
 [<c026160c>] xfs_corruption_error+0x43/0x4b
 [<c023b75a>] ? xfs_alloc_pagf_init+0x1e/0x3b
 [<c023b63c>] xfs_alloc_read_agf+0xbb/0x1bb
 [<c023b75a>] ? xfs_alloc_pagf_init+0x1e/0x3b
 [<c023b75a>] xfs_alloc_pagf_init+0x1e/0x3b
 [<c027bf88>] xfs_initialize_perag_data+0xce/0x16a
 [<c027c52a>] xfs_mountfs+0x487/0x69c
 [<c02b08a2>] ? _atomic_dec_and_lock+0x46/0x64
 [<c0288f3c>] ? kmem_zalloc+0xc/0x30
 [<c027d144>] ? xfs_mru_cache_create+0xdc/0x107
 [<c0283287>] xfs_mount+0x2f9/0x342
 [<c029252a>] xfs_fs_fill_super+0xa8/0x1eb
 [<c0283287>] xfs_mount+0x2f9/0x342
 [<c029252a>] xfs_fs_fill_super+0xa9/0x1eb
 [<c017f7f6>] get_sb_bdev+0xea/0x114
 [<c02b139f>] ? idr_pre_get+0x1a/0x44
 [<c0291382>] xfs_fs_get_sb+0x21/0x27
 [<c0292482>] ? xfs_fs_fill_super+0x0/0x1eb
 [<c017f465>] vfs_kern_mount+0x59/0x117
 [<c017f56d>] do_kern_mount+0x33/0xbd
 [<c0194446>] do_new_mount+0x59/0x77
 [<c0195238>] do_mount+0x1ce/0x1e4
 [<c0427bfa>] ? error_code+0x72/0x78
 [<c015007b>] ? acct_file_reopen+0x2/0xf8
 [<c042b7a4>] ? iret_exc+0x418/0x980
 [<c01952ce>] sys_mount+0x80/0xb2
 [<c0103c72>] syscall_call+0x7/0xb
 [<c0420000>] ? detect_ht+0x7e/0x13b
mount: Structure needs cleaning
Begin: Running /scripts/local-bottom ...
Done.
Done.
Begin: Running /scripts/init-bottom ...
Done.
mount: No such file or directory
mount: No such file or directory
Target filesystem doesn't have /sbin/init.
No init found. Try passing init= bootarg.


BusyBox v1.9.2 (Debian 1:1.9.2-3) built-in shell (ash)
Enter 'help' for a list of built-in commands.

/bin/sh: can't access tty; job control turned off
(initramfs)

The error message from 2.6.25-2 distro kernel is similar:   
Filesystem "sda6": XFS internal error xfs_alloc_read_agf at line 2195 of file
fs/xfs/xfs_alloc.c. Caller 0xf8a01801
 [<...>] xfs_alloc_read_agf+0x129/0x1a6 [xfs]
 [<...>] xfs_alloc_pagf_init+0x15/0x31 [xfs]
 [<...>] xfs_alloc_pagf_init+0x15/0x31 [xfs]
 [<...>] xfs_alloc_pagf_init+0x15/0x31 [xfs]
 [<...>] xfs_ialloc_pagi_init+0x2d/0x33 [xfs]
 [<...>] xfs_initialize_perag_data+0x69/0x140 [xfs]
 [<...>] xfs_mountfs+0x34a/0x5e3 [xfs]
 [<...>] kmem_alloc+0x53/0xa8 [xfs]
 [<...>] default_wake_function+0x0/0x8 
  .......



Steps to reproduce:
     [steps I have done when problem happened, since the system doesn't boot
I can't try if the same sequence of steps reproduces the problem]
     Have a / filesystem with XFS, with ~800M free space.
     Run these commands:
     dd if=/dev/zero of=xt bs=100M count=9&
     dd if=/dev/zero of=yt bs=100M count=9&
     rm xt; rm yt
     Wait till filesystem is full
     Root filesystem is unaccesible/unmountable

If you need additional information, please ask.


-- 
Configure bugmail: http://bugzilla.kernel.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.


More information about the Bugme-new mailing list