From owner-freebsd-current@FreeBSD.ORG Sun Apr 11 14:54:39 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 159E116A4CE; Sun, 11 Apr 2004 14:54:39 -0700 (PDT) Received: from zaphod.nitro.dk (port324.ds1-khk.adsl.cybercity.dk [212.242.113.79]) by mx1.FreeBSD.org (Postfix) with ESMTP id B84B243D5F; Sun, 11 Apr 2004 14:54:38 -0700 (PDT) (envelope-from simon@zaphod.nitro.dk) Received: by zaphod.nitro.dk (Postfix, from userid 3000) id B04F211984; Sun, 11 Apr 2004 23:54:36 +0200 (CEST) Date: Sun, 11 Apr 2004 23:54:36 +0200 From: "Simon L. Nielsen" To: freebsd-current@freebsd.org Message-ID: <20040411215436.GB881@zaphod.nitro.dk> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="lEGEL1/lMxI0MVQ2" Content-Disposition: inline User-Agent: Mutt/1.5.6i cc: Mark Murray Subject: random(4) related panic: sleeping without a mutex X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 11 Apr 2004 21:54:39 -0000 --lEGEL1/lMxI0MVQ2 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hello I getting the following panic on my Soekris Net4801 box right after init has been started: Mounting root from ufs:/dev/ad0s1a start_init: trying /sbin/init panic: sleeping without a mutex at line 144 in file /data/nanobsd/src/sys/kern/kern_synch.c Debugger("panic") Stopped at Debugger+0x45: xchgl %ebx,in_Debugger.0 db> trace Debugger(c0636dcb) at Debugger+0x45 __panic(c06375fc,90,c06375d4,c8758b70,c04cc4ee) at __panic+0xc7 msleep(c0682740,0,1a0,c06476ac,0) at msleep+0xae random_read(c06865a4,c8758c88,20000,c065bfe0,74) at random_read+0x41 spec_read(c8758bec,c8758c38,c052853c,c8758bec,20000) at spec_read+0x110 spec_vnoperate(c8758bec) at spec_vnoperate+0x13 vn_read(c17f1aa0,c8758c88,c0ac2d80,0,c1777540) at vn_read+0x1a0 dofileread(c1777540,c17f1aa0,7,bfbfcb6c,74) at dofileread+0xb0 read(c1777540,c8758d14,3,4,296) at read+0x3b syscall(2f,2f,2f,bfbfeea8,7) at syscall+0x217 Xint0x80_syscall() at Xint0x80_syscall+0x1d --- syscall (3, FreeBSD ELF32, read), eip =3D 0x280c15e7, esp =3D 0xbfbfcb2= c, ebp =3D 0xbfbfcbf8 --- It seems related to Mark Murray latest random(4) updates. This is with -CURRENT from today. I can trace the problem to the tsleep call in : sys/dev/random/randomdev.c:106: /* Blocking logic */ while (!random_systat.seeded && !error) { if (flag & IO_NDELAY) error =3D EWOULDBLOCK; else error =3D tsleep(&random_systat, PUSER | PCATCH, "block", 0); } But my kernel foo is not sufficient to make more sense out of that, so I hope somebody else can. It happens both with my custom kernel config and GENERIC. I don't have a gdb trace since the box only has a flash card so it's a bit difficult to create one, but if it's important I can probably find a way - just let me know. --=20 Simon L. Nielsen FreeBSD Documentation Team --lEGEL1/lMxI0MVQ2 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQFAeb6ch9pcDSc1mlERAvFDAJwO8k3+zkdYF+5kAKW+uz6QZtBlHACfZR0r 6tOW5KevCLaojCfLVdeMlV8= =SmtU -----END PGP SIGNATURE----- --lEGEL1/lMxI0MVQ2--