From owner-cvs-src@FreeBSD.ORG Wed May 14 06:09:55 2003 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 6E8F537B404; Wed, 14 May 2003 06:09:55 -0700 (PDT) Received: from critter.freebsd.dk (critter.freebsd.dk [212.242.86.163]) by mx1.FreeBSD.org (Postfix) with ESMTP id 28CDB43F85; Wed, 14 May 2003 06:09:54 -0700 (PDT) (envelope-from phk@phk.freebsd.dk) Received: from critter.freebsd.dk (localhost [127.0.0.1]) by critter.freebsd.dk (8.12.9/8.12.9) with ESMTP id h4ED9qYP030951; Wed, 14 May 2003 15:09:52 +0200 (CEST) (envelope-from phk@phk.freebsd.dk) To: "Greg 'groggy' Lehey" From: "Poul-Henning Kamp" In-Reply-To: Your message of "Wed, 14 May 2003 22:18:35 +0930." <20030514124835.GE4390@wantadilla.lemis.com> Date: Wed, 14 May 2003 15:09:52 +0200 Message-ID: <30950.1052917792@critter.freebsd.dk> cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/geom geom_disk.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 14 May 2003 13:09:56 -0000 In message <20030514124835.GE4390@wantadilla.lemis.com>, "Greg 'groggy' Lehey" writes: > >--h56sxpGKRmy85csR >Content-Type: text/plain; charset=us-ascii >Content-Disposition: inline > >On Wednesday, 14 May 2003 at 13:37:59 +0200, Poul-Henning Kamp wrote: >> In message <20030514081041.GD4390@wantadilla.lemis.com>, "Greg 'groggy' Lehey" >> writes: >> >>> malloc() of "16" with the following non-sleepablelocks held: >>> exclusive sleep mutex g_xup r = 0 (0xc8612ca8) locked @ /src/FreeBSD/5-CURRENT-ZAPHOD/src/sys/geom/geom_io.c:363 >> >> This is a problem, you cannot sleep in the primary I/O path (ie: strategy() >> and done()), if you sleep in the I/O path, you stop all I/O processing >> and if the system needs to page something out to make the ram available >> to you, you have a deadlock. > >I wasn't sleeping. I'm pretty sure it is in vinum, the mute is "g_xup", which means that it is in a "done" function. Are you sure you don't have any malloc(..., M_WAITOK) calls ? >> You have to stop sending I/Os, wait for the ones you have sent to >> come back, then you can close. > >They won't complete if the drive has gone away. Then that is a device-driver error. The device driver _should_ to call disk_destroy() until it has returned all outstanding bio's (with an error most likely), but provided that it stays inside certain boundaries, it can get away with this, but it is _never_ allowed to just drop a bio on the floor, even if the device has disappeared. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 phk@FreeBSD.ORG | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence.