Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753843AbbFXRLh (ORCPT ); Wed, 24 Jun 2015 13:11:37 -0400 Received: from out03.mta.xmission.com ([166.70.13.233]:34870 "EHLO out03.mta.xmission.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753761AbbFXRLa (ORCPT ); Wed, 24 Jun 2015 13:11:30 -0400 From: ebiederm@xmission.com (Eric W. Biederman) To: dwalker@fifo99.com Cc: Masami Hiramatsu , Ralf Baechle , linux-mips@linux-mips.org, david.daney@cavium.com, d.hatayama@jp.fujitsu.com, vgoyal@redhat.com, hidehiro.kawai.ez@hitachi.com, linux-kernel@vger.kernel.org References: <20150623140548.GA15591@fifo99.com> <558A53C0.5030700@hitachi.com> <20150624163141.GA20456@fifo99.com> Date: Wed, 24 Jun 2015 12:06:03 -0500 In-Reply-To: <20150624163141.GA20456@fifo99.com> (dwalker@fifo99.com's message of "Wed, 24 Jun 2015 16:31:41 +0000") Message-ID: <87fv5hc9z8.fsf@x220.int.ebiederm.org> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain X-XM-AID: U2FsdGVkX18oDGIRuGGE7iEewrO5YMKKA2SAkx8NsLU= X-SA-Exim-Connect-IP: 67.3.205.90 X-SA-Exim-Mail-From: ebiederm@xmission.com X-Spam-Report: * -1.0 ALL_TRUSTED Passed through trusted hosts only via SMTP * 0.0 TVD_RCVD_IP Message was received from an IP address * 0.0 T_TM2_M_HEADER_IN_MSG BODY: No description available. * 0.8 BAYES_50 BODY: Bayes spam probability is 40 to 60% * [score: 0.4995] * -0.0 DCC_CHECK_NEGATIVE Not listed in DCC * [sa06 1397; Body=1 Fuz1=1 Fuz2=1] * 0.1 XMSolicitRefs_0 Weightloss drug X-Spam-DCC: XMission; sa06 1397; Body=1 Fuz1=1 Fuz2=1 X-Spam-Combo: ;dwalker@fifo99.com X-Spam-Relay-Country: X-Spam-Timing: total 422 ms - load_scoreonly_sql: 0.04 (0.0%), signal_user_changed: 3.7 (0.9%), b_tie_ro: 2.7 (0.6%), parse: 0.76 (0.2%), extract_message_metadata: 15 (3.6%), get_uri_detail_list: 1.97 (0.5%), tests_pri_-1000: 7 (1.7%), tests_pri_-950: 1.26 (0.3%), tests_pri_-900: 1.09 (0.3%), tests_pri_-400: 24 (5.6%), check_bayes: 22 (5.3%), b_tokenize: 6 (1.5%), b_tok_get_all: 8 (1.8%), b_comp_prob: 3.1 (0.7%), b_tok_touch_all: 3.0 (0.7%), b_finish: 0.75 (0.2%), tests_pri_0: 362 (85.7%), tests_pri_500: 4.3 (1.0%), rewrite_mail: 0.00 (0.0%) Subject: Re: kexec crash kernel running with watchdog enabled X-Spam-Flag: No X-SA-Exim-Version: 4.2.1 (built Wed, 24 Sep 2014 11:00:52 -0600) X-SA-Exim-Scanned: Yes (on in02.mta.xmission.com) Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2802 Lines: 66 dwalker@fifo99.com writes: > On Wed, Jun 24, 2015 at 03:52:48PM +0900, Masami Hiramatsu wrote: >> Hi, >> >> On 2015/06/23 23:05, dwalker@fifo99.com wrote: >> > >> > Hi, >> > >> > There was a commit in kernel/panic.c which altered when the kexec crash kernel is executed, >> > >> > commit f06e5153f4ae2e2f3b0300f0e260e40cb7fefd45 >> > Author: Masami Hiramatsu >> > Date: Fri Jun 6 14:37:07 2014 -0700 >> > >> > kernel/panic.c: add "crash_kexec_post_notifiers" option for kdump after panic_notifers >> > >> > >> > This made it possible for smp_send_stop() to be executed prior to calling the kexec crash >> > kernel. >> > >> > The issue is that smp_send_stop() offlines the cores, and other code depend on the cores being online. >> > >> > In my case on Octeon here's an example, >> > >> > panic() >> > crash_kexec() >> > machine_crash_shutdown() >> > octeon_generic_shutdown() >> > >> > Inside octeon_generic_shutdown() the Octeon watchdog is shutdown for_each_online_cpu(), but since >> > most of the cpu's already got offlined in smp_send_stop() it means the watchdog is still alive on >> > those cores. This results in a reboot during the crash kernel execution. >> >> Ah, I see. >> >> > Another example seem to be in default_machine_crash_shutdown() where crash_kexec_prepare_cpus() depends >> > on an IPI for saving the registers on different cores. However, the cpu's are all offlined with >> > interrupts disabled so they won't be running those IPI's in this case. >> > >> > I'm looking for any advice on how this should be fixed, or if it's already fixed. I'm not going to be >> > submitting a patch so if anyone wants to submit one feel free to do so. >> >> Hmm, IMHO, when the cpu goes to offline in appropriate way(smp_send_stop), it should stop >> watchdog timer on the offlined cpu too. >> Or, you can also register crash handler which stops all watchdogs, but it's a bit tricky. >> > > That doesn't really fix all the issue tho. As I was explaining generic MIPS code depends on the cpu's > effectively being online for crash data collection (with an IPI). This issue may effect other architectures also, > because smp_send_stop() offlines the cpu on other architectures also. I haven't surveyed the other architectures > enough to know what issue could happen from this tho. > > Is it possible to move the smp_send_stop() below the notifiers ? I'm > just throwing out ideas. In general if you want reliability don't pass the kernel command line to run the panic notifiers. Eric -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/