ocfs2: fix missing reset j_num_trans for sync
PATCH 1/2 ocfs2: fix missing reset j_num_trans for sync
fstest generic cases 266 272 281 trigger hanging issue when umount.
I use 266 to describe the root cause.
``` 49 _dmerror_unmount 50 _dmerror_mount 51 52 echo "Compare files" 53 md5sum $testdir/file1 | _filter_scratch 54 md5sum $testdir/file2 | _filter_scratch 55 56 echo "CoW and unmount" 57 sync 58 _dmerror_load_error_table 59 urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \ 60 -c "fdatasync" $testdir/file2 2>&1) 61 echo $urk >> $seqres.full 62 echo "$urk" | grep -q "error" || _fail "pwrite did not fail" 63 64 echo "Clean up the mess" 65 _dmerror_unmount ```
After line 49 50 umount & mount ocfs2 dev, this case run md5sum to verify target file. Line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. This case is hanging at line 65.
The md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. But there is only ->j_num_trans+1 in ocfs2_start_trans, the ocfs2_commit_trans doesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered.
call flow:
```
[md5sum] //line 53 54
vfs_read
ocfs2_file_read_iter
ocfs2_inode_lock_atime
ocfs2_update_inode_atime
+ ocfs2_start_trans //atomic_inc j_num_trans
+ ...
+ ocfs2_commit_trans//no modify j_num_trans
sync //line 57. no modify j_num_trans
_dmerror_load_error_table //all write will return error after this line
_dmerror_unmount //found j_num_trans is not zero, run commit thread
//but the underlying dev is dm-error, journaling IO
//failed all the time and keep going to retry.
```*** How to fix ***
kick commit thread in sync path, which can reset j_num_trans to 0.
--- fs/ocfs2/super.c | 3 +++ 1 file changed, 3 insertions(+)
fs/ocfs2/super.c +3 -0
@@ -412,6 +412,9 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait)jbd2_log_wait_commit (osb->journal->j_journal, target); } +/* kick commit thread to reset journal->j_num_trans */ +if (atomic_read (&(osb->journal->j_num_trans))) +wake_up (&osb->checkpoint_event);return 0 ; }
Signature · 7 lines
2.39.2 _______________________________________________ Ocfs2-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/ocfs2-devel
PATCH 2/2 ocfs2: add error handling path when jbd2 enter ABORT status
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.
This commit gives ocfs2 ability to handle jbd2 ABORT case.
--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)
fs/ocfs2/alloc.c +6 -4
@@ -6308,11 +6308,13 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq); -flush_workqueue (osb->ocfs2_wq); +if (!is_journal_aborted (osb->journal->j_journal)) { +flush_workqueue (osb->ocfs2_wq); - status =ocfs2_flush_truncate_log (osb); -if (status <0 ) -mlog_errno (status); + status =ocfs2_flush_truncate_log (osb); +if (status <0 ) +mlog_errno (status); + }brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode);
fs/ocfs2/journal.c +5 -0
@@ -312,11 +312,16 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) status =jbd2_journal_flush (journal->j_journal,0 );jbd2_journal_unlock_updates (journal->j_journal);if (status <0 ) { +if (is_journal_aborted (journal->j_journal)) { +ocfs2_error (osb->sb,"jbd2 status: ABORT.\n" ); + goto reset; + }up_write (&journal->j_trans_barrier);mlog_errno (status); goto finally; } +reset:ocfs2_inc_trans_id (journal); flushed =atomic_read (&journal->j_num_trans);
fs/ocfs2/localalloc.c +3 -0
@@ -378,6 +378,9 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)if (osb->ocfs2_wq)flush_workqueue (osb->ocfs2_wq); +if (is_journal_aborted (osb->journal->j_journal)) + goto out; +if (osb->local_alloc_state ==OCFS2_LA_UNUSED ) goto out;
Signature · 7 lines
2.39.2 _______________________________________________ Ocfs2-devel mailing list [email protected] https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
More info for this patch, maybe I should write below info in commit log.
From the comment of __ocfs2_abort(), there is another way to handle
journal ABORT: panic.
And fstest generic test NO. 648 will trigger
ocfs2_abort then make kernel
panic. I don't like the panic style, ocfs2
should elegantly handle journal
abnormal case.
Thanks,
Heming
fs/ocfs2/alloc.c
Quoted 14 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)fs/ocfs2/alloc.c +0
-0
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
In reply to Heming Zhao via Ocfs2-devel(sorry, my last mail format is by Thunderbird, resend by neomutt.)
----
More info for this patch, maybe I should write below info in commit log.
From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic.
And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case.
Thanks,
Heming
Quoted 4 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.
Quoted 9 lines
This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
In reply to Heming Zhao via Ocfs2-develQuoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.
What's the end user impact?
JBD2_ABORT indicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:
if (is_journal_aborted(journal))
return -EROFS;
Thanks,
Joseph
Quoted 58 lines
This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)fs/ocfs2/alloc.c +6
-4@@ -6308,11 +6308,13 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq); -flush_workqueue (osb->ocfs2_wq); +if (!is_journal_aborted (osb->journal->j_journal)) { +flush_workqueue (osb->ocfs2_wq); - status =ocfs2_flush_truncate_log (osb); -if (status <0 ) -mlog_errno (status); + status =ocfs2_flush_truncate_log (osb); +if (status <0 ) +mlog_errno (status); + }brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode);fs/ocfs2/journal.c +5
-0@@ -312,11 +312,16 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) status =jbd2_journal_flush (journal->j_journal,0 );jbd2_journal_unlock_updates (journal->j_journal);if (status <0 ) { +if (is_journal_aborted (journal->j_journal)) { +ocfs2_error (osb->sb,"jbd2 status: ABORT.\n" ); + goto reset; + }up_write (&journal->j_trans_barrier);mlog_errno (status); goto finally; } +reset:ocfs2_inc_trans_id (journal); flushed =atomic_read (&journal->j_num_trans);fs/ocfs2/localalloc.c +0
-0
fs/ocfs2/localalloc.c void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) · line 386
Quoted 9 lines
fs/ocfs2/localalloc.c +3
-0@@ -378,6 +378,9 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)if (osb->ocfs2_wq)flush_workqueue (osb->ocfs2_wq); +if (is_journal_aborted (osb->journal->j_journal)) + goto out; +if (osb->local_alloc_state ==OCFS2_LA_UNUSED ) goto out;
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite ocfs2_test.)
Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])
``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```
Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;
IIUC, do you mean add above code in ocfs2_commit_cache or in ocfs2_commit_thread?
1>
If in ocfs2_commit_cache, this fix doesn't take any effect for unmount failure(hanging).
When return -EROFS, the caller ocfs2_commit_thread just print error message and keep going to retry.
2>
If in ocfs2_commit_thread, it makes commit thread exit/stop without notifying other ocfs2 paths. Later wake_up(&osb->checkpoint_event) won't take effect, ocfs2 will enter chaose.
In my view, there is missing a place to set fs RO. So [2/2] in ocfs2_commit_cache, uses ocfs2_error to mark RO before returning status (<0 value). The ocfs2_error is the right place to mark RO.
- Heming
Quoted 61 lines
Quoted 61 lines
This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)fs/ocfs2/alloc.c +6
-4@@ -6308,11 +6308,13 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq); -flush_workqueue (osb->ocfs2_wq); +if (!is_journal_aborted (osb->journal->j_journal)) { +flush_workqueue (osb->ocfs2_wq); - status =ocfs2_flush_truncate_log (osb); -if (status <0 ) -mlog_errno (status); + status =ocfs2_flush_truncate_log (osb); +if (status <0 ) +mlog_errno (status); + }brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode);fs/ocfs2/journal.c +5
-0@@ -312,11 +312,16 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) status =jbd2_journal_flush (journal->j_journal,0 );jbd2_journal_unlock_updates (journal->j_journal);if (status <0 ) { +if (is_journal_aborted (journal->j_journal)) { +ocfs2_error (osb->sb,"jbd2 status: ABORT.\n" ); + goto reset; + }up_write (&journal->j_trans_barrier);mlog_errno (status); goto finally; } +reset:ocfs2_inc_trans_id (journal); flushed =atomic_read (&journal->j_num_trans);fs/ocfs2/localalloc.c +0
-0@@ -378,6 +378,9 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)if (osb->ocfs2_wq)flush_workqueue (osb->ocfs2_wq);
Quoted 6 lines
fs/ocfs2/localalloc.c void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) · line 386
Quoted 6 lines
fs/ocfs2/localalloc.c +3
-0+if (is_journal_aborted (osb->journal->j_journal)) + goto out; +if (osb->local_alloc_state ==OCFS2_LA_UNUSED ) goto out;
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 10 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
Quoted 8 lines
There are two impacts:
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
Quoted 34 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 5 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:
Quoted 6 lines
Quoted 4 lines
if (
is_journal_aborted(journal))return -EROFS;IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?
Yes, break the loop in ocfs2_commit_thread() in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
Quoted 77 lines
1>
If inocfs2_commit_cache, this fix doesn't take any effect for unmount failure(hanging).
When return-EROFS, the callerocfs2_commit_threadjust print error message and keep going to retry.
2>
If inocfs2_commit_thread, it makes commit thread exit/stop without notifying other ocfs2 paths. Laterwake_up(&osb->checkpoint_event)won't take effect, ocfs2 will enter chaose.In my view, there is missing a place to set fs RO. So [2/2] in
ocfs2_commit_cache, usesocfs2_errorto mark RO before returning status (<0 value). Theocfs2_erroris the right place to mark RO.- Heming
Quoted 61 lines
Quoted 61 lines
This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)fs/ocfs2/alloc.c +6
-4@@ -6308,11 +6308,13 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq); -flush_workqueue (osb->ocfs2_wq); +if (!is_journal_aborted (osb->journal->j_journal)) { +flush_workqueue (osb->ocfs2_wq); - status =ocfs2_flush_truncate_log (osb); -if (status <0 ) -mlog_errno (status); + status =ocfs2_flush_truncate_log (osb); +if (status <0 ) +mlog_errno (status); + }brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode);fs/ocfs2/journal.c +5
-0@@ -312,11 +312,16 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) status =jbd2_journal_flush (journal->j_journal,0 );jbd2_journal_unlock_updates (journal->j_journal);if (status <0 ) { +if (is_journal_aborted (journal->j_journal)) { +ocfs2_error (osb->sb,"jbd2 status: ABORT.\n" ); + goto reset; + }up_write (&journal->j_trans_barrier);mlog_errno (status); goto finally; } +reset:ocfs2_inc_trans_id (journal); flushed =atomic_read (&journal->j_num_trans);fs/ocfs2/localalloc.c +0
-0@@ -378,6 +378,9 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)if (osb->ocfs2_wq)flush_workqueue (osb->ocfs2_wq);
Quoted 6 lines
Quoted 6 lines
fs/ocfs2/localalloc.c void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) · line 386
Quoted 6 lines
fs/ocfs2/localalloc.c +3
-0+if (is_journal_aborted (osb->journal->j_journal)) + goto out; +if (osb->local_alloc_state ==OCFS2_LA_UNUSED ) goto out;
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;
Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.
I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) {
ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important.
return -EROFS;
}Only return -EROFS then break loop in ocfs2_commit_thread() is not enough. Without ocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which in ocfs2_commit_cache().
Quoted 2 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
Quoted 78 lines
Quoted 78 lines
1>
If inocfs2_commit_cache, this fix doesn't take any effect for unmount failure(hanging).
When return-EROFS, the callerocfs2_commit_threadjust print error message and keep going to retry.
2>
If inocfs2_commit_thread, it makes commit thread exit/stop without notifying other ocfs2 paths. Laterwake_up(&osb->checkpoint_event)won't take effect, ocfs2 will enter chaose.In my view, there is missing a place to set fs RO. So [2/2] in
ocfs2_commit_cache, usesocfs2_errorto mark RO before returning status (<0 value). Theocfs2_erroris the right place to mark RO.- Heming
Quoted 61 lines
Quoted 61 lines
This commit gives ocfs2 ability to handle jbd2 ABORT case.
Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/alloc.c | 10 ++++++---- fs/ocfs2/journal.c | 5 +++++ fs/ocfs2/localalloc.c | 3 +++ 3 files changed, 14 insertions(+), 4 deletions(-)fs/ocfs2/alloc.c +6
-4@@ -6308,11 +6308,13 @@ void ocfs2_truncate_log_shutdown(struct ocfs2_super *osb)if (tl_inode) {cancel_delayed_work (&osb->osb_truncate_log_wq); -flush_workqueue (osb->ocfs2_wq); +if (!is_journal_aborted (osb->journal->j_journal)) { +flush_workqueue (osb->ocfs2_wq); - status =ocfs2_flush_truncate_log (osb); -if (status <0 ) -mlog_errno (status); + status =ocfs2_flush_truncate_log (osb); +if (status <0 ) +mlog_errno (status); + }brelse (osb->osb_tl_bh);iput (osb->osb_tl_inode);fs/ocfs2/journal.c +5
-0@@ -312,11 +312,16 @@ static int ocfs2_commit_cache(struct ocfs2_super *osb) status =jbd2_journal_flush (journal->j_journal,0 );jbd2_journal_unlock_updates (journal->j_journal);if (status <0 ) { +if (is_journal_aborted (journal->j_journal)) { +ocfs2_error (osb->sb,"jbd2 status: ABORT.\n" ); + goto reset; + }up_write (&journal->j_trans_barrier);mlog_errno (status); goto finally; } +reset:ocfs2_inc_trans_id (journal); flushed =atomic_read (&journal->j_num_trans);fs/ocfs2/localalloc.c +0
-0@@ -378,6 +378,9 @@ void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb)if (osb->ocfs2_wq)flush_workqueue (osb->ocfs2_wq);
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
fs/ocfs2/localalloc.c void ocfs2_shutdown_local_alloc(struct ocfs2_super *osb) · line 386
Quoted 6 lines
fs/ocfs2/localalloc.c +3
-0+if (is_journal_aborted (osb->journal->j_journal)) + goto out; +if (osb->local_alloc_state ==OCFS2_LA_UNUSED ) goto out;
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }
Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().
Agree, but ocfs2_abort() is more appropriate here, see ocfs2_start_trans(). But ocfs2_abort() may panic system, I'm afraid it has to change to read-only accordingly.
Quoted 7 lines
Quoted 2 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 90 lines · Joseph Qi
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().
Quoted 3 lines
Agree, but
ocfs2_abort()is more appropriate here, seeocfs2_start_trans(). Butocfs2_abort()may panic system, I'm afraid it has to change to read-only accordingly.
You are right. I ever used ocfs2_abort() then got panic. :)
So I changed to ocfs2_error(). I also sent two mails in 2023-4-30 (the first mail has mess format by thunderbird). I copy the mail content here:
``` More info for this patch, maybe I should write below info in commit log. From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic. And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case. ```
fstest NO. 648 could trigger ocfs2_abort from ocfs2_start_trans(). So you could find my previous mail, I ran the fstest with parameter '-e generic/648', which means fstest excludes NO. 648.
The only different between ocfs2_abort and ocfs2_error is set OCFS2_MOUNT_ERRORS_PANIC, which could trigger panic. If you think panic is brute, I suggest to use ocfs2_error.
Quoted 4 lines
Quoted 4 lines
Quoted 3 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
Quoted 8 lines
Quoted 4 lines
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
With your idea, I spent more than two hours for coding & testing. The result is my patch [2/2] is correct. Please believe my patch [2/2].
In patch [2/2], there is 'goto reset' which will resolve below three issues:
ocfs2_commit_cache
+ ... ...
reset: //goto label
+ ocfs2_inc_trans_id(journal); //<1.1>
+ atomic_set(&journal->j_num_trans, 0); //<2>
+ ocfs2_wake_downconvert_thread(osb); //<3>
+ wake_up(&journal->j_checkpointed); //<1.2>
1> trigger hanging
umount
... ...
ocfs2_clear_inode
ocfs2_checkpoint_inode(inode)
+ ocfs2_ci_fully_checkpointed() //1.1: check '->j_trans_id'
+ wait_event(osb->journal->j_checkpointed, ...)
+ 1.2: will wait forever, if commit thread exits.
2> trigger BUG_ON()
ocfs2_journal_shutdown
+ BUG_ON(atomic_read(&(osb->journal->j_num_trans)) != 0);
3> trigger dlm lock convert blocking
if there is pending downconvert lock, no one kick it.
At last, you could set up a fstest env and verify my writing.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 108 lines · Heming Zhao
Quoted 90 lines · Joseph Qi
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().Quoted 3 lines
Agree, but
ocfs2_abort()is more appropriate here, seeocfs2_start_trans(). Butocfs2_abort()may panic system, I'm afraid it has to change to read-only accordingly.You are right. I ever used
ocfs2_abort()then got panic. :)
So I changed toocfs2_error(). I also sent two mails in 2023-4-30 (the first mail has mess format by thunderbird). I copy the mail content here:``` More info for this patch, maybe I should write below info in commit log. From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic. And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case. ```
Quoted 8 lines
fstest NO. 648 could trigger
ocfs2_abortfromocfs2_start_trans(). So you could find my previous mail, I ran the fstest with parameter '-e generic/648', which means fstest excludes NO. 648.The only different between
ocfs2_abortandocfs2_erroris setOCFS2_MOUNT_ERRORS_PANIC, which could trigger panic. If you think panic is brute, I suggest to useocfs2_error.
Looked back the history, it is designed to panic in cluster mode:a2f2ddbf2baf ocfs2: __ocfs2_abort() should not enable panic for local mounts
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
Quoted 8 lines
Quoted 4 lines
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
With your idea, I spent more than two hours for coding & testing. The result is my patch [2/2] is correct. Please believe my patch [2/2].
I am not arguing if your patch can pass the testcases above. I am talking about whether we do it this way is right.
Now journal flush actually fails since journal is abort, which means journal data are not reflected in filesystem. But after your change, it behaves like we've done a normal checkpoint.
Take the following scenario into consideration:
N0 does some changes on file1, but now disk down and journal is abort, and checkpoint behaves successfully even it does nothing.
N1 get the access right on file1 and does other changes, and checkpoint normally.
N0 is crash, and N1 begins to recover N0, then data corruption happens.
I've fixed a similar issue in the past:6f6a6fda2945 jbd2: fix ocfs2 corrupt when updating journal superblock fails
Thanks,
Joseph
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Sorry for reply late, I am a little bit busy recently.
Quoted 115 lines · Joseph Qi
Quoted 112 lines · Heming Zhao
Quoted 90 lines · Joseph Qi
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().Quoted 3 lines
Agree, but
ocfs2_abort()is more appropriate here, seeocfs2_start_trans(). Butocfs2_abort()may panic system, I'm afraid it has to change to read-only accordingly.You are right. I ever used
ocfs2_abort()then got panic. :)
So I changed toocfs2_error(). I also sent two mails in 2023-4-30 (the first mail has mess format by thunderbird). I copy the mail content here:``` More info for this patch, maybe I should write below info in commit log. From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic. And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case. ```fstest NO. 648 could trigger
ocfs2_abortfromocfs2_start_trans(). So you could find my previous mail, I ran the fstest with parameter '-e generic/648', which means fstest excludes NO. 648.
Quoted 7 lines
Quoted 4 lines
The only different between
ocfs2_abortandocfs2_erroris setOCFS2_MOUNT_ERRORS_PANIC, which could trigger panic. If you think panic is brute, I suggest to useocfs2_error.Looked back the history, it is designed to panic in cluster mode:
a2f2ddbf2bafocfs2:__ocfs2_abort()should not enable panic for local mounts
About the panic action from ocfs2_abort(), in my view, it's too scared to acceptable. I am not familar with o2cb stack, in pcmk stack, there is resource-agents RA Filesystem[1], which includes two level to detect fs abormal:
- Filesystem_monitor_10 : read the device
- Filesystem_monitor_20 : write and read a status file
if ocfs2 enters abort status, Filesystem RA will detect it and trigger HA stack to do the handover resources job.
if Filesystem RA doesn't apply monitor_[10|20] level, a readonly fs (not panic then generate a coredump) could give administrator more info to locate the rootcause.
I write above base on gfs2 fstest result: gfs2 doesn't panic for the ocfs2 panic cases.
[1]:
https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/Filesystem
Quoted 32 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
Quoted 8 lines
Quoted 4 lines
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
With your idea, I spent more than two hours for coding & testing. The result is my patch [2/2] is correct. Please believe my patch [2/2].
I am not arguing if your patch can pass the testcases above. I am talking about whether we do it this way is right.
Now journal flush actually fails since journal is abort, which means journal data are not reflected in filesystem. But after your change, it behaves like we've done a normal checkpoint.
Take the following scenario into consideration:
N0 does some changes on file1, but now disk down and journal is abort, and checkpoint behaves successfully even it does nothing.
N1 get the access right on file1 and does other changes, and checkpoint normally.
N0 is crash, and N1 begins to recover N0, then data corruption happens.
Quoted 3 lines
I've fixed a similar issue in the past:
6f6a6fda2945jbd2: fix ocfs2 corrupt when updating journal superblock fails
I agree with above description. Thank you for pointing out my mistake, I forgot the dlm layer callback for node-down case.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 138 lines · Heming Zhao
Sorry for reply late, I am a little bit busy recently.
Quoted 115 lines · Joseph Qi
Quoted 112 lines · Heming Zhao
Quoted 90 lines · Joseph Qi
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().Quoted 3 lines
Agree, but
ocfs2_abort()is more appropriate here, seeocfs2_start_trans(). Butocfs2_abort()may panic system, I'm afraid it has to change to read-only accordingly.You are right. I ever used
ocfs2_abort()then got panic. :)
So I changed toocfs2_error(). I also sent two mails in 2023-4-30 (the first mail has mess format by thunderbird). I copy the mail content here:``` More info for this patch, maybe I should write below info in commit log. From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic. And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case. ```fstest NO. 648 could trigger
ocfs2_abortfromocfs2_start_trans(). So you could find my previous mail, I ran the fstest with parameter '-e generic/648', which means fstest excludes NO. 648.Quoted 7 lines
Quoted 4 lines
The only different between
ocfs2_abortandocfs2_erroris setOCFS2_MOUNT_ERRORS_PANIC, which could trigger panic. If you think panic is brute, I suggest to useocfs2_error.Looked back the history, it is designed to panic in cluster mode:
a2f2ddbf2bafocfs2:__ocfs2_abort()should not enable panic for local mountsAbout the panic action from
ocfs2_abort(), in my view, it's too scared to acceptable. I am not familar with o2cb stack, in pcmk stack, there is resource-agents RA Filesystem[1], which includes two level to detect fs abormal:
-Filesystem_monitor_10: read the device
-Filesystem_monitor_20: write and read a status fileif ocfs2 enters abort status, Filesystem RA will detect it and trigger HA stack to do the handover resources job.
if Filesystem RA doesn't apply monitor_[10|20] level, a readonly fs (not panic then generate a coredump) could give administrator more info to locate the rootcause.
Quoted 6 lines
I write above base on gfs2 fstest result: gfs2 doesn't panic for the ocfs2 panic cases.
[1]:
https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/Filesystem
Agree, so a more elegant way is to make the journal abort node behaves like node down, e.g. set hard readonly so that heartbeat also can not update normally.
In xfstests, it uses device mapper to simulate disk down, so it will also trigger node down recover since heartbeat won't update normally?
Also, I'm not sure pcmk supports fence other node by only rejecting IOs. The built-in ocfs2 fence policy only supports fence self through panic or reset.
Thanks,
Joseph
Quoted 32 lines
Quoted 32 lines
Quoted 9 lines
Quoted 9 lines
Quoted 9 lines
Quoted 4 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
Quoted 8 lines
Quoted 4 lines
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
With your idea, I spent more than two hours for coding & testing. The result is my patch [2/2] is correct. Please believe my patch [2/2].
I am not arguing if your patch can pass the testcases above. I am talking about whether we do it this way is right.
Now journal flush actually fails since journal is abort, which means journal data are not reflected in filesystem. But after your change, it behaves like we've done a normal checkpoint.
Take the following scenario into consideration:
N0 does some changes on file1, but now disk down and journal is abort, and checkpoint behaves successfully even it does nothing.
N1 get the access right on file1 and does other changes, and checkpoint normally.
N0 is crash, and N1 begins to recover N0, then data corruption happens.
Quoted 8 lines
Quoted 3 lines
I've fixed a similar issue in the past:
6f6a6fda2945jbd2: fix ocfs2 corrupt when updating journal superblock failsI agree with above description. Thank you for pointing out my mistake, I forgot the dlm layer callback for node-down case.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Re: [Ocfs2-devel] [PATCH 2/2] ocfs2: add error handling path when jbd2 enter ABORT status
Quoted 148 lines · Joseph Qi
Quoted 138 lines · Heming Zhao
Sorry for reply late, I am a little bit busy recently.
Quoted 115 lines · Joseph Qi
Quoted 112 lines · Heming Zhao
Quoted 90 lines · Joseph Qi
Quoted 80 lines · Heming Zhao
Quoted 15 lines · Joseph Qi
Quoted 12 lines · Heming Zhao
Quoted 8 lines · Joseph Qi
Quoted 3 lines · Heming Zhao
fstest generic cases 347 361 628 629 trigger a same issue:
When jbd2 enter ABORT status, ocfs2 ignores it and keep going to commit journal.What's the end user impact?
There are two impacts:
Quoted 8 lines
Quoted 6 lines
1. this issue makes unmount command hanging.
No one likes or accepts filesystem unmount failure when underlying devices meets error. For comparison, other FSs (e.g. ext4, xfs, gfs2, ..) could do unmount successfully.
So umount hang should be in the patch description, right?
OK.
Quoted 39 lines
Quoted 39 lines
2. for developers to verify their patch doesn't make any regression.
fstest is a famious & important fs testsuite. (Yes, I know ocfs2 has itself testsuite
ocfs2_test.)Current status, there are many test cases (about 9 in my env) cause fstest hanging and blocking fstest to run. I did test for gfs2 on latest tumbleweed, gfs2 only has 1 hanging case.
In my view, ocfs2 developers or maintainers at least make ocfs2 to finish the testsuite. Long-term target is to make ocfs2 to pass all the testsuite.
On kernel 6.2.9-1, the fstest 'quick' test group result:
(the result based on my two patches [1/2] & [2/2])``` ./check -g quick -T -b -s ocfs2 -e generic/081 -e generic/648 Failures: generic/003 generic/013 generic/015 generic/040 generic/041 generic/062 generic/082 generic/104 generic/107 generic/228 generic/244 generic/266 generic/272 generic/277 generic/281 generic/322 generic/329 generic/331 generic/336 generic/343 generic/376 generic/379 generic/380 generic/383 generic/384 generic/385 generic/386 generic/400 generic/410 generic/424 generic/441 generic/448 generic/449 generic/471 generic/479 generic/493 generic/495 generic/510 generic/537 generic/552 generic/563 generic/578 generic/594 generic/607 generic/620 generic/628 generic/630 generic/636 generic/702 Failed 49 of 568 tests ```Quoted 9 lines
JBD2_ABORTindicates a fatal error happens, either in jounral layer or filesystem. And we should not commit any further transactions. It seems that we may unify the behavior like:if (
is_journal_aborted(journal))return -EROFS;Quoted 6 lines
Quoted 2 lines
IIUC, do you mean add above code in
ocfs2_commit_cacheor inocfs2_commit_thread?Yes, break the loop in
ocfs2_commit_thread()in case of journal abort. Actually we've handled this case before, but just limit the print. But it seems not enough now.I wrote in my previous mail. Follow your idea, The code should be:
if (is_journal_aborted(journal)) { ocfs2_error(osb->sb, "jbd2 status: ABORT.\n"); //this line is important. return -EROFS; }Quoted 6 lines
Only return
-EROFSthen break loop inocfs2_commit_thread()is not enough. Withoutocfs2_error(), ocfs2 could accept new IOs from userspace, then the new IOs will trigger IO error then trigger RO status. This flow is wrong, we should mark RO as early as possible when JBD ABORT happens. In my view, the best place is my [2/2] patch code which inocfs2_commit_cache().Quoted 3 lines
Agree, but
ocfs2_abort()is more appropriate here, seeocfs2_start_trans(). Butocfs2_abort()may panic system, I'm afraid it has to change to read-only accordingly.You are right. I ever used
ocfs2_abort()then got panic. :)
So I changed toocfs2_error(). I also sent two mails in 2023-4-30 (the first mail has mess format by thunderbird). I copy the mail content here:``` More info for this patch, maybe I should write below info in commit log. From the comment of __ocfs2_abort(), there is another way to handle journal ABORT: panic. And fstest generic test NO. 648 will trigger ocfs2_abort then make kernel panic. I don't like the panic style, ocfs2 should elegantly handle journal abnormal case. ```fstest NO. 648 could trigger
ocfs2_abortfromocfs2_start_trans(). So you could find my previous mail, I ran the fstest with parameter '-e generic/648', which means fstest excludes NO. 648.Quoted 7 lines
Quoted 4 lines
The only different between
ocfs2_abortandocfs2_erroris setOCFS2_MOUNT_ERRORS_PANIC, which could trigger panic. If you think panic is brute, I suggest to useocfs2_error.Looked back the history, it is designed to panic in cluster mode:
a2f2ddbf2bafocfs2:__ocfs2_abort()should not enable panic for local mountsAbout the panic action from
ocfs2_abort(), in my view, it's too scared to acceptable. I am not familar with o2cb stack, in pcmk stack, there is resource-agents RA Filesystem[1], which includes two level to detect fs abormal:
-Filesystem_monitor_10: read the device
-Filesystem_monitor_20: write and read a status fileif ocfs2 enters abort status, Filesystem RA will detect it and trigger HA stack to do the handover resources job.
if Filesystem RA doesn't apply monitor_[10|20] level, a readonly fs (not panic then generate a coredump) could give administrator more info to locate the rootcause.Quoted 6 lines
I write above base on gfs2 fstest result: gfs2 doesn't panic for the ocfs2 panic cases.
[1]:
https://github.com/ClusterLabs/resource-agents/blob/main/heartbeat/Filesystem
Quoted 6 lines
Agree, so a more elegant way is to make the journal abort node behaves like node down, e.g. set hard readonly so that heartbeat also can not update normally.
In xfstests, it uses device mapper to simulate disk down, so it will also trigger node down recover since heartbeat won't update normally?
I am not familiar with hearbeat. Base on current code, in pcmk stack, your description is partly right. (see my answer in below. node may be hanging forever)
Quoted 5 lines
Also, I'm not sure pcmk supports fence other node by only rejecting IOs. The built-in ocfs2 fence policy only supports fence self through panic or reset.
Yes, pcmk supports fence another node.
SUSE HA stack pcmk (crmsh + corosync + pacemaker + stonith) is powerful and enterprise-class software solution, which usually deploys on SAP environment. For rejecting IOs or jbd2 aborted, Filesystem RA (see above [1]) could use monitor_[10|20] (OCF_CHECK_LEVEL) to enable detecting IOs error. If customer doesn't config OCF_CHECK_LEVEL, and the storage stack: disk => dlm+ocfs2, these will be hanging forever.
But, for a typical user case for SUSE customer:
disks => mpath => lvm2 (dlm/lvmlockd) => ocfs2
pcmk stack could monitor layer: dlm lvm2 lvmlockd ocfs2. anyone enters abnormal status, there will trigger fence action.
- Heming
Quoted 31 lines
Quoted 31 lines
Quoted 31 lines
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
BTW, the basic rule here is, we don't want to change journal to prevent other nodes corrupting the filesystem.
If my memory is correct, every node has itself special journal partition. If the HA stack assigns the same (before fenced) nodeid to JBD ABORTed machine, No other node could corrupting the fs.
Quoted 8 lines
Quoted 4 lines
I don't think it's a good idea to modify journal even flush fails. Why not catch EROFS in commit thread and break? Now we can only expect umount continues with error, right?
With your idea, I spent more than two hours for coding & testing. The result is my patch [2/2] is correct. Please believe my patch [2/2].
I am not arguing if your patch can pass the testcases above. I am talking about whether we do it this way is right.
Now journal flush actually fails since journal is abort, which means journal data are not reflected in filesystem. But after your change, it behaves like we've done a normal checkpoint.
Take the following scenario into consideration:
N0 does some changes on file1, but now disk down and journal is abort, and checkpoint behaves successfully even it does nothing.
N1 get the access right on file1 and does other changes, and checkpoint normally.
N0 is crash, and N1 begins to recover N0, then data corruption happens.
Quoted 8 lines
Quoted 8 lines
Quoted 3 lines
I've fixed a similar issue in the past:
6f6a6fda2945jbd2: fix ocfs2 corrupt when updating journal superblock failsI agree with above description. Thank you for pointing out my mistake, I forgot the dlm layer callback for node-down case.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Hi,
What's the journal status in this case?
I wonder why commit thread is not working, which should flush journal and reset j_num_trans during commit cache.
Thanks,
Joseph
Quoted 67 lines · Heming Zhao
fstest generic cases 266 272 281 trigger hanging issue when umount.
I use 266 to describe the root cause.
``` 49 _dmerror_unmount 50 _dmerror_mount 51 52 echo "Compare files" 53 md5sum $testdir/file1 | _filter_scratch 54 md5sum $testdir/file2 | _filter_scratch 55 56 echo "CoW and unmount" 57 sync 58 _dmerror_load_error_table 59 urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \ 60 -c "fdatasync" $testdir/file2 2>&1) 61 echo $urk >> $seqres.full 62 echo "$urk" | grep -q "error" || _fail "pwrite did not fail" 63 64 echo "Clean up the mess" 65 _dmerror_unmount ```After line 49 50 umount & mount ocfs2 dev, this case run md5sum to verify target file. Line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. This case is hanging at line 65.
The md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. But there is only ->j_num_trans+1 in
ocfs2_start_trans, theocfs2_commit_transdoesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered.call flow:
``` [md5sum] //line 53 54 vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //line 57. no modify j_num_trans _dmerror_load_error_table //all write will return error after this line _dmerror_unmount //found j_num_trans is not zero, run commit thread //but the underlying dev is dm-error, journaling IO //failed all the time and keep going to retry. ```*** How to fix ***
kick commit thread in sync path, which can reset
j_num_transto 0.Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/super.c | 3 +++ 1 file changed, 3 insertions(+)fs/ocfs2/super.c +0
-0
fs/ocfs2/super.c static int ocfs2_sync_fs(struct super_block *sb, int wait) · line 420
Quoted 9 lines
fs/ocfs2/super.c +3
-0@@ -412,6 +412,9 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait)jbd2_log_wait_commit (osb->journal->j_journal, target); } +/* kick commit thread to reset journal->j_num_trans */ +if (atomic_read (&(osb->journal->j_num_trans))) +wake_up (&osb->checkpoint_event);return 0 ; }
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with JBD2_ABORT
Quoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.
The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```
Thanks,
Heming
Quoted 64 lines · Heming Zhao
Quoted 62 lines
fstest generic cases 266 272 281 trigger hanging issue when umount.
I use 266 to describe the root cause.
``` 49 _dmerror_unmount 50 _dmerror_mount 51 52 echo "Compare files" 53 md5sum $testdir/file1 | _filter_scratch 54 md5sum $testdir/file2 | _filter_scratch 55 56 echo "CoW and unmount" 57 sync 58 _dmerror_load_error_table 59 urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \ 60 -c "fdatasync" $testdir/file2 2>&1) 61 echo $urk >> $seqres.full 62 echo "$urk" | grep -q "error" || _fail "pwrite did not fail" 63 64 echo "Clean up the mess" 65 _dmerror_unmount ```After line 49 50 umount & mount ocfs2 dev, this case run md5sum to verify target file. Line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. This case is hanging at line 65.
The md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. But there is only ->j_num_trans+1 in
ocfs2_start_trans, theocfs2_commit_transdoesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered.call flow:
``` [md5sum] //line 53 54 vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //line 57. no modify j_num_trans _dmerror_load_error_table //all write will return error after this line _dmerror_unmount //found j_num_trans is not zero, run commit thread //but the underlying dev is dm-error, journaling IO //failed all the time and keep going to retry. ```*** How to fix ***
kick commit thread in sync path, which can reset
j_num_transto 0.Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/super.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 14 lines
Quoted 5 lines
fs/ocfs2/super.c +0
-0fs/ocfs2/super.c static int ocfs2_sync_fs(struct super_block *sb, int wait) · line 420
Quoted 9 lines
fs/ocfs2/super.c +3
-0@@ -412,6 +412,9 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait)jbd2_log_wait_commit (osb->journal->j_journal, target); } +/* kick commit thread to reset journal->j_num_trans */ +if (atomic_read (&(osb->journal->j_num_trans))) +wake_up (&osb->checkpoint_event);return 0 ; }
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.
Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
If the expected behavior is to let umount ends even journal is abort, it seems we have to make journal shutdown happy in this case.
Thanks,
Joseph
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```
Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.
Quoted 3 lines
If the expected behavior is to let umount ends even journal is abort, it seems we have to make journal shutdown happy in this case.
This is my [patch 2/2] job, which resolves fstest generaic NO. 347 361 628 629.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 209 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.Quoted 1 line
Quoted 5 lines
Quoted 2 lines
If the expected behavior is to let umount ends even journal is abort, it seems we have to make journal shutdown happy in this case.
This is my [patch 2/2] job, which resolves fstest generaic NO. 347 361 628 629.
- Heming
The log after patching [1/2] (without patch [2/2])
``` [ 2252.964874] root[2991]: run xfstest generic/266 [ 2252.566084] unknown: run fstests generic/266 at 2023-05-01 10:58:37 [ 2253.006923] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 2253.595670] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: joining the lockspace group... [ 2253.598924] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover 1 [ 2253.598954] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: group event done 0 [ 2253.601184] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: add member 1 [ 2253.602340] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_members 1 nodes [ 2253.602624] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: generation 1 slots 1 1:1 [ 2253.602842] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory [ 2253.603010] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory 0 in 0 new [ 2253.603171] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory 0 out 0 messages [ 2253.603340] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover 1 generation 1 done: 0 ms [ 2253.603619] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: join complete [ 2253.606374] kernel: JBD2: Ignoring recovery information on journal [ 2253.611239] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 2254.020143] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 2253.623800] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: leaving the lockspace group... [ 2253.624720] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: group event done 0 [ 2253.626368] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: release_lockspace final free [ 2254.027879] ocfs2_hb_ctl[3197]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u D9AC6C30527E4F8799E9BCDAC64F2F47 [ 2253.634342] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 2253.659701] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: joining the lockspace group... [ 2253.668134] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: group event done 0 [ 2253.668158] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover 1 [ 2253.668583] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: add member 1 [ 2253.668792] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_members 1 nodes [ 2253.669003] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: generation 1 slots 1 1:1 [ 2253.669211] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory [ 2253.669670] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory 0 in 0 new [ 2253.670034] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover_directory 0 out 0 messages [ 2253.670610] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: dlm_recover 1 generation 1 done: 4 ms [ 2253.671041] kernel: dlm: D9AC6C30527E4F8799E9BCDAC64F2F47: join complete [ 2255.687006] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: joining the lockspace group... [ 2255.689981] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: group event done 0 [ 2255.689993] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 [ 2255.690435] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: add member 1 [ 2255.690688] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_members 1 nodes [ 2255.690897] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: generation 1 slots 1 1:1 [ 2255.691128] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory [ 2255.691354] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 in 0 new [ 2255.691561] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 out 0 messages [ 2255.691847] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 generation 1 done: 0 ms [ 2255.692446] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: join complete [ 2255.695546] kernel: JBD2: Ignoring recovery information on journal [ 2255.700152] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 2256.230778] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 2255.851082] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: leaving the lockspace group... [ 2255.853187] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: group event done 0 [ 2255.855128] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: release_lockspace final free [ 2256.260312] ocfs2_hb_ctl[3265]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 0DCC4C24451D49CF918C2994FD09B36B [ 2255.871911] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 2255.885376] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: joining the lockspace group... [ 2255.898789] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 [ 2255.898801] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: group event done 0 [ 2255.899523] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: add member 1 [ 2255.899899] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_members 1 nodes [ 2255.900227] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: generation 1 slots 1 1:1 [ 2255.900544] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory [ 2255.900875] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 in 0 new [ 2255.901153] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 out 0 messages [ 2255.901516] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 generation 1 done: 0 ms [ 2255.901944] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: join complete [ 2255.908503] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 2256.139340] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 2256.151624] kernel: (xfs_io,3288,1):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 2256.152027] kernel: (xfs_io,3288,1):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 2256.152422] kernel: (xfs_io,3288,1):ocfs2_statfs:1652 ERROR: status = -5 [ 2256.152778] kernel: (xfs_io,3288,1):ocfs2_statfs:1684 ERROR: status = -5 [ 2256.154220] kernel: (xfs_io,3288,1):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 2256.154673] kernel: (xfs_io,3288,1):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 2256.154995] kernel: (xfs_io,3288,1):ocfs2_statfs:1652 ERROR: status = -5 [ 2256.155272] kernel: (xfs_io,3288,1):ocfs2_statfs:1684 ERROR: status = -5 [ 2256.157120] kernel: (xfs_io,3288,1):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 2256.157425] kernel: (xfs_io,3288,1):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 2256.157713] kernel: (xfs_io,3288,1):ocfs2_statfs:1652 ERROR: status = -5 [ 2256.157994] kernel: (xfs_io,3288,1):ocfs2_statfs:1684 ERROR: status = -5 [ 2256.160671] kernel: (xfs_io,3288,3):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 2256.160956] kernel: (xfs_io,3288,3):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 2256.161205] kernel: (xfs_io,3288,3):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 2256.161445] kernel: (xfs_io,3288,3):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 2256.161680] kernel: (xfs_io,3288,3):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 2256.161918] kernel: (xfs_io,3288,3):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 2256.570033] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 2256.166077] kernel: (umount,3292,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 2256.166494] kernel: (umount,3292,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 2256.166745] kernel: (umount,3292,3):ocfs2_statfs:1652 ERROR: status = -5 [ 2256.166965] kernel: (umount,3292,3):ocfs2_statfs:1684 ERROR: status = -5 [ 2256.174011] kernel: (umount,3292,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 2256.174249] kernel: (umount,3292,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 2256.174511] kernel: (umount,3292,3):ocfs2_shutdown_local_alloc:416 ERROR: status = -5 [ 2256.175558] kernel: Buffer I/O error on dev dm-0, logical block 70163, lost sync page write [ 2256.176960] kernel: (umount,3292,3):ocfs2_write_block:78 ERROR: status = -5 [ 2256.177256] kernel: (umount,3292,3):ocfs2_update_disk_slot:199 ERROR: status = -5 [ 2256.177498] kernel: (umount,3292,3):ocfs2_put_slot:517 ERROR: status = -5 [ 2256.178604] kernel: Buffer I/O error on dev dm-0, logical block 24, lost sync page write [ 2256.178933] kernel: (umount,3292,2):ocfs2_write_block:78 ERROR: status = -5 [ 2256.179215] kernel: (umount,3292,2):ocfs2_journal_toggle_dirty:984 ERROR: status = -5 [ 2256.179449] kernel: (umount,3292,2):ocfs2_journal_shutdown:1052 ERROR: status = -5 [ 2256.179881] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: leaving the lockspace group... [ 2256.181581] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: group event done 0 [ 2256.182134] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: release_lockspace final free [ 2256.583796] ocfs2_hb_ctl[3293]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 0DCC4C24451D49CF918C2994FD09B36B [ 2256.194870] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 2256.202861] kernel: dm-0: detected capacity change from 20971520 to 0 [ 2256.241314] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: joining the lockspace group... [ 2256.244424] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 [ 2256.244431] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: group event done 0 [ 2256.245010] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: add member 1 [ 2256.245186] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_members 1 nodes [ 2256.245360] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: generation 1 slots 1 1:1 [ 2256.245527] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory [ 2256.245690] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 in 0 new [ 2256.245848] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover_directory 0 out 0 messages [ 2256.246015] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: dlm_recover 1 generation 1 done: 0 ms [ 2256.246295] kernel: dlm: 0DCC4C24451D49CF918C2994FD09B36B: join complete [ 2257.367729] kernel: ocfs2: Unable to create the lockspace 0DCC4C24451D49CF918C2994FD09B36B (-17), because a ocfs2-tools program is running on this file system with the same name lockspace [ 2257.368058] kernel: (mount.ocfs2,3306,0):ocfs2_dlm_init:3355 ERROR: status = -17 [ 2257.368264] kernel: (mount.ocfs2,3306,2):ocfs2_mount_volume:1808 ERROR: status = -17 [ 2257.368596] kernel: (mount.ocfs2,3306,2):ocfs2_fill_super:1192 ERROR: status = -17 [ 2257.800975] systemd[1]: fstests-generic-266.scope: Deactivated successfully. [ 2257.823311] systemd[1]: fstest-test.mount: Deactivated successfully. [ 2257.424691] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 2257.426048] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 2257.829022] ocfs2_hb_ctl[3323]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 2257.427000] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 2257.434399] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 2337.361206] CRON[3392]: (root) CMD (run-parts /etc/cron.hourly) [ 2337.367344] CRON[3391]: (root) CMDEND (run-parts /etc/cron.hourly) [ 2365.960233] systemd[1]: Started Timeline of Snapper Snapshots. [ 2365.967411] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.12' (uid=0 pid=3407 comm="/usr/lib/snapper/systemd-helper --timeline") [ 2365.969446] systemd[1]: Starting DBus interface for snapper... [ 2365.973698] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 2365.973755] systemd[1]: Started DBus interface for snapper. [ 2365.974893] systemd[1]: snapper-timeline.service: Deactivated successfully. [ 2426.037566] systemd[1]: snapperd.service: Deactivated successfully. ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 200 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.
What if there is no 'sync' in this case?
Quoted 6 lines
Quoted 3 lines
If the expected behavior is to let umount ends even journal is abort, it seems we have to make journal shutdown happy in this case.
This is my [patch 2/2] job, which resolves fstest generaic NO. 347 361 628 629.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 205 lines · Joseph Qi
Quoted 202 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
Quoted 8 lines
Quoted 6 lines
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.What if there is no 'sync' in this case?
It is same with issuing 'sync' case. Please differ:
'after [ 600.079285] in above log' vs. 'after [ 207.623776] in below log'
(The output of 'journalctl -f' when comment out 'sync' in NO. 266)
``` [ 204.125234] root[2136]: run xfstest generic/266 [ 203.943897] unknown: run fstests generic/266 at 2023-05-01 12:40:37 [ 204.179159] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 205.000897] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: joining the lockspace group... [ 205.006914] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover 1 [ 205.006919] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: group event done 0 [ 205.007771] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: add member 1 [ 205.008251] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_members 1 nodes [ 205.008641] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: generation 1 slots 1 1:1 [ 205.009043] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory [ 205.009305] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory 0 in 0 new [ 205.009640] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory 0 out 0 messages [ 205.010061] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover 1 generation 1 done: 0 ms [ 205.010399] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: join complete [ 205.016329] kernel: JBD2: Ignoring recovery information on journal [ 205.020398] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 205.213841] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 205.218581] ocfs2_hb_ctl[2342]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F8E488BAE771460B89ABD355D42B0264 [ 205.033443] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: leaving the lockspace group... [ 205.034046] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: group event done 0 [ 205.034296] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: release_lockspace final free [ 205.040937] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 205.066896] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: joining the lockspace group... [ 205.077350] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover 1 [ 205.077419] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: group event done 0 [ 205.078070] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: add member 1 [ 205.078298] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_members 1 nodes [ 205.078579] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: generation 1 slots 1 1:1 [ 205.078823] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory [ 205.079081] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory 0 in 0 new [ 205.079276] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover_directory 0 out 0 messages [ 205.079493] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: dlm_recover 1 generation 1 done: 0 ms [ 205.079728] kernel: dlm: F8E488BAE771460B89ABD355D42B0264: join complete [ 207.150959] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: joining the lockspace group... [ 207.154653] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: group event done 0 [ 207.154724] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover 1 [ 207.155282] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: add member 1 [ 207.155587] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_members 1 nodes [ 207.155935] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: generation 1 slots 1 1:1 [ 207.156220] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory [ 207.156584] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory 0 in 0 new [ 207.156860] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory 0 out 0 messages [ 207.157130] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover 1 generation 1 done: 0 ms [ 207.157453] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: join complete [ 207.161303] kernel: JBD2: Ignoring recovery information on journal [ 207.165650] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 207.492458] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 207.334595] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: leaving the lockspace group... [ 207.338685] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: group event done 0 [ 207.342262] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: release_lockspace final free [ 207.530465] ocfs2_hb_ctl[2410]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 0304961B816D4F5CA1E793BD4655E027 [ 207.365106] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 207.394907] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: joining the lockspace group... [ 207.408281] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover 1 [ 207.408344] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: group event done 0 [ 207.409397] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: add member 1 [ 207.409826] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_members 1 nodes [ 207.410239] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: generation 1 slots 1 1:1 [ 207.410699] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory [ 207.411147] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory 0 in 0 new [ 207.411579] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover_directory 0 out 0 messages [ 207.412579] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: dlm_recover 1 generation 1 done: 4 ms [ 207.413093] kernel: dlm: 0304961B816D4F5CA1E793BD4655E027: join complete [ 207.420774] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 207.623776] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 207.627307] kernel: (xfs_io,2432,2):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 207.627487] kernel: (xfs_io,2432,2):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 207.627635] kernel: (xfs_io,2432,2):ocfs2_statfs:1654 ERROR: status = -5 [ 207.627771] kernel: (xfs_io,2432,2):ocfs2_statfs:1686 ERROR: status = -5 [ 207.628009] kernel: (xfs_io,2432,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 207.628275] kernel: (xfs_io,2432,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 207.628521] kernel: (xfs_io,2432,0):ocfs2_statfs:1654 ERROR: status = -5 [ 207.628786] kernel: (xfs_io,2432,0):ocfs2_statfs:1686 ERROR: status = -5 [ 207.629079] kernel: (xfs_io,2432,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 207.629356] kernel: (xfs_io,2432,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 207.629628] kernel: (xfs_io,2432,0):ocfs2_statfs:1654 ERROR: status = -5 [ 207.629868] kernel: (xfs_io,2432,0):ocfs2_statfs:1686 ERROR: status = -5 [ 207.632449] kernel: (xfs_io,2432,0):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 207.632807] kernel: (xfs_io,2432,0):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 207.633186] kernel: (xfs_io,2432,0):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 207.633467] kernel: (xfs_io,2432,0):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 207.633736] kernel: (xfs_io,2432,0):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 207.634022] kernel: (xfs_io,2432,0):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 207.634437] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 207.634636] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 207.634788] kernel: Aborting journal on device dm-0-24. [ 207.634942] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 207.635097] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 207.635339] kernel: (xfs_io,2432,0):ocfs2_sync_file:201 ERROR: status = -5 [ 207.638738] kernel: (umount,2436,2):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 207.638939] kernel: (umount,2436,2):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 207.639112] kernel: (umount,2436,2):ocfs2_statfs:1654 ERROR: status = -5 [ 207.639281] kernel: (umount,2436,2):ocfs2_statfs:1686 ERROR: status = -5 [ 207.823818] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 207.642501] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 207.642689] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 208.648030] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 209.672049] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 210.696057] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 211.720064] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 212.744068] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 213.768081] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 214.792079] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 215.816079] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 216.840090] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 217.863993] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 218.888057] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 219.912099] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 220.936106] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 221.960112] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 222.984116] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 222.984857] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 224.008130] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 225.032123] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 [ 226.056075] kernel: (ocfs2cmt-030496,2419,0):ocfs2_commit_cache:321 ERROR: status = -5 ^C ```
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 213 lines · Heming Zhao
Quoted 212 lines · Joseph Qi
Quoted 208 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.
Quoted 5 lines
Quoted 1 line
What if there is no 'sync' in this case?
It is same with issuing 'sync' case. Please differ:
'after [ 600.079285] in above log' vs. 'after [ 207.623776] in below log' I mean your solution is to resetj_num_transin sync fs, but in case of
no 'sync', how do you resolve it?
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 216 lines · Joseph Qi
Quoted 213 lines · Heming Zhao
Quoted 212 lines · Joseph Qi
Quoted 208 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.
Quoted 6 lines
Quoted 5 lines
Quoted 1 line
What if there is no 'sync' in this case?
It is same with issuing 'sync' case. Please differ:
'after [ 600.079285] in above log' vs. 'after [ 207.623776] in below log' I mean your solution is to resetj_num_transin sync fs, but in case ofno 'sync', how do you resolve it?
If I understand your question correctly, your meaning is to remove No. 266 'sync' line, then how to handle this case.
My answer is this is my patch [2/2] job. I have tested it already.
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 219 lines · Heming Zhao
Quoted 218 lines · Joseph Qi
Quoted 215 lines · Heming Zhao
Quoted 213 lines · Joseph Qi
Quoted 200 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 1 line
Quoted 8 lines
Quoted 2 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.What if there is no 'sync' in this case?
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
It is same with issuing 'sync' case. Please differ:
'after [ 600.079285] in above log' vs. 'after [ 207.623776] in below log'I mean your solution is to reset
j_num_transin sync fs, but in case of no 'sync', how do you resolve it?If I understand your question correctly, your meaning is to remove No. 266 'sync' line, then how to handle this case.
My answer is this is my patch [2/2] job. I have tested it already.
IMO, they are the same issue.
And it looks weird to fix it in sync fs.
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 227 lines · Joseph Qi
Quoted 224 lines · Heming Zhao
Quoted 222 lines · Joseph Qi
Quoted 213 lines · Heming Zhao
Quoted 212 lines · Joseph Qi
Quoted 208 lines · Heming Zhao
Quoted 193 lines · Joseph Qi
Quoted 181 lines · Heming Zhao
Quoted 3 lines · Joseph Qi
Hi,
What's the journal status in this case?
jbd2 is marked with
JBD2_ABORTQuoted 2 lines
I wonder why commit thread is not working, which should flush journal and reset
j_num_transduring commit cache.The reason is in my above answer.
below is the dmesg log for No. 266.
``` [ 595.071807] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 595.080950] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 595.081091] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 595.081580] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 595.081886] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 595.082173] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 595.082420] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 595.082696] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 595.082932] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 595.083188] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 595.084721] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 595.095436] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 595.787078] systemd[1]: Started /usr/bin/bash -c exit 77. [ 595.802650] systemd[1]: fstests-check.scope: Deactivated successfully. [ 596.195734] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: joining the lockspace group... [ 596.206310] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.206350] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 [ 596.209667] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: add member 1 [ 596.211433] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_members 1 nodes [ 596.213942] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: generation 1 slots 1 1:1 [ 596.215668] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory [ 596.217171] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 in 0 new [ 596.218253] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover_directory 0 out 0 messages [ 596.219401] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: dlm_recover 1 generation 1 done: 0 ms [ 596.220628] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: join complete [ 596.224616] kernel: JBD2: Ignoring recovery information on journal [ 596.229686] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 596.870008] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 596.236135] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: leaving the lockspace group... [ 596.237431] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: group event done 0 [ 596.239442] kernel: dlm: 78CE18109AE44E6AA896722A5E25CFC0: release_lockspace final free [ 596.877286] ocfs2_hb_ctl[5436]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 78CE18109AE44E6AA896722A5E25CFC0 [ 596.248299] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 596.255888] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: leaving the lockspace group... [ 596.905718] systemd[1]: fstest-test.mount: Deactivated successfully. [ 596.280602] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.281762] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: release_lockspace final free [ 596.921672] ocfs2_hb_ctl[5448]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u 838DD74847E34AA1839D6C4AA31132F1 [ 596.299507] kernel: ocfs2: Unmounting device (253,16) on (node 1) [ 596.481755] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: joining the lockspace group... [ 596.484722] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 [ 596.484729] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: group event done 0 [ 596.485361] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: add member 1 [ 596.485622] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_members 1 nodes [ 596.485861] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: generation 1 slots 1 1:1 [ 596.486063] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory [ 596.486293] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 in 0 new [ 596.486498] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover_directory 0 out 0 messages [ 596.486768] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: dlm_recover 1 generation 1 done: 0 ms [ 596.487037] kernel: dlm: 838DD74847E34AA1839D6C4AA31132F1: join complete [ 596.491655] kernel: ocfs2: Mounting device (253,16) on (node 1, slot 0) with ordered data mode. [ 597.139758] root[5475]: run xfstest generic/266 [ 596.505896] unknown: run fstests generic/266 at 2023-05-01 10:19:02 [ 597.186885] systemd[1]: Started /usr/bin/bash -c test -w /proc/self/oom_score_adj && echo 250 > /proc/self/oom_score_adj; exec ./tests/generic/266. [ 597.566466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.579759] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.579766] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.581004] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.581820] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.582292] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.582894] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.583423] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.583991] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.584547] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 4 ms [ 597.585079] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 597.590136] kernel: JBD2: Ignoring recovery information on journal [ 597.594258] kernel: ocfs2: Mounting device (253,32) on (node 1, slot 0) with ordered data mode. [ 598.239046] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 597.606575] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: leaving the lockspace group... [ 597.607446] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 598.244507] ocfs2_hb_ctl[5680]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u AB0245F740984C25A9D0907D61DFCF8A [ 597.607843] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: release_lockspace final free [ 597.615474] kernel: ocfs2: Unmounting device (253,32) on (node 1) [ 597.641624] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: joining the lockspace group... [ 597.659435] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 [ 597.659479] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: group event done 0 [ 597.661482] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: add member 1 [ 597.662340] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_members 1 nodes [ 597.663211] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: generation 1 slots 1 1:1 [ 597.664150] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory [ 597.665466] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 in 0 new [ 597.666370] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover_directory 0 out 0 messages [ 597.667235] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: dlm_recover 1 generation 1 done: 0 ms [ 597.668428] kernel: dlm: AB0245F740984C25A9D0907D61DFCF8A: join complete [ 600.194974] systemd[1]: Started Daily Cleanup of Snapper Snapshots. [ 600.207227] dbus-daemon[672]: [system] Activating via systemd: service name='org.opensuse.Snapper' unit='snapperd.service' requested by ':1.10' (uid=0 pid=5728 comm="/usr/lib/snapper/systemd-helper --cleanup") [ 600.209151] systemd[1]: Starting DBus interface for snapper... [ 600.217270] dbus-daemon[672]: [system] Successfully activated service 'org.opensuse.Snapper' [ 600.217370] systemd[1]: Started DBus interface for snapper. [ 600.218969] systemd[1]: snapper-cleanup.service: Deactivated successfully. [ 599.608010] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.611041] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.611127] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.611813] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.612019] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.612227] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.612397] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.612559] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.612712] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.612880] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 0 ms [ 599.613078] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.615320] kernel: JBD2: Ignoring recovery information on journal [ 599.619221] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.392044] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 599.780111] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: leaving the lockspace group... [ 599.781949] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.784235] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: release_lockspace final free [ 600.426136] ocfs2_hb_ctl[5762]: ocfs2_hb_ctl /sbin/ocfs2_hb_ctl -K -u F06626AE7D754F11A0211679C145C8BF [ 599.808566] kernel: ocfs2: Unmounting device (254,0) on (node 1) [ 599.827803] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: joining the lockspace group... [ 599.832848] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 [ 599.832984] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: group event done 0 [ 599.833810] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: add member 1 [ 599.834272] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_members 1 nodes [ 599.834663] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: generation 1 slots 1 1:1 [ 599.835030] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory [ 599.835474] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 in 0 new [ 599.835868] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover_directory 0 out 0 messages [ 599.836365] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: dlm_recover 1 generation 1 done: 4 ms [ 599.836829] kernel: dlm: F06626AE7D754F11A0211679C145C8BF: join complete [ 599.845790] kernel: ocfs2: Mounting device (254,0) on (node 1, slot 0) with ordered data mode. [ 600.079285] kernel: Buffer I/O error on dev dm-0, logical block 2621424, async page read [ 600.090845] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.091387] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.091924] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.092422] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.094252] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.095029] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.095891] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.096698] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.099071] kernel: (xfs_io,5785,0):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.099957] kernel: (xfs_io,5785,0):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.100798] kernel: (xfs_io,5785,0):ocfs2_statfs:1654 ERROR: status = -5 [ 600.101623] kernel: (xfs_io,5785,0):ocfs2_statfs:1686 ERROR: status = -5 [ 600.107094] kernel: (xfs_io,5785,1):ocfs2_get_refcount_tree:358 ERROR: status = -5 [ 600.107659] kernel: (xfs_io,5785,1):ocfs2_lock_refcount_tree:456 ERROR: status = -5 [ 600.108175] kernel: (xfs_io,5785,1):ocfs2_refcount_cow_hunk:3417 ERROR: status = -5 [ 600.108654] kernel: (xfs_io,5785,1):ocfs2_refcount_cow:3478 ERROR: status = -5 [ 600.109128] kernel: (xfs_io,5785,1):ocfs2_prepare_inode_for_write:2326 ERROR: status = -5 [ 600.109613] kernel: (xfs_io,5785,1):ocfs2_file_write_iter:2433 ERROR: status = -5 [ 600.118113] kernel: (umount,5789,3):ocfs2_inode_lock_update:2354 ERROR: status = -5 [ 600.118481] kernel: (umount,5789,3):ocfs2_inode_lock_full_nested:2502 ERROR: status = -5 [ 600.118898] kernel: (umount,5789,3):ocfs2_statfs:1654 ERROR: status = -5 [ 600.119364] kernel: (umount,5789,3):ocfs2_statfs:1686 ERROR: status = -5 [ 600.759255] systemd[1]: fstest-scratch.mount: Deactivated successfully. [ 600.127135] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.127373] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.127615] kernel: Aborting journal on device dm-0-24. [ 600.127893] kernel: Buffer I/O error on dev dm-0, logical block 529, lost sync page write [ 600.128137] kernel: JBD2: I/O error when updating journal superblock for dm-0-24. [ 600.128362] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 600.128591] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted. [ 601.147704] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 602.171745] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 603.195707] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 604.219709] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 605.243712] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 606.267748] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 607.291715] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 608.315742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 609.339724] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 610.363774] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 611.387693] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 612.411727] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 613.435719] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 614.459743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.483742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 615.484503] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_thread:2346 ERROR: status = -5, journal is already aborted.Quoted 8 lines
[ 616.507742] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 617.531751] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 618.555743] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 619.579702] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 [ 620.603758] kernel: (ocfs2cmt-F06626,5771,2):ocfs2_commit_cache:321 ERROR: status = -5 ^C tb-fstest1:/usr/src/linux/fs/ocfs2 # ```Quoted 3 lines
So the case is, flush journal in commit thread will never end if journal is abort, and then lead to umount hang since commit thread won't stop, right?
Yes.
Quoted 3 lines
If so, I don't think your changes in sync fs is a right solution. It seems it just for bypassing the testcase.
No.
In my view, No. 266 shouldn't trigger jbd2 ABORT status. The 'sync' should tidy up all already issued write IOs. After sync & load dm-error, new write IOs fails on rw IOs, which shouldn't generate any journal IOs and shouldn't trigger jbd2 to enter ABORT status.Quoted 4 lines
Quoted 1 line
What if there is no 'sync' in this case?
It is same with issuing 'sync' case. Please differ:
'after [ 600.079285] in above log' vs. 'after [ 207.623776] in below log'I mean your solution is to reset
j_num_transin sync fs, but in case of no 'sync', how do you resolve it?
Quoted 6 lines
Quoted 4 lines
If I understand your question correctly, your meaning is to remove No. 266 'sync' line, then how to handle this case.
My answer is this is my patch [2/2] job. I have tested it already.IMO, they are the same issue.
And it looks weird to fix it in sync fs.
I keep my viewpoint there are two issues and need two patches. sync action should tidy up all write IOs (including journal transactions). From the dmesg, it's obviously ocfs2 forgets to reset internal jbd2 counter (j_num_trans).
But patch [2/2] (from another side) could fix No. 266 umount failed issue. If you don't like patch [1/2], let's focus to review patch [2/2].
- Heming
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel
Quoted 5 lines · Joseph Qi
Hi,
What's the journal status in this case?
I wonder why commit thread is not working, which should flush journal and resetj_num_transduring commit cache.
This rootcasue of NO. 266 is that ocfs2_sync_fs bypasses commit thread and directly calls jbd2 APIs to commit journal. This code design makes 'sync' doesn't reset ->j_num_trans. So my patch add the kick commit thread action in sync path.
Thanks,
Heming
Quoted 65 lines · Heming Zhao
Quoted 62 lines
fstest generic cases 266 272 281 trigger hanging issue when umount.
I use 266 to describe the root cause.
``` 49 _dmerror_unmount 50 _dmerror_mount 51 52 echo "Compare files" 53 md5sum $testdir/file1 | _filter_scratch 54 md5sum $testdir/file2 | _filter_scratch 55 56 echo "CoW and unmount" 57 sync 58 _dmerror_load_error_table 59 urk=$($XFS_IO_PROG -f -c "pwrite -S 0x63 -b $bufsize 0 $filesize" \ 60 -c "fdatasync" $testdir/file2 2>&1) 61 echo $urk >> $seqres.full 62 echo "$urk" | grep -q "error" || _fail "pwrite did not fail" 63 64 echo "Clean up the mess" 65 _dmerror_unmount ```After line 49 50 umount & mount ocfs2 dev, this case run md5sum to verify target file. Line 57 run 'sync' before line 58 changes the dm target from dm-linear to dm-error. This case is hanging at line 65.
The md5sum calls jbd2 trans pair: ocfs2_[start|commit]_trans to do journal job. But there is only ->j_num_trans+1 in
ocfs2_start_trans, theocfs2_commit_transdoesn't do reduction operation, 'sync' neither. finally no function reset ->j_num_trans until umount is triggered.call flow:
``` [md5sum] //line 53 54 vfs_read ocfs2_file_read_iter ocfs2_inode_lock_atime ocfs2_update_inode_atime + ocfs2_start_trans //atomic_inc j_num_trans + ... + ocfs2_commit_trans//no modify j_num_trans sync //line 57. no modify j_num_trans _dmerror_load_error_table //all write will return error after this line _dmerror_unmount //found j_num_trans is not zero, run commit thread //but the underlying dev is dm-error, journaling IO //failed all the time and keep going to retry. ```*** How to fix ***
kick commit thread in sync path, which can reset
j_num_transto 0.Signed-off-by Heming Zhao <[email protected]>--- fs/ocfs2/super.c | 3 +++ 1 file changed, 3 insertions(+)
Quoted 14 lines
Quoted 5 lines
fs/ocfs2/super.c +0
-0fs/ocfs2/super.c static int ocfs2_sync_fs(struct super_block *sb, int wait) · line 420
Quoted 9 lines
fs/ocfs2/super.c +3
-0@@ -412,6 +412,9 @@ static int ocfs2_sync_fs(struct super_block *sb, int wait)jbd2_log_wait_commit (osb->journal->j_journal, target); } +/* kick commit thread to reset journal->j_num_trans */ +if (atomic_read (&(osb->journal->j_num_trans))) +wake_up (&osb->checkpoint_event);return 0 ; }
_______________________________________________
Ocfs2-devel mailing list
[email protected]
https://oss.oracle.com/mailman/listinfo/ocfs2-devel