system crash during file copy to a floppy with bad sectors

Robert Watson rwatson at
Sat May 6 16:29:58 UTC 2006

On Sat, 6 May 2006, Kris Kennaway wrote:

>>> On Saturday 06 May 2006 09:33, Rostislav Krasny wrote:
>>>>> Can you get a back trace? ie enable crash dumps and do it again, or
>>>>> transcribe, or photograph the screen as it panics if you are local.
>>>> Unfortunately I cannot reproduce it now. Doesn't the old log help?
>>>> There is one "Fatal trap 12".
>>> Only if you have the backtrace I think.
>> In attempt to "emulate" bad sectors I got another crash, that looks similar 
>> (but not exactly same) to the original two crashes. I just pulled out the 
>> diskette before file copy is finished. I know, that must never be done, but 
>> sometimes people are in a great hurry or just do mistakes. IMHO that isn't 
>> a good reason for a system crash.
> It's a known and hard-to-fix problem, though.

BTW, this is generally a question of resilience of individual file systems to 
on-disk corruption and failures.  UFS is quite tricky to make robust against 
disk destruction, since it relies on strong consistenty guarantees for 
performance reasons.  FAT, on the other hand, is a file system we should be 
able to make more robust quite a bit more easily.  I think there would really 
be two phases to such a project:

(1) Make FAT (msdosfs) MPSAFE, perform general cleanup.

(2) Improve robustiness in the face of media failure.

The reason FAT is particularly interesting, of course, is its widespread use 
on removable media such as USB sticks.

Robert N M Watson

More information about the freebsd-stable mailing list