From owner-freebsd-current@freebsd.org Fri Jan 26 14:47:52 2018 Return-Path: Delivered-To: freebsd-current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id C0A63EDA0A6 for ; Fri, 26 Jan 2018 14:47:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mailman.ysv.freebsd.org (mailman.ysv.freebsd.org [IPv6:2001:1900:2254:206a::50:5]) by mx1.freebsd.org (Postfix) with ESMTP id 41CE1762EB for ; Fri, 26 Jan 2018 14:47:51 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mailman.ysv.freebsd.org (Postfix) id F3EDDEDA0A3; Fri, 26 Jan 2018 14:47:50 +0000 (UTC) Delivered-To: current@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id B70DAEDA0A2 for ; Fri, 26 Jan 2018 14:47:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-it0-x243.google.com (mail-it0-x243.google.com [IPv6:2607:f8b0:4001:c0b::243]) (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 52E29762E9 for ; Fri, 26 Jan 2018 14:47:50 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-it0-x243.google.com with SMTP id m11so24507664iti.1 for ; Fri, 26 Jan 2018 06:47:50 -0800 (PST) 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; bh=YqvseDz4JKHmVlfsQuAg52nQA5QXbwVv+wh+QeJiWD0=; b=0KaOkyk6P5xGPrXrWB5Rf+iSmZ8/i/87khGEKy9jmoGuiwSBj6DP+cWxTkIwJc79zc 5IgO9AF1ELFV91HvMUwqbM8bVhTp+gpJ7GLx58lIWr6M6JmwinpkX+HMR2xhBZeAE2MP iQ9sDLasvrvZvqvYA7JqBeIR/JhiSu6PHJTL+R9lFLKzyBejGDEm6jHNlgUkq6UpKxsB qdrlLdu37lhhT7R4RZjZkQeyXmgXl/66Y4YwhKLc9Cn0Zp0uI/9jNd4Dzwqj40ZFSVHM P46x+roQyzalpDLORwKFen/SjE8fyGwlkLBsTJFdTDOUSmKRhKFdxjtuLKORAn8uR8fo V3tQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=YqvseDz4JKHmVlfsQuAg52nQA5QXbwVv+wh+QeJiWD0=; b=SYiE0AYymb/N19FwAi8oCiyE8SbPDL/2MKurCEGR5n71nCppqu58BayHzZROuCxNPv x/6qyR4synmx7VPN2f48/28ARt7XjG3czWGfuzKYpdq9aPCOeXqBjO9kcS+HbXAn93VW tV7xMyhscQxbgabk74GTszsFIvOWB90UJnLyIKgPJQcPMqAZFyQABNbT8iamHA6MGZub Kq4S0iBSm+aW3BWc01sz2dcBTqBLesI2Vx2lnqIely45vAotD57C0OveB5GMX0KJfRcB U1b+B52yLLiNp62F3GTkzqucNLddwceFLCVmQNyLBzTfaUk4J4Tn1m2/gB5imPlU7JXW 1azg== X-Gm-Message-State: AKwxytfbq+oyQugiZFk9ZSxFWyIIk/uQZg9cS1YsP5itBdCQGHVjPqLJ 1hqnQ4q5Y7D/dfQ3Po49BFVTu2UfHWg+xGrrcw5+WdZC X-Google-Smtp-Source: AH8x225fnFS3sGxzPPo5+WxSVFNEwI0uJFxfBnM1cNRyali4tzosUCZ2/dvKwZCm+c8pNpqUZDjXQHq7YCYzsca5tgI= X-Received: by 10.36.146.196 with SMTP id l187mr17574746itd.115.1516978069227; Fri, 26 Jan 2018 06:47:49 -0800 (PST) MIME-Version: 1.0 Sender: wlosh@bsdimp.com Received: by 10.79.201.67 with HTTP; Fri, 26 Jan 2018 06:47:48 -0800 (PST) X-Originating-IP: [2603:300b:6:5100:18a2:a4f7:170:8dd9] In-Reply-To: <20180126122947.GA1287@albert.catwhisker.org> References: <20180126122947.GA1287@albert.catwhisker.org> From: Warner Losh Date: Fri, 26 Jan 2018 07:47:48 -0700 X-Google-Sender-Auth: 9zCTlsyPt9iSsVegTdpCGJqwymI Message-ID: Subject: Re: Panic on shutdown @r328436: "Unholding 6 with cnt = -559038242" To: FreeBSD Current Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.25 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.25 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: Fri, 26 Jan 2018 14:47:52 -0000 On Fri, Jan 26, 2018 at 5:29 AM, David Wolfskill wrote: > This is on my "build machine" (laptop is still building updated ports > for today, so I don't know yet whether or not it encounters this.) > Running a kernel with INVARIANTS, right? > I had performed a source-based update from r328393 to r328436, > rebooted, performed "make delete-old-libs", and all seemed well. > This has my change 328415 in it. > I then issued "sudo shutdown -p now", and serial console shows: > panic: Unholding 6 with cnt = -559038242 > cpuid = 3 > time = 1516968697 > KDB: stack backtrace: > db_trace_self_wrapper() at db_trace_self_wrapper+0x2b/frame > 0xfffffe00004288c0 > vpanic() at vpanic+0x18d/frame 0xfffffe0000428920 > panic() at panic+0x43/frame 0xfffffe0000428980 > dadiskgonecb() at dadiskgonecb+0x42/frame 0xfffffe00004289a0 > g_disk_providergone() at g_disk_providergone+0x25/frame 0xfffffe00004289d0 > g_destroy_provider() at g_destroy_provider+0xae/frame 0xfffffe00004289f0 > g_wither_washer() at g_wither_washer+0x87/frame 0xfffffe0000428a30 > g_run_events() at g_run_events+0x3ca/frame 0xfffffe0000428a70 > fork_exit() at fork_exit+0x84/frame 0xfffffe0000428ab0 > fork_trampoline() at fork_trampoline+0xe/frame 0xfffffe0000428ab0 > --- trap 0, rip = 0, rsp = 0, rbp = 0 --- > KDB: enter: panic > [ thread pid 13 tid 100044 ] > Stopped at kdb_enter+0x3b: movq $0,kdb_why > db> > That's no good. We're releasing a reference to the da peripheral because geom has finished with the disk and is giving us a final callback so we can drop the reference we took when we created the geom. Trouble is, cnt should be like 1 always for this code, but it's not. It looks like it may be bytes to a pointer :( > As noted, this is a build machine, and it was to be powered off for > the rest of the day anyway, so I don't need to get it up & running > immediately: I can poke at the ddb prompt, given some clues. > I don't suppose you can attach kgdb to this machine? I'd be interested to see what the contents of the softc are...a > Same system had completed a source-based update for stable/11 from > r328392 to r328429 earlier today without incident (using a different > slice of the boot drive). > Thanks for the report. This is quite troubling. Warner