[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freebsd-hackers
Subject:    Re: 2.2.5-STABLE: is this a bug in umount?
From:       freebsd () bug ! fe ! up ! pt
Date:       1998-02-27 20:21:09
[Download RAW message or body]

Hi!

I did a kernel debug on it and here is the log of the debug (I've 
included an attachment with the full log):

(kgdb) down
#9  0xf01318fc in unmount (p=0xf1509800, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/vfs_syscalls.c:280
280		return (dounmount(mp, uap->flags, p));
(kgdb) list
275		 * Don't allow unmount of the root filesystem
276		 */
277		if (mp->mnt_flag & MNT_ROOTFS)
278			return (EINVAL);
279	
280		return (dounmount(mp, uap->flags, p));
281	}
282	
283	/*
284	 * Do the actual file system unmount.
(kgdb) exit

The solution is to add an if before the return checking if there is 
activity in that partition. The way to do that I'll leave to the 
core team or someone with commit priviliges.

				Jorge

--
\\ Nobody can be exactly like me.  \\ Jorge Miguel Goncalves
\\ Sometimes even I have trouble   \\ 
\\ doing it.                       \\ j@bug.fe.up.pt
\\        -- Talluulah Bankhead    \\ 

On Fri, 27 Feb 1998, Andre Albsmeier wrote:

> Hi,
> 
> let's assume the following (done as root):
> 
> 	mount /dev/sd3c /mnt
> 	tar cf /mnt/bla.tar some_big_directory
> 
> While the tar is running we do the following in another shell:
> 
> 	umount /mnt
> 
> If we see a "Device busy" error we just repeat the umount again and again.
> Suddenly the system freezes for about 10 seconds and reboots. During the
> bootstrap the following message appears:
> 
> 	bali daemon.alert savecore: reboot after panic: vinvalbuf: dirty bufs
> 
> 
> Now my question is: Is this the expected behaviour from umount? If you ask
> me why I do such a silly thing, it's because I mount my portable disk drive
> with amd. Then I start a timeconsuming job on this drive (in my case a tar
> from the network). After the default timeout of 5 minutes the amd unmounts
> the fs and the system crashes. I can reproduce this if you tell me.
> 
> All that happens on a FreeBSD 2.2.5-STABLE system.
> 
> Is this a bug (so I will send in a PR) or a feature?
> 
> Thanks,
> 
> 	-Andre
> 
> To Unsubscribe: send mail to majordomo@FreeBSD.org
> with "unsubscribe freebsd-hackers" in the body of the message
> 
> 

["log" (TEXT/PLAIN)]

Script started on Fri Feb 27 20:03:53 1998
slug# cd /sys/compile/SLUG
slug# gdb -k
GDB is free software and you are welcome to distribute copies of it
 under certain conditions; type "show copying" to see the conditions.
There is absolutely no warranty for GDB; type "show warranty" for details.
GDB 4.16 (i386-unknown-freebsd), Copyright 1996 Free Software Foundation, Inc.
(kgdb) symbol-file kernel.debug
Reading symbols from kernel.debug...done.
(kgdb) exec-file /var/crash/kernel.1
(kgdb) core-file /var/crash/vmcore.1
IdlePTD 1de000
current pcb at 1c2718
panic: vinvalbuf: dirty bufs
#0  boot (howto=256) at ../../kern/kern_shutdown.c:266
266					dumppcb.pcb_cr3 = rcr3();
(kgdb) where
#0  boot (howto=256) at ../../kern/kern_shutdown.c:266
#1  0xf0111f32 in panic (fmt=0xf012feb9 "vinvalbuf: dirty bufs")
    at ../../kern/kern_shutdown.c:390
#2  0xf012ff64 in vinvalbuf (vp=0xf15a1880, flags=1, cred=0x0, p=0x0, 
    slpflag=0, slptimeo=0) at ../../kern/vfs_subr.c:481
#3  0xf016f89d in vm_object_terminate (object=0xf15f3f00)
    at ../../vm/vm_object.c:397
#4  0xf016f74b in vm_object_deallocate (object=0xf15f3f00)
    at ../../vm/vm_object.c:353
#5  0xf0130889 in vflush (mp=0xf152bc00, skipvp=0x0, flags=0)
    at ../../kern/vfs_subr.c:989
#6  0xf015f4dc in ffs_flushfiles (mp=0xf152bc00, flags=0, p=0xf1509800)
    at ../../ufs/ffs/ffs_vfsops.c:725
#7  0xf015f3aa in ffs_unmount (mp=0xf152bc00, mntflags=0, p=0xf1509800)
    at ../../ufs/ffs/ffs_vfsops.c:664
#8  0xf01319ca in dounmount (mp=0xf152bc00, flags=0, p=0xf1509800)
    at ../../kern/vfs_syscalls.c:312
#9  0xf01318fc in unmount (p=0xf1509800, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/vfs_syscalls.c:280
#10 0xf0181933 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = -272640576, 
      tf_esi = 168358, tf_ebp = -272639440, tf_isp = -272629788, tf_ebx = 0, 
      tf_edx = 1, tf_ecx = 58, tf_eax = 22, tf_trapno = 7, tf_err = 7, 
      tf_eip = 11541, tf_cs = 31, tf_eflags = 582, tf_esp = -272640628, 
      tf_ss = 39}) at ../../i386/i386/trap.c:914
---Type <return> to continue, or q <return> to quit---
#11 0x2d15 in ?? ()
#12 0x12d3 in ?? ()
#13 0x107e in ?? ()
(kgdb) down 10
#0  boot (howto=256) at ../../kern/kern_shutdown.c:266
266					dumppcb.pcb_cr3 = rcr3();
(kgdb) up 10
#10 0xf0181933 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = -272640576, 
      tf_esi = 168358, tf_ebp = -272639440, tf_isp = -272629788, tf_ebx = 0, 
      tf_edx = 1, tf_ecx = 58, tf_eax = 22, tf_trapno = 7, tf_err = 7, 
      tf_eip = 11541, tf_cs = 31, tf_eflags = 582, tf_esp = -272640628, 
      tf_ss = 39}) at ../../i386/i386/trap.c:914
914		error = (*callp->sy_call)(p, args, rval);
(kgdb) up
#11 0x2d15 in ?? ()
(kgdb) down
#10 0xf0181933 in syscall (frame={tf_es = 39, tf_ds = 39, tf_edi = -272640576, 
      tf_esi = 168358, tf_ebp = -272639440, tf_isp = -272629788, tf_ebx = 0, 
      tf_edx = 1, tf_ecx = 58, tf_eax = 22, tf_trapno = 7, tf_err = 7, 
      tf_eip = 11541, tf_cs = 31, tf_eflags = 582, tf_esp = -272640628, 
      tf_ss = 39}) at ../../i386/i386/trap.c:914
914		error = (*callp->sy_call)(p, args, rval);
(kgdb) down
#9  0xf01318fc in unmount (p=0xf1509800, uap=0xefbfff94, retval=0xefbfff84)
    at ../../kern/vfs_syscalls.c:280
280		return (dounmount(mp, uap->flags, p));
(kgdb) list
275		 * Don't allow unmount of the root filesystem
276		 */
277		if (mp->mnt_flag & MNT_ROOTFS)
278			return (EINVAL);
279	
280		return (dounmount(mp, uap->flags, p));
281	}
282	
283	/*
284	 * Do the actual file system unmount.
(kgdb) exit
slug#
Script done on Fri Feb 27 20:13:59 1998

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic