e2fsck crashes with Signal (11) SIGSEGV when using undo-file
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
e2fsprogs (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
The behavior is reproducable on 18.04 and 20.04 LTS with the following versions of e2fsck:
* e2fsck 1.44.1 (24-Mar-2018)
* e2fsck 1.45.5 (07-Jan-2020)
Expected behavior occurs when:
* Running e2fsck as a dry run does work fine: It does find quite a few errors and then completes execution normally
* Running e2fsck "normally" (without an undo-file) works also fine - but I aborted execution at the first error it found (I want to use the undo file).
The error occurs reproducable when I specify an undo-file.
The error occurs on Ubuntu 18.04 and 20.04 as well.
The stack trace (see below) is identical when I repeat the execution.
As someone guessed that a lack of RAM might cause this I also observed the process in top: It shows e2fsck running with 100% CPU and ~1% of RAM for a few seconds, then it terminates with Signal (11).
Stacktrace with Ubuntu 18.04:
# e2fsck -v -z /root/e2fsck.
e2fsck 1.44.1 (24-Mar-2018)
Overwriting existing filesystem; this can be undone using the command:
e2undo /root/e2fsck.
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
e2fsck: Group descriptors look bad... trying backup blocks...
Signal (11) SIGSEGV si_code=SEGV_MAPERR fault addr=0x178
e2fsck(
/lib/x86_
/lib/x86_
/lib/x86_
e2fsck(
/lib/x86_
e2fsck(
Stacktrace with Ubuntu 20.04 (I did an dist-upgrade from 18 to 20 in the hope that this issue might have been fixed there..):
# fsck.ext4 -v -z /root/fsck.
e2fsck 1.45.5 (07-Jan-2020)
Overwriting existing filesystem; this can be undone using the command:
e2undo /root/fsck.
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap
fsck.ext4: Group descriptors look bad... trying backup blocks...
Signal (11) SIGSEGV si_code=SEGV_MAPERR fault addr=0x178
fsck.ext4(
/lib/x86_
/lib/x86_
/lib/x86_
fsck.ext4(
/lib/x86_
fsck.ext4(
Background-Info:
On 18.04:
A filesystem with ~66 TB was to be resized (resize2fs) to ~77TB.
Unfortunately I shut down the box while the resize was still running by accident (don't ask...)
After booting up again a run of e2fsck found and fixed some errors (a few Block bitmap differences and one occurrence of free block count and free inodes counts each.
A second run of e2fsck came clean.
The files inside the filesystem were fine (I had a sfv-file for a major part of the data inside).
Then I started resize2fs again, as the FS had only grown to ~70 TB so far.
Now i got a myriad of errors like
> Illegal block number passed to ext2fs_
and possibly other errors as well which had scrolled outside of my screen.
Then it finally completed with
> The filesystem on /dev/mapper/
Now I'm trying to fix things but as I get errors like
> Inode table for group 585696 is not in group. (block 174805527963516
> WARNING: SEVERE DATA LOSS POSSIBLE.
> Relocate<y>?
I really would prefer to proceed with an undo-file now.
A brief update:
I can also reproducee the crash on Ubuntu 21.10 / e2fsck 1.46.3:
# e2fsck -v -z e2fsck. undofile. 2022-03- 20 /dev/mapper/ md125_crypt undofile. 2022-03- 20 /dev/mapper/ md125_crypt
e2fsck 1.46.3 (27-Jul-2021)
Overwriting existing filesystem; this can be undone using the command:
e2undo e2fsck.
ext2fs_check_desc: Corrupt group descriptor: bad block for block bitmap +0x31e3e) [0x55deba41ce3e ] 64-linux- gnu/libc. so.6(+0x42520) [0x7fc444c0a520 ] 64-linux- gnu/libext2fs. so.2(ext2fs_ close2+ 0x134)[ 0x7fc444e59b44] 64-linux- gnu/libext2fs. so.2(ext2fs_ close_free+ 0x1a)[0x7fc444e 59bba] main+0xebd) [0x55deba3fcb6d ] 64-linux- gnu/libc. so.6(+0x29fd0) [0x7fc444bf1fd0 ] 64-linux- gnu/libc. so.6(__ libc_start_ main+0x7d) [0x7fc444bf207d ] _start+ 0x25)[0x55deba3 feff5]
e2fsck: Group descriptors look bad... trying backup blocks...
Signal (11) SIGSEGV si_code=SEGV_MAPERR fault addr=0x178
e2fsck(
/lib/x86_
/lib/x86_
/lib/x86_
e2fsck(
/lib/x86_
/lib/x86_
e2fsck(
If I run "e2fsck -v /dev/mapper/ md125_crypt" (without -z), e2fsck 1.46.3 does not crash.