Bug 1142486
| Summary: | Error 'corrupted double-linked list' when using rescue super-recover on corrupt superblock | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | [Fedora] Fedora | Reporter: | Chris Murphy <bugzilla> | ||||||
| Component: | btrfs-progs | Assignee: | Josef Bacik <josef> | ||||||
| Status: | CLOSED EOL | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||||
| Severity: | unspecified | Docs Contact: | |||||||
| Priority: | unspecified | ||||||||
| Version: | 21 | CC: | esandeen, josef, mmahut | ||||||
| Target Milestone: | --- | ||||||||
| Target Release: | --- | ||||||||
| Hardware: | Unspecified | ||||||||
| OS: | Unspecified | ||||||||
| Whiteboard: | |||||||||
| Fixed In Version: | Doc Type: | Bug Fix | |||||||
| Doc Text: | Story Points: | --- | |||||||
| Clone Of: | Environment: | ||||||||
| Last Closed: | 2015-12-02 03:51:20 UTC | Type: | Bug | ||||||
| Regression: | --- | Mount Type: | --- | ||||||
| Documentation: | --- | CRM: | |||||||
| Verified Versions: | Category: | --- | |||||||
| oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||||
| Cloudforms Team: | --- | Target Upstream Version: | |||||||
| Embargoed: | |||||||||
| Attachments: |
|
||||||||
|
Description
Chris Murphy
2014-09-16 21:14:37 UTC
Steps to Reproduce: 1. # dd if=/dev/zero of=/dev/sdb bs=4 seek=16384 count=1 2. # btrfs rescue super-recover /dev/sdb -v 3. "Make sure this is a btrfs disk otherwise the tool will destroy other fs, Are you sure? [y/N]: y" Presumably /dev/sdb was a btrfs filesystem? how big? If this was using the fedora btrfs-progs rpm, attaching the core file would let us gather more info. Small, 8GB and empty. Created attachment 938244 [details] coredump.tar.bz2 Created attachment 938245 [details]
gdb backtrace on coredump
gdb --core=coredump
<gdb> backtrace
valgrind tells us what went wrong:
Make sure this is a btrfs disk otherwise the tool will destroy other fs, Are you sure? [y/N]: y
Recovered bad superblocks successful
==42039== Invalid read of size 8
==42039== at 0x426BD9: btrfs_recover_superblocks (list.h:204)
==42039== by 0x421C79: cmd_super_recover (cmds-rescue.c:148)
==42039== by 0x40420A: handle_command_group (btrfs.c:145)
==42039== by 0x421B54: cmd_rescue (cmds-rescue.c:162)
==42039== by 0x404199: main (btrfs.c:247)
==42039== Address 0x4c250b0 is 48 bytes inside a block of size 96 free'd
==42039== at 0x4A063F0: free (vg_replace_malloc.c:446)
==42039== by 0x43C77E: btrfs_close_devices (volumes.c:196)
==42039== by 0x42F5D1: close_ctree (disk-io.c:1404)
==42039== by 0x426A85: btrfs_recover_superblocks (super-recover.c:340)
==42039== by 0x421C79: cmd_super_recover (cmds-rescue.c:148)
==42039== by 0x40420A: handle_command_group (btrfs.c:145)
==42039== by 0x421B54: cmd_rescue (cmds-rescue.c:162)
==42039== by 0x404199: main (btrfs.c:247)
==42039==
==42039== Invalid free() / delete / delete[] / realloc()
==42039== at 0x4A063F0: free (vg_replace_malloc.c:446)
==42039== by 0x426C22: btrfs_recover_superblocks (super-recover.c:101)
==42039== by 0x421C79: cmd_super_recover (cmds-rescue.c:148)
==42039== by 0x40420A: handle_command_group (btrfs.c:145)
==42039== by 0x421B54: cmd_rescue (cmds-rescue.c:162)
==42039== by 0x404199: main (btrfs.c:247)
==42039== Address 0x4c25080 is 0 bytes inside a block of size 96 free'd
==42039== at 0x4A063F0: free (vg_replace_malloc.c:446)
==42039== by 0x43C77E: btrfs_close_devices (volumes.c:196)
==42039== by 0x42F5D1: close_ctree (disk-io.c:1404)
==42039== by 0x426A85: btrfs_recover_superblocks (super-recover.c:340)
==42039== by 0x421C79: cmd_super_recover (cmds-rescue.c:148)
==42039== by 0x40420A: handle_command_group (btrfs.c:145)
==42039== by 0x421B54: cmd_rescue (cmds-rescue.c:162)
==42039== by 0x404199: main (btrfs.c:247)
==42039==
==42039==
==42039== HEAP SUMMARY:
==42039== in use at exit: 0 bytes in 0 blocks
==42039== total heap usage: 72 allocs, 73 frees, 140,384 bytes allocated
==42039==
==42039== All heap blocks were freed -- no leaks are possible
==42039==
==42039== For counts of detected and suppressed errors, rerun with: -v
==42039== ERROR SUMMARY: 2 errors from 2 contexts (suppressed: 6 from 6)
it's freeing fs_devices twice:
close_ctree(root); // <-- here
no_recover:
recover_err_str(ret);
free_recover_superblock(&recover); // <-- and here
This message is a reminder that Fedora 21 is nearing its end of life. Approximately 4 (four) weeks from now Fedora will stop maintaining and issuing updates for Fedora 21. 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 EOL if it remains open with a Fedora 'version' of '21'. 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. Thank you for reporting this issue and we are sorry that we were not able to fix it before Fedora 21 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 this bug is closed as described in the policy above. 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. Fedora 21 changed to end-of-life (EOL) status on 2015-12-01. Fedora 21 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. If you are unable to reopen this bug, please file a new report against the current release. If you experience problems, please add a comment to this bug. Thank you for reporting this bug and we are sorry it could not be fixed. |