โฌข DragonFlyBSD Kernel Audit
DF-5071 / run.log
โ† back to finding โ†“ download raw
== kldload ==
== sanity: read while ONLINE completes normally ==
wedge: pread@2097152 r=512 errno=0(ok)
== fresh open works while online ==
freshopen: open(/dev/df50710) fd=3 errno=0(ok) โ€” amrd_open refuses once SHUTDOWN is set
== wedgehold: open fd BEFORE shutdown, then pread after it ==
== amr_pci_shutdown/amr_rescan_drives: SHUTDOWN set, queue NOT drained ==
shutdown: ioctl ok
== freshopen WITH holder open: succeeds -- diskopen() skips the driver d_open (subr_disk.c:1094) ==
freshopen: open(/dev/df50710) fd=3 errno=0(ok) โ€” amrd_open refuses once SHUTDOWN is set
== wait for the held fd to pread (parks forever: strategy has no gate) ==
   PID STAT   WCHAN    COMMAND
  2237 D0     physstr  /tmp/poc/df5071_trigger wedgehold /dev/df50710 8
== kill -9 the wedged process ==
-- after SIGKILL, still present? --
   PID STAT   WCHAN    COMMAND
  2237 D0     physstr  /tmp/poc/df5071_trigger wedgehold /dev/df50710 8
== recovery poke: drain the parked bios with EIO (driver never does) ==
poke: ioctl ok
-- wedge process now --
   PID STAT   WCHAN    COMMAND
gone
wedgehold: fd=3 open BEFORE shutdown; sleeping 8s then pread@2M
== amr_startup: back online, reads complete again ==
online: ioctl ok
wedge: pread@2097152 r=512 errno=0(ok)
== shutdown again with NO holder: now amrd_open's lone gate fires ==
shutdown: ioctl ok
freshopen: open(/dev/df50710) fd=-1 errno=6(Device not configured) โ€” amrd_open refuses once SHUTDOWN is set
online: ioctl ok
== kernel log ==
df5071f: (fixed) draining 6 parked bio(s) with ENXIO
df5071f: unload -- draining 6 parked bio(s)
df5071: raw disk "df50710" + ctl up (ONLINE) M-bM^@M^T ctl ioctls 71/72/73 = shutdown/poke/online; open() carries the verbatim amrd_open ENXIO gate
df5071: amr_pci_shutdown/amr_rescan_drives: AMR_STATE_SHUTDOWN set; amr_bioq NOT drained (0 bio(s) already parked); amrd_strategy has NO shutdown gate
df5071: poke -- draining 1 parked bio(s) with EIO (what the shutdown path should have done)
df5071: amr_startup: back online, restarting io
df5071: amr_pci_shutdown/amr_rescan_drives: AMR_STATE_SHUTDOWN set; amr_bioq NOT drained (0 bio(s) already parked); amrd_strategy has NO shutdown gate
df5071: amr_startup: back online, restarting io
== unload (clean) ==
DONE-ALL