NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/52364: System hangs not much before showing the login prompt; changes in VFS suspected



The following reply was made to PR kern/52364; it has been noted by GNATS.

From: "J. Hannken-Illjes" <hannken%eis.cs.tu-bs.de@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/52364: System hangs not much before showing the login
 prompt; changes in VFS suspected
Date: Wed, 5 Jul 2017 10:32:28 +0200

 --Apple-Mail=_EDB23F79-44D8-42E6-A6FC-C7718857FE90
 Content-Transfer-Encoding: quoted-printable
 Content-Type: text/plain;
 	charset=utf-8
 
 
 > Was the change from vp->v_mount to vq->v_mount
 > intentional? I=E2=80=99m asking just in case.
 
 Yes -- it was a typo fixed in -current.
 
 > Fstrans locks by lwp:
 > 772.1    (/) shared 2 cow 0
 > 748.1    (/) shared 2 cow 0
 > 352.1    (/) shared 2 cow 0
 ...
 
 Ok, vfs_suspend() fails to suspend activity on "/".
 
 Please apply the attached diff too.  You will get another dump of the
 fstrans state, then a panic and a backtrace from ddb if vfs_suspend()
 takes more than five seconds.
 
 --
 J. Hannken-Illjes - hannken%eis.cs.tu-bs.de@localhost - TU Braunschweig (Germany)
 
 --Apple-Mail=_EDB23F79-44D8-42E6-A6FC-C7718857FE90
 Content-Disposition: attachment;
 	filename=vfs_trans.c.diff
 Content-Type: application/octet-stream;
 	x-unix-mode=0644;
 	name="vfs_trans.c.diff"
 Content-Transfer-Encoding: 7bit
 
 Index: vfs_trans.c
 ===================================================================
 RCS file: /cvsroot/src/sys/kern/vfs_trans.c,v
 retrieving revision 1.45
 diff -p -u -2 -r1.45 vfs_trans.c
 --- vfs_trans.c	7 May 2017 08:24:20 -0000	1.45
 +++ vfs_trans.c	5 Jul 2017 08:27:03 -0000
 @@ -45,4 +45,5 @@ __KERNEL_RCSID(0, "$NetBSD: vfs_trans.c,
  #include <sys/atomic.h>
  #include <sys/buf.h>
 +#include <sys/kernel.h>
  #include <sys/kmem.h>
  #include <sys/mount.h>
 @@ -492,5 +493,14 @@ fstrans_setstate(struct mount *mp, enum 
  	error = 0;
  	while (! state_change_done(mp)) {
 -		error = cv_wait_sig(&fstrans_count_cv, &fstrans_lock);
 +		error = cv_timedwait_sig(&fstrans_count_cv, &fstrans_lock,
 +		    mstohz(5000));
 +		if (error == EWOULDBLOCK) {
 +			extern void fstrans_dump(int);
 +			extern char db_cmd_on_enter[];
 +
 +			fstrans_dump(0);
 +			strcpy(db_cmd_on_enter, "trace");
 +			panic("%s timed out after 5 seconds", __func__);
 +		}
  		if (error) {
  			new_state = fmi->fmi_state = FSTRANS_NORMAL;
 
 --Apple-Mail=_EDB23F79-44D8-42E6-A6FC-C7718857FE90--
 



Home | Main Index | Thread Index | Old Index