Re: [linus:master] [btrfs] 5f58d783fd: xfstests.btrfs.172.fail

From: Anand Jain
Date: Thu Mar 23 2023 - 00:15:35 EST




On 23/03/2023 12:07, Oliver Sang wrote:
hi, Anand,

On Thu, Mar 23, 2023 at 07:49:27AM +0800, Anand Jain wrote:
On 17/03/2023 12:14, Anand Jain wrote:


Thank you for reporting it. I am currently looking into it. It appears
that the device is being freed after it's closed, which could indicate
that we overlooked something at close, just a hypothesis at this point.

-Anand




     +(see /lkp/benchmarks/xfstests/results//btrfs/172.full for details)


Hmm, I'm unable to reproduce the issue. However, it's possible that the
O_EXCL open for the 'btrfs check' command failed because 'systemd-udev'
was scanning the btrfs device at the same time. I noticed from the dmesg
that the 'systemd-udevd' thread was running [1] at some point. I'm not
entirely sure if it raced with the 'btrfs check' command to successfully
acquire the O_EXCL lock. If you could send me the 'testcase.full' and
'testcase.out.bad' logs from the system, I could verify the issue.

[1]
[ 337.769932][ T6408] BTRFS: device fsid
8dcaa8fb-b317-4e13-9e04-e9b63fe91948 devid 1 transid 6 /dev/sdb6 scanned by
systemd-udevd (6408)


Could you please also attach the full log and out.bad file for
the test case in the report as shown below?

/lkp/benchmarks/xfstests/results/btrfs/<test-case-number>.full
and
/lkp/benchmarks/xfstests/results/btrfs/<test-case-number>.out.bad


as attached. Thanks!


Thanks.

My assumption about the reason for fsck failure was correct, it failed due to device busy.

*** fsck.btrfs output ***
ERROR: cannot open device '/dev/sdb6': Device or resource busy
ERROR: cannot open file system
Opening filesystem to check...
*** end fsck.btrfs output

I am testing a fix, I will send it.

Anand