Bug 84556 - [geom] [panic] GBDE-encrypted swap causes panic at shutdown
Summary: [geom] [panic] GBDE-encrypted swap causes panic at shutdown
Status: Open
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 6.0-CURRENT
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-geom (Nobody)
URL:
Keywords: crash
Depends on:
Blocks:
 
Reported: 2005-08-04 18:30 UTC by Paul Mather
Modified: 2022-10-17 12:17 UTC (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Paul Mather 2005-08-04 18:30:23 UTC
A kernel panic at shutdown is possible if a GBDE-encrypted swap
partition is in use (i.e., swapinfo shows pages used under the "Used"
column).  I don't know if a minimum percentage of swap needs to be in
use to provoke the panic.  I have /tmp mounted as a md-backed
filesystem on GBDE-encrypted swap, so usually I have at least a couple
of tens of megabytes of swap used by the time I shutdown.  In my case,
I always get a panic (unless no swapping has occurred).

Here is the panic I got when I last did a shutdown on my system:

[[...]]
All buffers synced.
unmount of /dev failed (BUSY)
Uptime: 8d5h26m53s
GEOM_MIRROR: Device raid1: provider mirror/raid1 destroyed.
GEOM_MIRROR: Device raid1 destroyed.
kernel trap 12 with interrupts disabled


Fatal trap 12: page fault while in kernel mode
fault virtual address   = 0x74
fault code              = supervisor read, page not present
instruction pointer     = 0x20:0xc04eed94
stack pointer           = 0x28:0xd56c2c5c
frame pointer           = 0x28:0xd56c2c60
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, def32 1, gran 1
processor eflags        = resume, IOPL = 0
current process         = 79 (g_bde mirror/raid1b)
[thread pid 79 tid 100042 ]
Stopped at      turnstile_setowner+0xb: movl    0x74(%edx),%eax
db> where
Tracing pid 79 tid 100042 td 0xc1a2f480
turnstile_setowner(ad89d,c06601a0,0,c1bab02c,c1bab02c) at turnstile_setowner+0xb

turnstile_wait(c1bab02c,0,23,c1a2f480,d56c2cd0) at turnstile_wait+0xb9
_mtx_lock_sleep(c1bab02c,c1a2f480,0,0,0) at _mtx_lock_sleep+0x87
msleep(c1bab000,c1bab02c,4c,c0608dee,3e8,1,c0609225) at msleep+0x380
g_bde_worker(c1be4b00,d56c2d38,c1be4b00,c1be4b00,c04947a0) at g_bde_worker+0x299

fork_exit(c04947a0,c1be4b00,d56c2d38) at fork_exit+0x6b
fork_trampoline() at fork_trampoline+0x8
--- trap 0x1, eip = 0, esp = 0xd56c2d6c, ebp = 0 ---
db>



I have marked this PR as "serious" only because it prevents a remote
shutdown/reboot from succeeding.

How-To-Repeat: 
Enable GBDE-encrypted swap (e.g. add 'gbde_swap_enable="YES"' to
/etc/rc.conf) and do a lot of swapping; then execute "shutdown -r now".
Comment 1 Mark Linimon freebsd_committer freebsd_triage 2005-10-24 08:26:26 UTC
Responsible Changed
From-To: freebsd-bugs->freebsd-geom

Over to maintainer(s).
Comment 2 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:00:00 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 3 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:17:10 UTC
Keyword: 

    crash

– in lieu of summary line prefix: 

    [panic]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>