From owner-svn-src-all@freebsd.org Fri Aug 12 15:21:06 2016 Return-Path: Delivered-To: svn-src-all@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id AF5E6BB770C for ; Fri, 12 Aug 2016 15:21:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-io0-x236.google.com (mail-io0-x236.google.com [IPv6:2607:f8b0:4001:c06::236]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 7535014C9 for ; Fri, 12 Aug 2016 15:21:06 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-io0-x236.google.com with SMTP id q83so27520577iod.1 for ; Fri, 12 Aug 2016 08:21:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to:cc; bh=tuuLVUoKijK5+mlYDt0WFJeWveGEDlqXa8WtC09tvDo=; b=OoXXkDX5yYd68xDhizSMKFP5QSiEVMBEFQOn0svKPnqUNu0luTuAr5K0f9l6n7wAKZ Iv0yBlntyKsJIoEVuOD7ppUjPYGSP7b7vIsoxnE/fdEVHA+x1fMnvsN5TMiVkLgnV3Uz OFJ20wwI9GcynRcsuVZ2aVxxMVLN+r61gMnzQzw0aPUc44BwQPATzXrAV6Kij89jNkNT WeVBVCpDxkBVyLVy+/SNMJbcQFisFxI4QOySraear2tus9+AwL6W5f9Nmnew+ezJU63Q QUs7KxKoitw/tbdMY2rmoOjQ9Z0TzGKLzMLrBexw2w1XsJWjSmbAAaa0Jc/LCBVQdX8t 6BsA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to:cc; bh=tuuLVUoKijK5+mlYDt0WFJeWveGEDlqXa8WtC09tvDo=; b=LMmB8onXcW8c5/1tqfkK49xq2Fxxmvxf77Rv6cyndmCeq08xj0QkUuKLbUAUoS4HGo s7dIcCht/Oz/LWNEULsPW5gw/Iy7eMaZ/gKm8R3Q1xm8v+V4d7H6aYD7Elh2t72pXBRC VLeamVQgdJa62N0j21RMVm9oka9BMq/qbAtmX8hsHhk4yi2LaKo7fzJn4e9PuJelFlNG j5EEj6zCB7NPq0i6W6UtyqpEDDnoc2Fz73XXTMzfhAusyKQ1sIgRkepR/ytBVflyPuae OBIPvqmCHUHBM2rQHJGhOSwFIPnRHhpt5KlM12AlHZYnyEcgSqfXr1LXUvRjDEvxxH9G 8RCw== X-Gm-Message-State: AEkooutoaERxtTnre5PSSRoDnTH2Y3ovswViw4yx6WGNeHF8aTkvofYZ+ImIWpW/CfAw7VRXks+hRKqsuVCYZQ== X-Received: by 10.107.9.39 with SMTP id j39mr18458049ioi.73.1471015265444; Fri, 12 Aug 2016 08:21:05 -0700 (PDT) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.36.65.105 with HTTP; Fri, 12 Aug 2016 08:21:04 -0700 (PDT) X-Originating-IP: [50.253.99.174] In-Reply-To: <20160812151745.GA52527@mithlond.kdm.org> References: <201607190536.u6J5aLl7015268@repo.freebsd.org> <3277576.dFZ2EGo2Fh@overcee.wemm.org> <6198652.UmU69kS6Zt@overcee.wemm.org> <181fcc35-3a5d-043f-7dc4-7a01a53eebae@FreeBSD.org> <7372bf93-69a2-f5f5-1d07-204fd31f252c@FreeBSD.org> <20160812151117.GA52309@mithlond.kdm.org> <20160812151745.GA52527@mithlond.kdm.org> From: Warner Losh Date: Fri, 12 Aug 2016 09:21:04 -0600 X-Google-Sender-Auth: 79eIeESz0kI_zDJn4NwG8mhAESA Message-ID: Subject: Re: svn commit: r303019 - head/sys/geom To: "Kenneth D. Merry" Cc: "Andrey V. Elsukov" , Bryan Drewery , Peter Wemm , "svn-src-all@freebsd.org" , "svn-src-head@freebsd.org" , src-committers Content-Type: text/plain; charset=UTF-8 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 12 Aug 2016 15:21:06 -0000 On Fri, Aug 12, 2016 at 9:17 AM, Kenneth D. Merry wrote: > On Fri, Aug 12, 2016 at 09:13:58 -0600, Warner Losh wrote: >> On Fri, Aug 12, 2016 at 9:11 AM, Kenneth D. Merry wrote: >> > On Fri, Aug 12, 2016 at 13:38:21 +0300, Andrey V. Elsukov wrote: >> >> On 12.08.16 03:26, Bryan Drewery wrote: >> >> > On r303467 I ran into this: >> >> > >> >> > panic @ time 1470916206.652, thread 0xfffff8000412f000: >> >> > g_resize_provider_event but withered >> >> > cpuid = 0 >> >> > Panic occurred in module kernel loaded at 0xffffffff80200000: >> >> > >> >> > Stack: -------------------------------------------------- >> >> > kernel:kassert_panic+0x166 >> >> > kernel:g_resize_provider_event+0x181 >> >> > kernel:g_run_events+0x186^M^M >> >> > kernel:fork_exit+0x83^M^M >> >> > -------------------------------------------------- >> >> > >> >> > No further information available unfortunately. >> >> >> >> This one is related to r302087 :) >> > >> > It looks like there is a race. I think we need to replace the KASSERT >> > in g_resize_provider_event() with a return in case the provider is >> > withered. >> > >> > I won't be able to work on or test this until sometime next week. So if >> > you guys want to go ahead and make the change, please do. >> >> But why are we calling g_resize_provider on a withered object? That's >> the part I don't understand in this thread. > > It isn't withered when the event is queued, but it is withered by the time > the event is executed. > > There is a check in g_resize_provider() to make sure it isn't withered. If > not, the event is queued. But once g_resize_provider_event() runs, it is > withered and we run into the KASSERT. > > There isn't adequate locking and ordering in there to prevent the race > from happening, so the assert should be replaced with an "if (withered) > return" statement. I'll grant that we may wither with outstanding events, but why is it withering? That seems odd. Either we're bogusly posting this event just before it will wither, or something else is bogusly withering it. Just removing the assert isn't going to fix the underlying issue. Back to Bryan: just to be clear, this is with the latest version of the code, and not the intermediate version that was fixed after numerous problems surfaced, right? Warner