From owner-freebsd-bugs@FreeBSD.ORG Sat Mar 17 04:00:30 2012 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 1B8FC106564A for ; Sat, 17 Mar 2012 04:00:30 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (freefall.freebsd.org [IPv6:2001:4f8:fff6::28]) by mx1.freebsd.org (Postfix) with ESMTP id ED03E8FC17 for ; Sat, 17 Mar 2012 04:00:29 +0000 (UTC) Received: from freefall.freebsd.org (localhost [127.0.0.1]) by freefall.freebsd.org (8.14.5/8.14.5) with ESMTP id q2H40OqJ058870 for ; Sat, 17 Mar 2012 04:00:24 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.5/8.14.5/Submit) id q2H40OeD058869; Sat, 17 Mar 2012 04:00:24 GMT (envelope-from gnats) Resent-Date: Sat, 17 Mar 2012 04:00:24 GMT Resent-Message-Id: <201203170400.q2H40OeD058869@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-bugs@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Zhouyi Zhou Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 6F912106566B for ; Sat, 17 Mar 2012 03:52:17 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22]) by mx1.freebsd.org (Postfix) with ESMTP id 0BB7C8FC14 for ; Sat, 17 Mar 2012 03:52:17 +0000 (UTC) Received: from red.freebsd.org (localhost [127.0.0.1]) by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q2H3qGW5007391 for ; Sat, 17 Mar 2012 03:52:16 GMT (envelope-from nobody@red.freebsd.org) Received: (from nobody@localhost) by red.freebsd.org (8.14.4/8.14.4/Submit) id q2H3qGNA007389; Sat, 17 Mar 2012 03:52:16 GMT (envelope-from nobody) Message-Id: <201203170352.q2H3qGNA007389@red.freebsd.org> Date: Sat, 17 Mar 2012 03:52:16 GMT From: Zhouyi Zhou To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/166193: FB 8.0 freeze during the kernel dump X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 17 Mar 2012 04:00:30 -0000 >Number: 166193 >Category: kern >Synopsis: FB 8.0 freeze during the kernel dump >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Sat Mar 17 04:00:23 UTC 2012 >Closed-Date: >Last-Modified: >Originator: Zhouyi Zhou >Release: FB 8.0 >Organization: www.ict.ac.cn >Environment: FreeBSD 8.0-RELEASE FreeBSD 8.0-RELEASE >Description: FreeBSD 8.0 will freeze during the kernel panic memory dump. >How-To-Repeat: Allocate a large memory, trigger a kernel panic, and let it dump >Fix: I use self developed instrument code to prevent dead lock and find the cpu which is used for dumping is seized by ehci_interrupt which is locked up. The fix is to add a critical_enter() in function doadump. btw: following is my dirty and quick instrument code: #define TRACELEVEL 5 void lapic_handle_intr(int vector, struct trapframe *frame) { struct intsrc *isrc; #ifdef TRACELEVEL char tfip[20]; if (1/*vector == 0x30*/){ int i = 0; int j = 0; int cpuid = PCPU_GET(cpuid); struct amd64_frame * frame1; if (!INKERNEL(frame->tf_rip)) goto out; frame1 = (struct amd64_frame *) (frame->tf_rbp); sprintf(tfip, "%x\n", frame->tf_rip); for (i = 0; i < 8; i++){ *(((unsigned char *)0xffffffff800b8000) + cpuid*300 + j*9*2 + i*2) = tfip[i]; if (*((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) != 121) *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) = 121; else *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + i*2) = 120; } *(((unsigned char *)0xffffffff800b8000) + cpuid*300 + j*9*2 + 8*2) = ' '; *((unsigned char *)0xffffffff800b8001 + cpuid*300 + j*9*2 + 8*2) = 121; j = 1; while (j <= TRACELEVEL){ if (!INKERNEL((long)frame1)) goto out; sprintf(tfip, "%x\n", frame1->f_retaddr); for (i = 0; i < 8; i++){ *(((unsigned char *)0xffffffff800b8000) +cpuid*300 + j*9*2 + i*2) = tfip[i]; if (*((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) != 121) *((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) = 121; else *((unsigned char *)0xffffffff800b8001 + cpuid*300 +j*9*2 + i*2) = 120; } *(((unsigned char *)0xffffffff800b8000) + cpuid*300 +j*9*2 + 8*2) = ' '; *((unsigned char *)0xffffffff800b8001 +cpuid*300 + j*9*2 + 8*2) = 121; frame1 = frame1->f_frame; j++; } } } out: #endif if (vector == -1) panic("Couldn't get vector from ISR!"); isrc = intr_lookup_source(apic_idt_to_irq(PCPU_GET(apic_id), vector)); intr_execute_handlers(isrc, frame); } >Release-Note: >Audit-Trail: >Unformatted: