Skip to contentSkip to conversation

Regression that causes data csum mismatch

DISCUSSION Qu Wenruo 3 participants 7 messages Jun 13, 2023 – Jun 15, 2023

Subsystems (2)
lore
Share & tools
lore

Qu Wenruo

author
#0 lore raw

Hi,

Recently I am testing scrub preparing for the incoming logical scrub.

But I noticed some rare and random test cases failure from scrub and replace groups.

E.g. btrfs/072 has a chance of failure around 1/30.

Initially I thought it's my scrub patches screwing things up, but with more digging, it turns out that it's real data corruption.

After scrubbing found errors, btrfs check --check-data-csum also reports csum mismatch.

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

Currently trying to bisect, but 6.4-rc4 already shows the bug.

And I can reproduce the problem on both x86_64 and aarch64 (both 4K page size)

Thanks,
Qu

author
#1 lore raw
Quoted 13 lines · Qu Wenruo

Hi,

Recently I am testing scrub preparing for the incoming logical scrub.

But I noticed some rare and random test cases failure from scrub and replace groups.

E.g. btrfs/072 has a chance of failure around 1/30.

Initially I thought it's my scrub patches screwing things up, but with more digging, it turns out that it's real data corruption.

Quoted 7 lines

After scrubbing found errors, btrfs check --check-data-csum also reports csum mismatch.

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

Currently trying to bisect, but 6.4-rc4 already shows the bug.

s/rc4/rc6/

Quoted 6 lines

And I can reproduce the problem on both x86_64 and aarch64 (both 4K page size)

Thanks,
Qu

#2 lore raw
In reply to Qu Wenruo

[CCing the regression list, as it should be in the loop for regressions:
https://docs.kernel.org/admin-guide/reporting-regressions.html]

[TLDR: I'm adding this report to the list of tracked Linux kernel regressions; the text you find below is based on a few templates paragraphs you might have encountered already in similar form. See link in footer if these mails annoy you.]

Quoted 15 lines · Qu Wenruo

Recently I am testing scrub preparing for the incoming logical scrub.

But I noticed some rare and random test cases failure from scrub and replace groups.

E.g. btrfs/072 has a chance of failure around 1/30.

Initially I thought it's my scrub patches screwing things up, but with more digging, it turns out that it's real data corruption.

After scrubbing found errors, btrfs check --check-data-csum also reports csum mismatch.

Quoted 7 lines

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

Currently trying to bisect, but 6.4-rc4 already shows the bug.

And I can reproduce the problem on both x86_64 and aarch64 (both 4K page size)

Thanks for the report. To be sure the issue doesn't fall through the cracks unnoticed, I'm adding it to regzbot, the Linux kernel regression tracking bot:

#regzbot ^introduced v6.3..v6.4-rc6 #regzbot title btrfs: occasional data csum mismatch #regzbot ignore-activity

This isn't a regression? This issue or a fix for it are already discussed somewhere else? It was fixed already? You want to clarify when the regression started to happen? Or point out I got the title or something else totally wrong? Then just reply and tell me -- ideally while also telling regzbot about it, as explained by the page listed in the footer of this mail.

Developers: When fixing the issue, remember to add 'Link:' tags pointing to the report (the parent of this mail). See page linked in footer for details.

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
That page also explains what to do if mails like this annoy you.

#3 lore raw
In reply to Qu Wenruo
Quoted 8 lines · Qu Wenruo

Hi,

Recently I am testing scrub preparing for the incoming logical scrub.

But I noticed some rare and random test cases failure from scrub and replace groups.

E.g. btrfs/072 has a chance of failure around 1/30.

I'd like to get a list of tests that could potentially reproduce it. I've started 072 in a loop but given the frequency and also a possible other factors this probably won't be enough.

Quoted 5 lines

Initially I thought it's my scrub patches screwing things up, but with more digging, it turns out that it's real data corruption.

After scrubbing found errors, btrfs check --check-data-csum also reports csum mismatch.

It would be good to share the updates to fstests with the tests. I've added the data csum check to _check_btrfs_filesystem.

Quoted 2 lines

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

How does the corruption look like?

author
#4 lore raw
Quoted 11 lines · David Sterba
Quoted 8 lines · Qu Wenruo

Hi,

Recently I am testing scrub preparing for the incoming logical scrub.

But I noticed some rare and random test cases failure from scrub and replace groups.

E.g. btrfs/072 has a chance of failure around 1/30.

I'd like to get a list of tests that could potentially reproduce it.

For my last reproduce, it's pure btrfs/072 loop, no other extra test involved.

Quoted 3 lines

I've
started 072 in a loop but given the frequency and also a possible other factors this probably won't be enough.

Last night I ran it for around 4 hours, but surprisingly no reproduce any more.

Quoted 7 lines
Quoted 6 lines

Initially I thought it's my scrub patches screwing things up, but with more digging, it turns out that it's real data corruption.

After scrubbing found errors, btrfs check --check-data-csum also reports csum mismatch.

Quoted 7 lines

It would be good to share the updates to fstests with the tests. I've added the data csum check to _check_btrfs_filesystem.

Quoted 2 lines

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

How does the corruption look like?

Just some csum mismatch, which both scrub and btrfs check --check-data-csum report.

One of my concern here is the temperature of my environment, with AC running it no longer reproduces...

Hope it's really just a false alert.

Anyway thank you very much for the extra runs, I have to say my systems are no longer reliable during north hemisphere summer...

Thanks,
Qu

#5 lore raw
Quoted 9 lines · Qu Wenruo
Quoted 7 lines · David Sterba

It would be good to share the updates to fstests with the tests. I've added the data csum check to _check_btrfs_filesystem.

Quoted 2 lines

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

How does the corruption look like?

Quoted 7 lines

Just some csum mismatch, which both scrub and btrfs check --check-data-csum report.

One of my concern here is the temperature of my environment, with AC running it no longer reproduces...

Hope it's really just a false alert.

No signs of problems so far, blaming it on overheating would fit the mysterious hard to reproduce bugs. We'll keep testing and see but this should not get a status of regression until we have something more concrete.

#6 lore raw
Quoted 16 lines · David Sterba
Quoted 15 lines · Qu Wenruo
Quoted 7 lines · David Sterba

It would be good to share the updates to fstests with the tests. I've added the data csum check to _check_btrfs_filesystem.

Quoted 2 lines

Furthermore this is profile independent, I have see all profiles hitting such data corruption.

How does the corruption look like?

Just some csum mismatch, which both scrub and btrfs check --check-data-csum report.

One of my concern here is the temperature of my environment, with AC running it no longer reproduces...

Quoted 6 lines
Quoted 1 line

Hope it's really just a false alert.

No signs of problems so far, blaming it on overheating would fit the mysterious hard to reproduce bugs. We'll keep testing and see but this should not get a status of regression until we have something more concrete.

Don't worry, I was keeping an eye on it already after I saw Qu's msg and would have removed it from the list of tracked issues before sending my next report to Linus.

Anyway, with your additional confirmation, let me remove this from the tracking right now:

#regzbot inconclusive: likely a overheating problem and not a regression #regzbot ignore-activity

Ciao, Thorsten (wearing his 'the Linux kernel's regression tracker' hat) --
Everything you wanna know about Linux kernel regression tracking:
https://linux-regtracking.leemhuis.info/about/#tldr
If I did something stupid, please tell me, as explained on that page.