From owner-freebsd-stable@freebsd.org Sun Jul 23 09:26:55 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 66E04CFD43B for ; Sun, 23 Jul 2017 09:26:55 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from hz.grosbein.net (hz.grosbein.net [78.47.246.247]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "hz.grosbein.net", Issuer "hz.grosbein.net" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id DE6017EA0D; Sun, 23 Jul 2017 09:26:54 +0000 (UTC) (envelope-from eugen@grosbein.net) Received: from eg.sd.rdtc.ru (root@eg.sd.rdtc.ru [62.231.161.221]) by hz.grosbein.net (8.15.2/8.15.2) with ESMTPS id v6N9Qn1U037220 (version=TLSv1.2 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Sun, 23 Jul 2017 11:26:49 +0200 (CEST) (envelope-from eugen@grosbein.net) X-Envelope-From: eugen@grosbein.net X-Envelope-To: markj@FreeBSD.org Received: from eg.sd.rdtc.ru (eugen@localhost [127.0.0.1]) by eg.sd.rdtc.ru (8.15.2/8.15.2) with ESMTP id v6N9QjLC044397; Sun, 23 Jul 2017 16:26:45 +0700 (+07) (envelope-from eugen@grosbein.net) Subject: stable/11 debugging kernel unable to produce crashdump again To: Mark Johnston References: <587928B3.2050607@grosbein.net> <20170113193726.GC77535@wkstn-mjohnston.west.isilon.com> <587A0E12.7070205@grosbein.net> Cc: FreeBSD Stable From: Eugene Grosbein Message-ID: <59746BD5.5010301@grosbein.net> Date: Sun, 23 Jul 2017 16:26:45 +0700 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:38.0) Gecko/20100101 Thunderbird/38.4.0 MIME-Version: 1.0 In-Reply-To: <587A0E12.7070205@grosbein.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=3.6 required=5.0 tests=BAYES_00, DATE_IN_FUTURE_96_Q, LOCAL_FROM autolearn=no autolearn_force=no version=3.4.1 X-Spam-Report: * 3.3 DATE_IN_FUTURE_96_Q Date: is 4 days to 4 months after Received: date * -2.3 BAYES_00 BODY: Bayes spam probability is 0 to 1% * [score: 0.0000] * 2.6 LOCAL_FROM From my domains X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on hz.grosbein.net X-Spam-Level: *** 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: Sun, 23 Jul 2017 09:26:55 -0000 On 14.01.2017 18:40, Eugene Grosbein wrote: > >> I suspect that this is because we only stop the scheduler upon a panic >> if SMP is configured. Can you retest with the patch below applied? >> >> Index: sys/kern/kern_shutdown.c >> =================================================================== >> --- sys/kern/kern_shutdown.c (revision 312082) >> +++ sys/kern/kern_shutdown.c (working copy) >> @@ -713,6 +713,7 @@ >> CPU_CLR(PCPU_GET(cpuid), &other_cpus); >> stop_cpus_hard(other_cpus); >> } >> +#endif >> >> /* >> * Ensure that the scheduler is stopped while panicking, even if panic >> @@ -719,7 +720,6 @@ >> * has been entered from kdb. >> */ >> td->td_stopsched = 1; >> -#endif >> >> bootopt = RB_AUTOBOOT; >> newpanic = 0; >> >> > > Indeed, my router is uniprocessor system and your patch really solves the problem. > Now kernel generates crashdump just fine in case of panic. Please commit the fix, thanks! Sadly, this time 11.1-STABLE r321371 SMP hangs instead of doing crashdump: - "call doadump" from DDB prompt works just fine; - "shutdown -r now" reboots the system without problems; - "sysctl debug.kdb.panic=1" triggers a panic just fine but system hangs just afer showing uptime instead of continuing with crashdump generation; same if "real" panic occurs. Same for debug.minidump set to 1 or 0. How do I debug this? Eugene Grosbein