Bug 83384 - failure of non-essential IDE partitions can panic the system
Summary: failure of non-essential IDE partitions can panic the system
Status: Closed Overcome By Events
Alias: None
Product: Base System
Classification: Unclassified
Component: kern (show other bugs)
Version: 5.3-RELEASE
Hardware: Any Any
: Normal Affects Only Me
Assignee: freebsd-bugs (Nobody)
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-07-13 15:30 UTC by Jim Salter
Modified: 2017-06-27 04:24 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 Jim Salter 2005-07-13 15:30:12 UTC
ATA or SATA IDE hard drives with bad sectors in a UFS2 partition can panic the system when the bad sectors are written to, even if the partition (or entire physical drive) in question does not contain programs or data vital to the actual functioning of the system.  I have observed this problem on the machine shown in the uname output above as well as on a 5.2.1-RELEASE amd64 machine, with multiple 200GB PATA and 160GB SATA drives that turned out to be slightly damaged.  The failure is independent of drive controller or cable.

ad6: FAILURE - WRITE_DMA status: 51 <READY, DSC, ERROR> error: 10 <NID_NOT_FOUND> LBA=268435435

The above message repeats a large number of times, followed eventually with:

panic: softdep_deallocate_dependencies: dangling_deps

Fix: 

The only fix I know of is to deliberately write a small file over the bad sectors, bring the system up after the panic, and then rename the file "BAD_SECTORS_HERE" and avoid it like leprosy.  Or, of course, replace the drive.
How-To-Repeat: Find an ATA or SATA hard drive with bad sectors on it that will give NID_NOT_FOUND errors if the bad sectors are written to.  Install it in a FreeBSD 5.x machine.  Attempt to write a file to the bad sectors.

NOTE: using dd to overwrite the bad sectors does not produce a system panic.  Only attempting to write a file to the filesystem on the bad sectors produces the panic.