Bug 13632

Summary: Floppy hangs system
Product: Base System Reporter: conradj <conradj>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Closed FIXED    
Severity: Affects Only Me    
Priority: Normal    
Version: 3.2-RELEASE   
Hardware: Any   
OS: Any   

Description conradj 1999-09-08 06:40:00 UTC
If I mount an msdos floppy read-write when the disk has write protection  
turned on it hangs the system. This sometimes happens if I access the disk
and everytime I try to copy to it. I am not aware of this being fixed in
-stable.
  
Sep  7 10:15:51 x /kernel: fd0c: hard error writing fsbn 19 (ST0
40<abnrml> ST1 
+2<write_protect> ST2 0 cyl 0 hd 1 sec 2)

Fix: 

mount -r -t msdos /dev/fd0 /mnt
How-To-Repeat: 
mount -t msdos /dev/fd0 /mnt and then attempt to write to the disk.
Comment 1 Sheldon Hearn 1999-09-08 12:30:02 UTC
On 08 Sep 1999 07:36:33 GMT, conradj@is.co.za wrote:

> If I mount an msdos floppy read-write when the disk has write protection  
> turned on it hangs the system. This sometimes happens if I access the disk
> and everytime I try to copy to it. I am not aware of this being fixed in
> -stable.

The results are different under STABLE.  Writing to a floppy mounted
read-only fails as expected, but a subsequent umount attempt panics the
box:

fd0c: hard error writing fsbn 5 of 5-12 (ST0 40<abnrml> ST1 2<write_protect> ST2 0 cyl 0 hd 0 sec 6)
[several of these messages repeated]
panic: vinvalbuf: dirty bufs

Ciao,
sheldon.
Comment 2 Sheldon Hearn 1999-09-08 13:57:57 UTC
Following up on myself, here's a back trace of the panic I mentioned.
I have the crash dump available if anyone has things they;d like me to
look at.

Ciao,
Sheldon.

#9  0xc012f710 in panic (fmt=0xc01fa7f4 "vinvalbuf: dirty bufs")
    at ../../kern/kern_shutdown.c:444
#10 0xc0151504 in vinvalbuf (vp=0xc4c4af00, flags=1, cred=0x0, p=0xc4bf0440,
    slpflag=0, slptimeo=0) at ../../kern/vfs_subr.c:599
#11 0xc015e034 in spec_close (ap=0xc4c4eec0)
    at ../../miscfs/specfs/spec_vnops.c:648
#12 0xc01a938e in ufsspec_close (ap=0xc4c4eec0)
    at ../../ufs/ufs/ufs_vnops.c:1872
#13 0xc01a9861 in ufs_vnoperatespec (ap=0xc4c4eec0)
    at ../../ufs/ufs/ufs_vnops.c:2317
#14 0xc0162d9c in msdosfs_unmount (mp=0xc09cbc00, mntflags=0, p=0xc4bf0440)
    at vnode_if.h:191
#15 0xc0153fd4 in dounmount (mp=0xc09cbc00, flags=0, p=0xc4bf0440)
    at ../../kern/vfs_syscalls.c:488
#16 0xc0153f14 in unmount (p=0xc4bf0440, uap=0xc4c4ef94)
    at ../../kern/vfs_syscalls.c:456
#17 0xc01d2627 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = 134631479,
      tf_esi = 134694461, tf_ebp = -1077945316, tf_isp = -993726492,
      tf_ebx = -1077946452, tf_edx = 0, tf_ecx = 3, tf_eax = 22,
      tf_trapno = 12, tf_err = 2, tf_eip = 134518920, tf_cs = 31,
      tf_eflags = 582, tf_esp = -1077946512, tf_ss = 39})
    at ../../i386/i386/trap.c:1100
Comment 3 Mike Barcroft freebsd_committer freebsd_triage 2001-07-21 01:57:32 UTC
State Changed
From-To: open->feedback


Does this problem still occur in newer versions of FreeBSD, 
such as 4.3-RELEASE?
Comment 4 Joerg Wunsch freebsd_committer freebsd_triage 2001-08-10 13:54:08 UTC
State Changed
From-To: feedback->closed

Duplicate for kern/10870 (and basically also for kern/4413)