From: Luis Henriques <luis.henriques@linux.dev>
To: Ben Hutchings <ben@decadent.org.uk>
Cc: linux-ext4@vger.kernel.org, "Hervé Werner" <dud225@hotmail.com>,
"Diederik de Haas" <didi.debian@cknow.org>,
1039883@bugs.debian.org,
"Salvatore Bonaccorso" <carnil@debian.org>,
"harshad shirwadkar" <harshadshirwadkar@gmail.com>
Subject: Re: linux: ext4 corruption with symlinks
Date: Fri, 14 Jun 2024 17:18:45 +0100 [thread overview]
Message-ID: <87plsj4hwa.fsf@brahms.olymp> (raw)
In-Reply-To: <e6797603353b8162df6c29777ed5936af4d11b32.camel@decadent.org.uk> (Ben Hutchings's message of "Mon, 10 Jun 2024 18:03:58 +0200")
On Mon 10 Jun 2024 06:03:58 PM +02, Ben Hutchings wrote;
> On Sun, 5 Nov 2023 16:12:41 +0000 Hervé Werner <dud225@hotmail.com>
> wrote:
>> Hello
>>
>> I'm sorry for the delay.
>>
>> > Are you able to reliably preoeduce the issue and can bisect it to
>> > the introducing commit?
>> I faced this issue on real data but I struggled to find a reliable
>> scenario to reproduce it. Here is what I just came up with:
>> sudo mkfs -t ext4 -O fast_commit,inline_data /dev/sdb
>> sudo mount /dev/sdb /mnt/
>> sudo install -d -o myuser /mnt/annex
>> cd /mnt/annex
>> git init && git annex init
>> for i in {1..2}; do
>> for i in {1..10000}; do
>> dd if=/dev/urandom of=file-${i} bs=1K count=1 2>/dev/null
>> done
>> git annex add -J cpus . >/dev/null && git annex sync -J cpus && git annex fsck -J cpus >/dev/null
>> git rm * && git annex sync && git annex dropunused all
>> done
>>
>> Then at some point the following error appears:
>> EXT4-fs error (device sdb): ext4_map_blocks:577: inode #3942343: block 4: comm git-annex:w: lblock 1 mapped to illegal pblock 4 (length 1)
> [...]
>
> I can also reproduce this error message using the above script and:
>
> - Linux 6.10-rc2
> - A 2 GiB loopback devic instead of /dev/sdb
>
> I bisected this back to:
>
> commit 9725958bb75cdfa10f2ec11526fdb23e7485e8e4
> Author: Xin Yin <yinxin.x@bytedance.com>
> Date: Thu Dec 23 11:23:37 2021 +0800
>
> ext4: fast commit may miss tracking unwritten range during ftruncate
>
> It is still possible to cleanly revert that commit from 6.10-rc2, and
> doing so removes the error message.
Because I recently fixed an issue in the fast commit code[1] I was hoping
that you were hitting the same bug. I've executed the reproducer with the
fix (which hasn't been merged yet) and realised it's definitely a
different problem.
Debugged the issue a bit, it seems to be related with the fact that
ext4_fc_write_inode_data() isn't able to cope with the fact that
'ei->i_fc_lblk_len' is set to EXT_MAX_BLOCKS.
I'm CC'ing Harshad, maybe he has some idea.
[1] https://lore.kernel.org/all/20240529092030.9557-2-luis.henriques@linux.dev
Cheers,
--
Luís
next prev parent reply other threads:[~2024-06-14 16:18 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <168802788716.2369531.1979971093539266086.reportbug@ariane.home>
2023-07-01 15:35 ` Bug#1039883: linux-image-6.3.0-1-amd64: ext4 corruption with symlinks Salvatore Bonaccorso
[not found] ` <ZL5DB7vU3GnIx588@eldamar.lan>
[not found] ` <2002858.macj2W6JUv@bagend>
[not found] ` <DB4PR02MB936085F4449207358A9943568FABA@DB4PR02MB9360.eurprd02.prod.outlook.com>
2024-06-10 16:03 ` linux: " Ben Hutchings
2024-06-14 16:18 ` Luis Henriques [this message]
2024-06-18 9:52 ` Luis Henriques
2024-06-18 13:19 ` Luis Henriques
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87plsj4hwa.fsf@brahms.olymp \
--to=luis.henriques@linux.dev \
--cc=1039883@bugs.debian.org \
--cc=ben@decadent.org.uk \
--cc=carnil@debian.org \
--cc=didi.debian@cknow.org \
--cc=dud225@hotmail.com \
--cc=harshadshirwadkar@gmail.com \
--cc=linux-ext4@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.