From owner-freebsd-scsi@FreeBSD.ORG Sat Jun 11 19:30:25 2011 Return-Path: Delivered-To: freebsd-scsi@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id B92F5106566C for ; Sat, 11 Jun 2011 19:30:25 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-bw0-f54.google.com (mail-bw0-f54.google.com [209.85.214.54]) by mx1.freebsd.org (Postfix) with ESMTP id 378898FC0C for ; Sat, 11 Jun 2011 19:30:24 +0000 (UTC) Received: by bwz12 with SMTP id 12so4221754bwz.13 for ; Sat, 11 Jun 2011 12:30:24 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:sender:message-id:date:from:user-agent :mime-version:to:cc:subject:references:in-reply-to :x-enigmail-version:content-type:content-transfer-encoding; bh=Dis/6kUIZyD12vF4L93N7jZMKNgtNg0RX2ji2O1qzjc=; b=c2hGye1IK9VE53BG2vAtQ42SGxTpnNt6tXpJP2EI63PSPyGIdkr/wI5+9289p20Ikp rJq12C0v7pBY/if/z0ctFHOFQfhzQijHjnXiy4TDmxAg4IddbqZnuAiUAJbUoJrqxUJJ BIJ5ZWlhGqbtL/ThFAfnx+Cxan2eLvg3muv3E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:x-enigmail-version:content-type :content-transfer-encoding; b=er1jWu1CCXW3vxWMnGbQbJ7EuEZic0ceJEeKARuKp+bxBlq/y2e/vz8zgSkdCAqAoO kJGheo5kbgL6u0r4iqhbYl+vJ2GI3MSAc9rwbLNJ/uhQWsfKc7eUk+bys6ZyhL9VQ4Fr fQX9Sgwc7ClwefY0YcjFeif+X69Wh3Bx0tDcs= Received: by 10.204.154.74 with SMTP id n10mr3069933bkw.33.1307820623971; Sat, 11 Jun 2011 12:30:23 -0700 (PDT) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua [212.86.226.226]) by mx.google.com with ESMTPS id x6sm3759831bkv.12.2011.06.11.12.30.22 (version=SSLv3 cipher=OTHER); Sat, 11 Jun 2011 12:30:23 -0700 (PDT) Sender: Alexander Motin Message-ID: <4DF3C21B.8050604@FreeBSD.org> Date: Sat, 11 Jun 2011 22:29:31 +0300 From: Alexander Motin User-Agent: Thunderbird 2.0.0.23 (X11/20091212) MIME-Version: 1.0 To: Joerg Wunsch References: <20110520201757.GE48734@deviant.kiev.zoral.com.ua> In-Reply-To: X-Enigmail-Version: 0.96.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-scsi@freebsd.org Subject: Re: Panic when removing a SCSI device entry X-BeenThere: freebsd-scsi@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: SCSI subsystem List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 11 Jun 2011 19:30:25 -0000 Joerg Wunsch wrote: > As Kostik Belousov wrote: > >> This looks like a CAM issue, which is out of my scope. >> Hope other subscribers will offer the help. > > I see frequently console messages like this now: > > xpt_release_devq(0): requested 1 > present 0 > > Could that be related? Any ideas? This massage tells about non-fatal error somewhere in CAM. Previously such conditions were silently ignored. I see at least one suspicious point in sa driver, but I am not very good at it's logic. Could you investigate what kind of activity triggers those messages, so I could try to reproduce it? I am thinking about something like this: --- scsi_sa.c.orig 2011-04-15 00:25:33.000000000 +0300 +++ scsi_sa.c 2011-06-11 22:18:20.000000000 +0300 @@ -1783,12 +1783,7 @@ sadone(struct cam_periph *periph, union } } } - /* - * If we had an error (immediate or pending), - * release the device queue now. - */ - if (error || (softc->flags & SA_FLAG_ERR_PENDING)) - cam_release_devq(done_ccb->ccb_h.path, 0, 0, 0, 0); + QFRLS(done_ccb); #ifdef CAMDEBUG if (error || bp->bio_resid) { CAM_DEBUG(periph->path, CAM_DEBUG_INFO, > So far, no panic again, but probably not since the bug itself > has been fixed but rather since I slightly changed the scripts > that powerup/-down the tape library. -- Alexander Motin