Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 28 Dec 2017 13:09:05 +0000
From:      bugzilla-noreply@freebsd.org
To:        freebsd-bugs@FreeBSD.org
Subject:   [Bug 224479] kernel panic in reboot+swapoff sys call
Message-ID:  <bug-224479-8-yl2JmZ3jTH@https.bugs.freebsd.org/bugzilla/>
In-Reply-To: <bug-224479-8@https.bugs.freebsd.org/bugzilla/>
References:  <bug-224479-8@https.bugs.freebsd.org/bugzilla/>

next in thread | previous in thread | raw e-mail | index | archive | help

https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=224479

--- Comment #15 from Andriy Gapon <avg@FreeBSD.org> ---
(In reply to Konstantin Belousov from comment #14)
On the other hand, if the kernel knows that a vnode is used for swap and the
kernel knows that the force reclaim of that vnode will lead to a panic, then
why should the kernel allow that?

I see several possibilities, but not sure if any of them makes sense from the
FreeBSD architecture and design point of view.

1. When vgone-ing the swap vnode somehow perform an equivalent of swap off on
it.

2. Do not allow even the force unmount of a filesystem if there is a vnode used
for swap.

3. "Orphan" the swap vnode such that it is removed from its mount list, the
name cache, etc, but it is still alive and is owned by the swap pager. I feel
that this is impossible to do, however.

Also, I am not sure about any "race", but it seems that during a shutdown we
should first turn off all the file-backed swap and only then start unmounting
filesystems.  From comment #0 it seems that we do not follow this order.

-- 
You are receiving this mail because:
You are the assignee for the bug.


Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?bug-224479-8-yl2JmZ3jTH>