From owner-freebsd-current@FreeBSD.ORG Wed Jun 10 17:36:52 2015 Return-Path: Delivered-To: current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id CAEBA6CA for ; Wed, 10 Jun 2015 17:36:52 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: from mail-ie0-x22e.google.com (mail-ie0-x22e.google.com [IPv6:2607:f8b0:4001:c03::22e]) (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 A0D551956 for ; Wed, 10 Jun 2015 17:36:52 +0000 (UTC) (envelope-from maksim.yevmenkin@gmail.com) Received: by iebmu5 with SMTP id mu5so39302873ieb.1 for ; Wed, 10 Jun 2015 10:36:52 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=dH5FTAoBEbTQ4yRbpTSoQDzNR1KrdF/QOaiKCw/sVyI=; b=KOlK+Q9CY0kjZUy+p650FHhB4EUdLCfcWAaS+VRWBr5ueg1Fno3LFqJQSWutfBCVRO Njs4Z1R1VQxtVklSU7VdGbLOLHpZDmZMVbOONb02mZ90dj3QyI/Z61VAYN9IhbDOZKfG Q+duWR125rtnMyjHOeMatB9o18U2JAXxrk3kjD3C8xT3eptcOss3JD9tOqxvjtz/LYou kPjQQd5oDd1y95oi56FqHaPTK1gFI2deJ3GkXfx960t9NNxpFHaV6jUV5Z1/nL9BWPnY UaF/jkiFlrAAZFsaePpfCspk6mOCLIgWAqIrLhM3GWuI8C8XiE9VU2oNMYXbK+KZfIAg eQaQ== MIME-Version: 1.0 X-Received: by 10.50.43.194 with SMTP id y2mr29129532igl.35.1433957811995; Wed, 10 Jun 2015 10:36:51 -0700 (PDT) Received: by 10.36.66.17 with HTTP; Wed, 10 Jun 2015 10:36:51 -0700 (PDT) Date: Wed, 10 Jun 2015 10:36:51 -0700 Message-ID: Subject: obtaining a minidump from panic() called from NMI handler From: Maksim Yevmenkin To: "current@freebsd.org" Content-Type: text/plain; charset=UTF-8 X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.20 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: Wed, 10 Jun 2015 17:36:52 -0000 hello, i have a question about obtaining minidump as result of panic() being called from nmi handler. basically, i have a way to trigger nmi, and, i would like to panic() system and obtain a minidump. i have modified isa_nmi() to appropriately inspect bits and return non-zero return code. i have turned off machdep.kdb_on_nmi knob (set it to zero). i have confirmed that amd64 trap() is called with correct T_NMI type. i've also confirmed that panic() is called from amd64's trap(). the issue i have is that system is rebooting too early. basically, it looks like minidump is started, but, for whatever reason, other cpus are not completely stopped (or may be they are panic()ing again) and system just reboots without having complete the minidump. the issue is not present when machdep.kdb_on_nmi is set to 1. in this case, system drops into ddb prompt and 'call doadump' works as expected. for various reasons i can not use ddb, and, would like to have system save nmi triggered minidump completely unattended. can someone please give me a clue as to what i should be looking into to make this work? thanks! max