Bugzilla will be upgraded to version 5.0 on a still to be determined date in the near future. The original upgrade date has been delayed.
Bug 972565 - btrfsck: endless loop
btrfsck: endless loop
Status: CLOSED WONTFIX
Product: Fedora
Classification: Fedora
Component: btrfs-progs (Show other bugs)
17
i686 Linux
unspecified Severity urgent
: ---
: ---
Assigned To: Josef Bacik
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-10 01:54 EDT by redhat
Modified: 2013-07-31 21:31 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-31 21:30:56 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description redhat 2013-06-10 01:54:39 EDT
Description of problem:

After a power fail one of my filesystems using btrfs needs repair.
Started btrfsck, did some disk access for about 30 seconds, printed
out the following lines and then went into an endless loop consuming
99% of CPU and no longer accessing disk. After two days it is still
in this endless loop.

#  btrfsck --repair /dev/disk/by-uuid/96bfbe51-daef-4e0a-b6ae-a7a443e8d40d
enabling repair mode
parent transid verify failed on 888750080 wanted 186440 found 181808
parent transid verify failed on 888774656 wanted 186440 found 181808
parent transid verify failed on 888762368 wanted 186440 found 181808
parent transid verify failed on 888995840 wanted 186440 found 181808
parent transid verify failed on 888881152 wanted 186439 found 181808
parent transid verify failed on 888250368 wanted 186438 found 186436
checking extents
parent transid verify failed on 888913920 wanted 186439 found 181808
parent transid verify failed on 888999936 wanted 186440 found 181808
bad block 888778752
parent transid verify failed on 888614912 wanted 186438 found 181808
parent transid verify failed on 888340480 wanted 186438 found 186436
leaf parent key incorrect 888254464
bad block 888254464
leaf parent key incorrect 888766464
bad block 888766464
leaf parent key incorrect 888926208
bad block 888926208
parent transid verify failed on 888360960 wanted 186438 found 186436
parent transid verify failed on 888606720 wanted 186438 found 181808
parent transid verify failed on 888619008 wanted 186438 found 181808
bad block 888754176
leaf parent key incorrect 888885248
bad block 888885248
parent transid verify failed on 888360960 wanted 186438 found 186436
parent transid verify failed on 888762368 wanted 186440 found 181808

I could not found a debug version of btrfs-progs to debug the program.
strace and ltrace (-p pid_of_btrfsck) do not output anything, so
neither system nor library calls are made from within the program.

Version-Release number of selected component (if applicable):

btrfs-progs-0.19-18.fc17.i686


How reproducible:

That's tricky. You need a damaged btrfs file system and run btrfs with
option '--repair'.

Steps to Reproduce:
1.
2.
3.

Actual results:

endless loop consuming 99% of CPU

Expected results:

just repair the file system and exit

Additional info:

I set "Severity" to "Urgent" because the bug leads to an unrepairable filesystem. Only creating new filesystem and restoring backup is the
only way to work-around this software bug which means outage of several
hours.
Comment 1 redhat 2013-06-10 01:58:14 EDT
gdb does not show any symbols:

(gdb) attach 4000
Attaching to program: /usr/sbin/btrfsck, process 4000
Reading symbols from /lib/libuuid.so.1...(no debugging symbols found)...done.
Loaded symbols for /lib/libuuid.so.1
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Loaded symbols for /lib/libc.so.6
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Loaded symbols for /lib/ld-linux.so.2
0x08067063 in ?? ()
(gdb) bt
#0  0x08067063 in ?? ()
#1  0x080672de in ?? ()
#2  0x08067e47 in ?? ()
#3  0x0805c5ba in ?? ()
#4  0x0805cd05 in ?? ()
#5  0x08050a6a in ?? ()
#6  0x08049298 in ?? ()
#7  0xb75e1635 in __libc_start_main () from /lib/libc.so.6
#8  0x08049a61 in ?? ()
Comment 2 Eric Sandeen 2013-06-10 10:23:26 EDT
(In reply to kunze from comment #1)
> gdb does not show any symbols:


You'd need to install btrfs-progs-debuginfo etc.

Making an image of the fs might let us reproduce here; testing the upstream git tree, or grabbing the btrfs-progs version from rawhide & testing that, might be useful.

-Eric
Comment 3 redhat 2013-06-12 01:42:16 EDT
In which repo is btrfs-progs-debuginfo? Yum can't find it.

# yum search btrfs-progs-debuginfo
Geladene Plugins: auto-update-debuginfo
rpm-sphere                                               | 1.7 kB     00:00
rpmfusion-free-updates                                   | 3.3 kB     00:00
rpmfusion-nonfree-updates                                | 3.3 kB     00:00
server_eGroupWare                                        | 1.7 kB     00:00
updates/17/i386/metalink                                 |  25 kB     00:00
updates                                                  | 4.6 kB     00:00
updates-source/17/i386/metalink                          |  23 kB     00:00
updates-source                                           | 3.5 kB     00:00
rpm-sphere/primary                                         | 1.7 MB   00:10
rpm-sphere                                                            6201/6201
updates/pkgtags                                          | 301 kB     00:02
updates-source/pkgtags                                   | 301 kB     00:00
Warnung: Keine Übereinstimmung gefunden für: btrfs-progs-debuginfo
Keine Übereinstimmungen gefunden


Making an image from the BTRFS disk is not possible due to lack of free space.
I had to create new filesystem and restore the backup eventually.

If there is a newer version of btrfs-progs in rawhide you should definitely make it available for FC17 too!
Comment 4 Eric Sandeen 2013-06-12 11:25:07 EDT
In the debuginfo repo :)

look in /etc/yum.repos.d/fedora.repo and enable the debuginfo section.

rawhide has a btrfs-progs snapshot, with all the associated risks of a bleeding edge snapshot, so we've been on the fence about pushing it back to f17.
Comment 5 Fedora End Of Life 2013-07-03 19:07:43 EDT
This message is a reminder that Fedora 17 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 17. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '17'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 17's end of life.

Bug Reporter:  Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 17 is end of life. If you 
would still like  to see this bug fixed and are able to reproduce it 
against a later version  of Fedora, you are encouraged  change the 
'version' to a later Fedora version prior to Fedora 17's end of life.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.
Comment 6 Fedora End Of Life 2013-07-31 21:31:00 EDT
Fedora 17 changed to end-of-life (EOL) status on 2013-07-30. Fedora 17 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.

Note You need to log in before you can comment on or make changes to this bug.