Thread (34 messages) 34 messages, 5 authors, 2024-01-27

Re: [PATCH 3/7] md: test for MD_RECOVERY_DONE in stop_sync_thread

From: Song Liu <song@kernel.org>
Date: 2024-01-18 21:10:40
Also in: dm-devel

On Thu, Jan 18, 2024 at 5:24 AM Mikulas Patocka [off-list ref] wrote:


On Wed, 17 Jan 2024, Song Liu wrote:
quoted
On Wed, Jan 17, 2024 at 10:19 AM Mikulas Patocka [off-list ref] wrote:
quoted
stop_sync_thread sets MD_RECOVERY_INTR and then waits for
MD_RECOVERY_RUNNING to be cleared. However, md_do_sync will not clear
MD_RECOVERY_RUNNING when exiting, it will set MD_RECOVERY_DONE instead.

So, we must wait for MD_RECOVERY_DONE to be set as well.

This patch fixes a deadlock in the LVM2 test shell/integrity-caching.sh.
I am not able to reproduce the issue on 6.7 kernel with
shell/integrity-caching.sh.
I got:

VERBOSE=0 ./lib/runner \
        --testdir . --outdir results \
        --flavours ndev-vanilla --only shell/integrity-caching.sh --skip @
running 1 tests
###       passed: [ndev-vanilla] shell/integrity-caching.sh  4:24.225

### 1 tests: 1 passed, 0 skipped, 0 timed out, 0 warned, 0 failed   in  4:24.453
make[1]: Leaving directory '/root/lvm2/test'

Do you see the issue every time with shell/integrity-caching.sh?
Hmm, that's strange - I get a hang with this stacktrace sometimes
instantly, sometimes in 30 seconds. I test it on the current kernel from
Linus' git - 052d534373b7ed33712a63d5e17b2b6cdbce84fd.
It works for me. I guess there is some difference in the config/system?

VERBOSE=0 ./lib/runner \
        --testdir . --outdir results \
        --flavours ndev-vanilla --only shell/integrity-caching.sh --skip @
running 1 tests
###       passed: [ndev-vanilla] shell/integrity-caching.sh  4:18.360

### 1 tests: 1 passed, 0 skipped, 0 timed out, 0 warned, 0 failed   in  4:18.749
make[1]: Leaving directory '/root/lvm2/test'

[root@ ~]# uname -r
6.7.0-09928-g052d534373b7
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help