From owner-freebsd-bugs@FreeBSD.ORG Mon Nov 10 02:20:04 2008 Return-Path: Delivered-To: freebsd-bugs@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 242871065689 for ; Mon, 10 Nov 2008 02:20:04 +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 0A3A18FC1C for ; Mon, 10 Nov 2008 02:20:04 +0000 (UTC) (envelope-from gnats@FreeBSD.org) Received: from freefall.freebsd.org (gnats@localhost [127.0.0.1]) by freefall.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA2K3xY015420 for ; Mon, 10 Nov 2008 02:20:03 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id mAA2K30a015419; Mon, 10 Nov 2008 02:20:03 GMT (envelope-from gnats) Resent-Date: Mon, 10 Nov 2008 02:20:03 GMT Resent-Message-Id: <200811100220.mAA2K30a015419@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, Jian Qiu Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AA096106568C for ; Mon, 10 Nov 2008 02:16:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (www.freebsd.org [IPv6:2001:4f8:fff6::21]) by mx1.freebsd.org (Postfix) with ESMTP id 986BB8FC18 for ; Mon, 10 Nov 2008 02:16:56 +0000 (UTC) (envelope-from nobody@FreeBSD.org) Received: from www.freebsd.org (localhost [127.0.0.1]) by www.freebsd.org (8.14.3/8.14.3) with ESMTP id mAA2GtCn001530 for ; Mon, 10 Nov 2008 02:16:55 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id mAA2GteE001529; Mon, 10 Nov 2008 02:16:55 GMT (envelope-from nobody) Message-Id: <200811100216.mAA2GteE001529@www.freebsd.org> Date: Mon, 10 Nov 2008 02:16:55 GMT From: Jian Qiu To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 Cc: Subject: kern/128744: AMD64 kernel panic if INVARIANTS and DEBUG_MEMGUARD DEBUG_REDZONE are enabled 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: Mon, 10 Nov 2008 02:20:04 -0000 >Number: 128744 >Category: kern >Synopsis: AMD64 kernel panic if INVARIANTS and DEBUG_MEMGUARD DEBUG_REDZONE are enabled >Confidential: no >Severity: non-critical >Priority: medium >Responsible: freebsd-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Nov 10 02:20:03 UTC 2008 >Closed-Date: >Last-Modified: >Originator: Jian Qiu >Release: 7.1-BETA2 >Organization: Huawei Technology >Environment: FreeBSD testAMD64 7.1-BETA2 FreeBSD 7.1-BETA2 #0: Mon Nov 10 04:57:12 CST 2008 qj@hostAMD64:/usr/home/qj/gobi/compile/sys/amd64/compile/GENERIC amd64 >Description: When compiled the kernel with the following options: options INVARIANTS options INVARIANT_SUPPORT options DEBUG_MEMGUARD options DEBUG_REDZONE The following kernel panic messages were reported: FreeBSD 7.1-BETA2 #0: Mon Nov 10 05:13:21 CST 2008 qj@hostAMD64:/usr/home/qj/gobi/compile/sys/amd64/compile/GENERIC WARNING: WITNESS option enabled, expect reduced performance. MEMGUARD DEBUGGING ALLOCATOR INITIALIZED: MEMGUARD map base: 0xffffffff80e22000 MEMGUARD map limit: 0xffffffff815f7000 MEMGUARD map size: 8212480 (Bytes) Memory modified after free 0xffffff000105bd00(248) val=4 @ 0xffffff000105bdd0 panic: Most recently used by none cpuid = 0 KDB: stack backtrace: db_trace_self_wrapper() at db_trace_self_wrapper+0x2a panic() at panic+0x182 mtrash_ctor() at mtrash_ctor+0x84 uma_zalloc_arg() at uma_zalloc_arg+0x2db malloc() at malloc+0xb6 init_dynamic_kenv() at init_dynamic_kenv+0x6d mi_startup() at mi_startup+0x59 btext() at btext+0x2c KDB: enter: panic [thread pid 0 tid 0 ] Stopped at kdb_enter_why+0x3d: movq $0,0x5fe498(%rip) But after I removed the lines of DEBUG_MEMGUARD and DEBUG_REDZONE, the compiled kernel could boot into the system smoothly. I do not know whether FreeBSD allows the two set of options enabled simultaneouly. But it should be noted that when I compiled the kernel with the same configuration for a i386 system, the kernel panic did not occur. So this issue should be specific for arch AMD64. >How-To-Repeat: Compiled kernel with the following options for arch AMD64: options INVARIANTS options INVARIANT_SUPPORT options DEBUG_MEMGUARD options DEBUG_REDZONE >Fix: Remove options DEBUG_MEMGUARD options DEBUG_REDZONE >Release-Note: >Audit-Trail: >Unformatted: