# (FreeBSD 9 BETA3) - AHCI Hot Plug & Play - Kernel Panic



## Leander (Oct 15, 2011)

Hi fellows,

I got a kernel panic when I was trying to make use of "Hot Plug & Play" with S-ATA Disks in combination with AHCI:

```
ada4: 300.00MB/s transfers (SATA 3.x, UDMA6, PIO 8192bytes)
ada4: Command Queueing enabled
ada4: 1907729MB (3907029168 512 byte sectors: 16H 63S/T 16383C
ada4: Previously was known as ad16
ada5: at siisch2 bus 0 scbus2 target 0 lun 0
ada5: 300.00MB/s transfers (SATA 2.x, UDMA6, PIO 819bytes)
ada5: Command Queueing enabled
ada5: 476940MB (976773168 512 byte sectors: 16H 63S/T 16383C)
ada5: Previously was known as ad8
/dev: got error 6 while accessing filesystem
panic: softdep_deallocate_dependencies: unrecovered I/O error
cpuid = 0
KDB: enter: panic
[ thread pid 17 tid 100058 ]
Stopped at    kdb_enter+0x3a: movl    $0,kdb_why
db>
```


----------



## mav@ (Oct 17, 2011)

It looks like problem with file system code, not AHCI. Some echo of long time USB unplugging problems.


----------



## Leander (Oct 18, 2011)

Hi mav@,

it was a S-ATA 2 HDD inside a hot plug and play slot. I still have that issue with that same drive only ... but only on 9.0-BETA3. 8.2-RELEASE works fine with it. Didn't try reformating it yet, cause I havn't got a chance yet - since it's a remote dev-host and drive is unplugged for now.

The Mass Storage Controller is a:

```
Silicon Image, Inc.
SiI 3124 PCI-X Serial ATA Controller
```


----------



## olav (Oct 20, 2011)

Did you hot swap the / disk? Is it mirrored?


----------



## jem (Oct 25, 2011)

Was there a swap partition on the removed disk?  Did you 'swapoff' first?


----------



## Leander (Oct 26, 2011)

@olav:
No it was not the root (/) disk. It was a disk from previos FreeBSD Installation - I think 8.2-RELEASE ... I just decided to make use of it again and plugged it in while System was running.

@jem
As mentioned already: The system was booted without the affected disk. I just decided to make use of the unused HDD again by plugging it into the running FreeBSD - but than CRASH right after S-ATA Cable was plugged into disk.

The disk which caused the crash was used as test disk in the previous FreeBSD installation ... for GPT, gmirror, gconcat ... and newfs ... - That's why I can't tell what last was exactly on the disk ... but kernel crash should anyway not happen because of any of that. The user should have a chance to `dd if=/dev/zero of=/dev/ada[n]` the disk 

I plugged the disk in once again to ensure - and voila - system crashed again - same error as copied in initial post.


----------

