Bug 212115 - kldunload pf causes panic
Summary: kldunload pf causes panic
Status: Closed FIXED
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 11.0-RC1
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-pf mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-08-24 16:02 UTC by Babak Farrokhi
Modified: 2018-10-19 21:30 UTC (History)
2 users (show)

See Also:


Attachments
textdump after panic caused by "kldunload -f pf" (172.48 KB, text/plain)
2016-08-24 16:02 UTC, Babak Farrokhi
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Babak Farrokhi freebsd_committer 2016-08-24 16:02:51 UTC
Created attachment 174018 [details]
textdump after panic caused by "kldunload -f pf"

pf module refuses to unload even after disabling with pfctl:

```
# kldload pf
# kldunload pf
kldunload: can't unload file: Device busy
# pfctl -d
pfctl: pf not enabled
# kldunload pf
kldunload: can't unload file: Device busy
```

forcing to unload using -f causes panic (core.txt attached).
Comment 1 shriyogeshchandra 2016-11-25 16:28:01 UTC
Just signed up here, so apologies for any transgressions. I too experience this bug. 

In case it helps someone better equipped, here is the dump (copied from the terminal running the virtual machine): 

Fatal trap 12: page fault while in kernel mode
cpuid = 0; apic id = 00
fault virtual address   = 0x3b0
fault code              = supervisor read data, page not present
instruction pointer     = 0x20:0xffffffff80ad43cb
stack pointer           = 0x28:0xfffffe000023a3a0
frame pointer           = 0x28:0xfffffe000023a430
code segment            = base rx0, limit 0xfffff, type 0x1b
                        = DPL 0, pres 1, long 1, def32 0, gran 1
processor eflags        = interrupt enabled, resume, IOPL = 0
current process         = 2166 (kldunload)
trap number             = 12
panic: page fault
cpuid = 0
KDB: stack backtrace:
#0 0xffffffff80b24077 at kdb_backtrace+0x67
#1 0xffffffff80ad93e2 at vpanic+0x182
#2 0xffffffff80ad9253 at panic+0x43
#3 0xffffffff80fa0d51 at trap_fatal+0x351
#4 0xffffffff80fa0f43 at trap_pfault+0x1e3
#5 0xffffffff80fa04ec at trap+0x26c
#6 0xffffffff80f84141 at calltrap+0x8
#7 0xffffffff82234eb1 at vnet_pf_uninit+0xa1
#8 0xffffffff80aa5de0 at linker_file_unload+0x720
#9 0xffffffff80aa71bc at kern_kldunload+0xfc
#10 0xffffffff80fa16ae at amd64_syscall+0x4ce
#11 0xffffffff80f8442b at Xfast_syscall+0xfb
Uptime: 9h2m39s
Dumping 220 out of 991 MB:..8%..15%..22%..37%..44%..51%..66%..73%..87%..95%
Dump complete
Comment 2 Kristof Provost freebsd_committer 2018-10-19 21:30:26 UTC
Unloading pf is now supported (and more importantly doesn't panic) in 12.