Summary: | panic: vm_page_assert_unbusied: busy_lock owned by me | ||
---|---|---|---|
Product: | Base System | Reporter: | John F. Carr <jfc> |
Component: | kern | Assignee: | Mark Johnston <markj> |
Status: | Closed FIXED | ||
Severity: | Affects Only Me | CC: | kib, markj |
Priority: | --- | Keywords: | crash |
Version: | 15.0-CURRENT | ||
Hardware: | Any | ||
OS: | Any |
Description
John F. Carr
2024-03-06 20:17:46 UTC
If an error occured during page-in, swap pager leaves the page invalid and busy. This is reasonable approach. If something is paged out, and we cannot page it in, system is going to be unhappy. I am not sure it would help add more code that is almost never executed and very hard to test, to try to slightly soften the consequences. (In reply to Konstantin Belousov from comment #1) I think there is still a bug in that swap_pager_iodone() does not unbusy readahead/behind pages in the error case. A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=4696650782e2e5cf7ae5823f1de04550c05b5b75 commit 4696650782e2e5cf7ae5823f1de04550c05b5b75 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-04-08 13:02:48 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-04-08 13:02:48 +0000 swap_pager: Unbusy readahead pages after an I/O error The swap pager itself allocates readahead pages, so should take care to unbusy them after a read error, just as it does in the non-error case. PR: 277538 Reviewed by: olce, dougm, alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44646 sys/vm/swap_pager.c | 3 +++ 1 file changed, 3 insertions(+) I believe that this commit will prevent that particular panic, but indeed, we're not going to recover well from a swap device being removed. A commit in branch stable/14 references this bug: URL: https://cgit.FreeBSD.org/src/commit/?id=5128c8948b4e56d20dfd623aeb030fb39c8f95b0 commit 5128c8948b4e56d20dfd623aeb030fb39c8f95b0 Author: Mark Johnston <markj@FreeBSD.org> AuthorDate: 2024-04-08 13:02:48 +0000 Commit: Mark Johnston <markj@FreeBSD.org> CommitDate: 2024-04-15 14:05:13 +0000 swap_pager: Unbusy readahead pages after an I/O error The swap pager itself allocates readahead pages, so should take care to unbusy them after a read error, just as it does in the non-error case. PR: 277538 Reviewed by: olce, dougm, alc, kib MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D44646 (cherry picked from commit 4696650782e2e5cf7ae5823f1de04550c05b5b75) sys/vm/swap_pager.c | 3 +++ 1 file changed, 3 insertions(+) Closing this since the bug causing the panic is fixed, at least. |