From owner-freebsd-amd64@FreeBSD.ORG Mon Feb 2 22:10:05 2009 Return-Path: Delivered-To: freebsd-amd64@hub.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 767A71065670 for ; Mon, 2 Feb 2009 22:10:05 +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 525358FC1F for ; Mon, 2 Feb 2009 22:10:05 +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 n12MA1wt097637 for ; Mon, 2 Feb 2009 22:10:01 GMT (envelope-from gnats@freefall.freebsd.org) Received: (from gnats@localhost) by freefall.freebsd.org (8.14.3/8.14.3/Submit) id n12MA1Y5097636; Mon, 2 Feb 2009 22:10:01 GMT (envelope-from gnats) Resent-Date: Mon, 2 Feb 2009 22:10:01 GMT Resent-Message-Id: <200902022210.n12MA1Y5097636@freefall.freebsd.org> Resent-From: FreeBSD-gnats-submit@FreeBSD.org (GNATS Filer) Resent-To: freebsd-amd64@FreeBSD.org Resent-Reply-To: FreeBSD-gnats-submit@FreeBSD.org, Ken Merry Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 9A5F3106567A for ; Mon, 2 Feb 2009 22:05:05 +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 6F71B8FC0C for ; Mon, 2 Feb 2009 22:05:05 +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 n12M55nO034194 for ; Mon, 2 Feb 2009 22:05:05 GMT (envelope-from nobody@www.freebsd.org) Received: (from nobody@localhost) by www.freebsd.org (8.14.3/8.14.3/Submit) id n12M55rD034193; Mon, 2 Feb 2009 22:05:05 GMT (envelope-from nobody) Message-Id: <200902022205.n12M55rD034193@www.freebsd.org> Date: Mon, 2 Feb 2009 22:05:05 GMT From: Ken Merry To: freebsd-gnats-submit@FreeBSD.org X-Send-Pr-Version: www-3.1 X-Mailman-Approved-At: Mon, 02 Feb 2009 22:42:39 +0000 Cc: Subject: amd64/131314: large modules fail to load on amd64 X-BeenThere: freebsd-amd64@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting FreeBSD to the AMD64 platform List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 02 Feb 2009 22:10:05 -0000 >Number: 131314 >Category: amd64 >Synopsis: large modules fail to load on amd64 >Confidential: no >Severity: serious >Priority: low >Responsible: freebsd-amd64 >State: open >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: current-users >Arrival-Date: Mon Feb 02 22:10:01 UTC 2009 >Closed-Date: >Last-Modified: >Originator: Ken Merry >Release: 7.1 >Organization: >Environment: >Description: Loading a large module (2.5MB in size) on amd64 panics the kernel. We found a work-around, which was to remove a static structure that was 700K in size. After that the module loads without a problem. The same module worked fine on i386 with the static structure in place. # kldload ./hasc.module Fatal trap 12: page fault while in kernel mode cpuid = 1; apic id = 01 fault virtual address = 0xfffffffffb3b6000 fault code = supervisor write data, page not present instruction pointer = 0x8:0xffffffff8044c49a stack pointer = 0x10:0xfffffffffb11d600 frame pointer = 0x10:0xfffffffffb11d790 code segment = base 0x0, limit 0xfffff, type 0x1b = DPL 0, pres 1, long 1, def32 0, gran 1 processor eflags = interrupt enabled, resume, IOPL = 0 current process = 840 (kldload) [thread pid 840 tid 100106 ] Stopped at 0xffffffff8044c49a = bzero+0xa: repe stosq %es:(%rdi) db> bt Tracing pid 840 tid 100106 td 0xffffff0004c45a50 bzero() at 0xffffffff8044c49a = bzero+0xa linker_load_module() at 0xffffffff802d02cf = linker_load_module+0x8cf kern_kldload() at 0xffffffff802d0847 = kern_kldload+0xa7 kldload() at 0xffffffff802d0934 = kldload+0x84 syscall() at 0xffffffff8044d65b = syscall+0x1cb Xfast_syscall() at 0xffffffff8043346b = Xfast_syscall+0xab --- syscall (304, FreeBSD ELF64, kldload), rip = 0x800683c6c, rsp = +0x7fffffffec38, rbp = 0 --- db> >How-To-Repeat: Come up with a large kernel loadable module. Try to load it on amd64, and see the kernel crash. >Fix: >Release-Note: >Audit-Trail: >Unformatted: