From owner-freebsd-stable@freebsd.org Mon Jul 24 17:21:52 2017 Return-Path: Delivered-To: freebsd-stable@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 1D940CFEE8B for ; Mon, 24 Jul 2017 17:21:52 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: from mail-qt0-x233.google.com (mail-qt0-x233.google.com [IPv6:2607:f8b0:400d:c0d::233]) (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 C8BBE701A0; Mon, 24 Jul 2017 17:21:51 +0000 (UTC) (envelope-from markjdb@gmail.com) Received: by mail-qt0-x233.google.com with SMTP id r14so40553194qte.4; Mon, 24 Jul 2017 10:21:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=H6K1BzA+rXItfkE4AFrNu/ZdB7FRq7/dIGGlUAsYfiU=; b=WPlgONO6ebs3Mk4Qrp2rJoIrr+eC6gSKT821DAjL50z8MadoF8x/VZrkiDHJx2V6r0 fj1V9Ay++zGwr3emvxdo2zABvuGqhFTuEb7MBGdrGZj36Eylf9U+bAL4cn5z/QHsVqIS d6aqRhRHc3HFDEhLJPLqnBnvbBHT5jIUDRlUX5y4djyh1kXzVt3Yxfskziz5xmwV+YHN 7qthU227BdRQwt+/s9p9OBRoW2kkoGowune3+nd9wE+dT512vT1jw9pRKQNXIN/qJCS6 hojJgU/xyoqFnYJl3qnmWJZYpqu8WkZ8IQCpyTs/R2A9gf43BIfWRHvhktQqZ+/GSmab nqzA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:from:to:cc:subject:message-id :references:mime-version:content-disposition:in-reply-to:user-agent; bh=H6K1BzA+rXItfkE4AFrNu/ZdB7FRq7/dIGGlUAsYfiU=; b=OTUv1+qPzF+1/GJS2sudQRaexb2bze5GqyTOZjjmjdeTsUF83sOaVaGg26IHzyTc2f YT+F7OqNqVGg4E6vPKv/ab51FW3SwABKjfPmLcUcZIVE6mit5JGsknB/+7JdjTdU7e4/ CHJVOAed1U/B4pGZ8bL6OpJIwyZcPGoup8EbyYYU4Pqum1YDx777nfMBUFvR2gTld+Gm HDRxT7TbUTDQ/FBV16Km4zjbI1CGLdApe6ZNEr8NaTLSl6vv6Orjs8I0tg72m5oCYfkX rLfdgYj+5ocl2ITTYKoQJOtA94qTmyKykTaatEbyQ+Lt0uqZoQOF9Y4NUCLY4fzEa4Vq bGeQ== X-Gm-Message-State: AIVw112+YaRblEUESYQOG3VktTF4828HNwxNrBfbydd6T/l6/qenJ5YA 3cIZUZIwXxGOrcYQ X-Received: by 10.200.55.129 with SMTP id d1mr4265569qtc.167.1500916910889; Mon, 24 Jul 2017 10:21:50 -0700 (PDT) Received: from wkstn-mjohnston.west.isilon.com (c-76-104-201-218.hsd1.wa.comcast.net. [76.104.201.218]) by smtp.gmail.com with ESMTPSA id k42sm9038034qtk.81.2017.07.24.10.21.49 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 24 Jul 2017 10:21:50 -0700 (PDT) Sender: Mark Johnston Date: Mon, 24 Jul 2017 10:22:32 -0700 From: Mark Johnston To: Eugene Grosbein Cc: FreeBSD Stable , Alexander Motin Subject: Re: stable/11 debugging kernel unable to produce crashdump again Message-ID: <20170724172232.GA71482@wkstn-mjohnston.west.isilon.com> References: <587928B3.2050607@grosbein.net> <20170113193726.GC77535@wkstn-mjohnston.west.isilon.com> <587A0E12.7070205@grosbein.net> <59746BD5.5010301@grosbein.net> <20170724014445.GA20872@raichu> <59762849.5090208@grosbein.net> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <59762849.5090208@grosbein.net> User-Agent: Mutt/1.8.3 (2017-05-23) X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 24 Jul 2017 17:21:52 -0000 On Tue, Jul 25, 2017 at 12:03:05AM +0700, Eugene Grosbein wrote: > Thanks, this helped: > > $ addr2line -f -e kernel.debug 0xffffffff80919c00 > g_raid_shutdown_post_sync > /home/src/sys/geom/raid/g_raid.c:2458 > > That is GEOM_RAID's g_raid_shutdown_post_sync() that hangs if called just before > crashdump generation but works just fine during normal system shutdown. I think graid probably needs a treatment similar to r301173/r316032. g_raid_shutdown_post_sync() appears to be quite similar to the corresponding gmirror handler. In particular, it just attempts to mark the individual components as clean and destroy the GEOM, which is not really safe after a panic. diff --git a/sys/geom/raid/g_raid.c b/sys/geom/raid/g_raid.c index 7a1fd8c5ce2e..aa2529d5466a 100644 --- a/sys/geom/raid/g_raid.c +++ b/sys/geom/raid/g_raid.c @@ -2461,6 +2461,9 @@ g_raid_shutdown_post_sync(void *arg, int howto) struct g_raid_softc *sc; struct g_raid_volume *vol; + if (panicstr != NULL) + return; + mp = arg; g_topology_lock(); g_raid_shutdown = 1;