From owner-freebsd-stable@FreeBSD.ORG Wed Nov 16 11:03:34 2011 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 304631065673; Wed, 16 Nov 2011 11:03:34 +0000 (UTC) (envelope-from mavbsd@gmail.com) Received: from mail-ey0-f182.google.com (mail-ey0-f182.google.com [209.85.215.182]) by mx1.freebsd.org (Postfix) with ESMTP id 870898FC0A; Wed, 16 Nov 2011 11:03:33 +0000 (UTC) Received: by eyd10 with SMTP id 10so375678eyd.13 for ; Wed, 16 Nov 2011 03:03:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=sender:message-id:date:from:user-agent:mime-version:to:cc:subject :references:in-reply-to:content-type:content-transfer-encoding; bh=/c1g2+Ksifb5mj0Z8o7m88GBRKjlW3GuyMZ7nezVAuE=; b=vFkt/zhz6QatZT2NKtG0X/MesVFfK8wsDONdVUt9HwyGnSk2qoWzTr3tXHIiDNXfDI FHaBJQ29swvfis8XHL042n7XkJ4DCLm8rpFz9re9jTES+bCDjdh48Crsi+mvbMDEmI8X 2va1cguIkF4mpQaZmPQV4Aq/3wkuWbyDdu9rc= Received: by 10.213.3.77 with SMTP id 13mr529565ebm.148.1321439965572; Wed, 16 Nov 2011 02:39:25 -0800 (PST) Received: from mavbook2.mavhome.dp.ua (pc.mavhome.dp.ua. [212.86.226.226]) by mx.google.com with ESMTPS id d6sm78378352eec.10.2011.11.16.02.39.23 (version=TLSv1/SSLv3 cipher=OTHER); Wed, 16 Nov 2011 02:39:24 -0800 (PST) Sender: Alexander Motin Message-ID: <4EC392DA.2030302@FreeBSD.org> Date: Wed, 16 Nov 2011 12:39:22 +0200 From: Alexander Motin User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:7.0.1) Gecko/20111003 Thunderbird/7.0.1 MIME-Version: 1.0 To: "Bjoern A. Zeeb" References: In-Reply-To: Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: freebsd-stable@freebsd.org Subject: Re: ATA/Cdrom(?) panic X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 16 Nov 2011 11:03:34 -0000 Hi. On 11/16/11 08:43, Bjoern A. Zeeb wrote: > we have seen this or a very similar panic for about 1 year now once in > a while and I think I reported it before; this is FreeBSD as guest on > vmware. Seems it was a double panic this time. Could someone please > see what's going on there? It was on 8.x-STABLE in the past and this > is 8.2-RELEASE-p4. The part of code reporting "completing request directly" is IMHO broken by design. It returns request completion before request will actually be completed by lower levels without any knowledge of what's going on there. There is kind of protection against double request completion, but it looks like not always working. May be because that part of code is not locked and nothing prevents that semaphore timeout and normal request timeout/completion to happen simultaneously. It is surprising to see even two traps same time, not sure what synchronized them so precisely. Simple removing that semaphore timeout is not an option, because it will cause deadlock when this wait happen within taskqueue thread that is used to handle requests completion and abort that wait. Avoid waiting inside taskqueue is also impossible without major rewrite. That's why ATA_CAM drops that code completely. -- Alexander Motin