amd64/131314: large modules fail to load on amd64

Ken Merry ken at FreeBSD.org
Mon Feb 2 14:10:05 PST 2009


>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:


More information about the freebsd-amd64 mailing list