NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: kern/41215: cannot load miniroot as kmod, kernel heap full



The following reply was made to PR kern/41215; it has been noted by GNATS.

From: Lubomir Sedlacik <salo%Xtrmntr.org@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: kern/41215: cannot load miniroot as kmod, kernel heap full
Date: Thu, 16 Apr 2009 01:20:52 +0200

 On Wed, Apr 15, 2009 at 08:15:05AM +0000, Andrew Doran wrote:
 >  Can you try increasing the heap size in the boot loader?
 >  IIRC it is in CPPFLAGS in one of the Makefiles under i386/stand/boot.
 
 Tried that, got a bit further but still no dice:
 
 Index: Makefile.boot
 ===================================================================
 RCS file: /cvsroot/src/sys/arch/i386/stand/boot/Makefile.boot,v
 retrieving revision 1.40
 diff -u -p -r1.40 Makefile.boot
 --- Makefile.boot       30 Mar 2009 09:22:52 -0000      1.40
 +++ Makefile.boot       15 Apr 2009 23:08:43 -0000
 @@ -81,7 +81,7 @@ CPPFLAGS+= -DEPIA_HACK
  # The biosboot code is linked to 'virtual' address of zero and is
  # loaded at physical address 0x10000.
  # XXX The heap values should be determined from _end.
 -SAMISCCPPFLAGS+= -DHEAP_START=0x30000 -DHEAP_LIMIT=0x50000
 +SAMISCCPPFLAGS+= -DHEAP_START=0x30000 -DHEAP_LIMIT=0x60000
  SAMISCMAKEFLAGS+= SA_USE_CREAD=yes     # Read compressed kernels
  SAMISCMAKEFLAGS+= SA_INCLUDE_NET=no    # Netboot via TFTP, NFS
 
 ---
 
 8509704+406516+538152 [462032+449388]=0x9e473c
 Loading /miniroot.kmod  
 Loading ffs  
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.
 [...]
 boot device: wd0
 root on md0a dumps on md0b
 root file system type: ffs
 exec /sbin/init: error 8
 init: trying /sbin/oinit
 exec /sbin/oinit: error 2
 init: trying /sbin/init.bak
 exec /sbin/init.bak: error 2
 init path (default /sbin/init): 
 
 ---
 
 Given that errno 8 is "Exec format error", I tried to force load exec_elf32:
 
 8509704+406516+538152 [462032+449388]=0x9e473c
 Loading /miniroot.kmod  
 Loading exec_elf32  
 Loading ffs  
 Copyright (c) 1996, 1997, 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005,
     2006, 2007, 2008, 2009
     The NetBSD Foundation, Inc.  All rights reserved.
 Copyright (c) 1982, 1986, 1989, 1991, 1993
     The Regents of the University of California.  All rights reserved.
 [...]
 attimer0: attached to pcppi0
 uvm_fault(0xc09db680, 0, 1) -> 0xe
 fatal page fault in supervisor mode
 trap type 6 code 0 eip c069d5b5 cs 8 eflags 206 cr2 14 ilevel 0
 kernel: supervisor trap page fault, code=0
 Stopped in pid 0.1 (system) at  netbsd:_atomic_inc_32+0x5:      incl    0(%edx)
 db{0}> t
 
_atomic_inc_32(c0e1fbc4,ca420d80,0,c090a90f,73,c0e1fcb4,0,32,c0976480,ca42af00) 
at netbsd:_atomic_inc_32+0x5
 vn_open(c0e1fbc4,1,0,ca41faa4,0,c09c1be4,c0e1fbe8,c044fa2c,c0976480,cb0a2c00) 
at netbsd:vn_open+0x80
 
kobj_load_file(ca41faac,c0e1fcac,c09bc020,1,140cd80,0,1e1fc70,c0e1fc6c,c09c1be4,
 0) at netbsd:kobj_load_file+0x94
 module_do_load(0,ca41f968,0,1,0,0,e1fce8,c04429b8,c0de7b68,c0de7b42) at 
netbsd:module_do_load+0x2c5
 module_do_load(0,0,0,0,0,e1d000,c0e1fd38,c03d41a7,0,c09c3300) at 
netbsd:module_do_load+0x435
 module_init_class(0,c09c3300,c0e1fd38,c03d4134,0,0,0,0,0,0) at 
netbsd:module_init_class+0xa2
 main(0,c01002cd,0,0,0,0,0,0,0,0) at netbsd:main+0x227
 
 ---
 
 Not sure if the heap is too big now or whether there is something else
 going wrong.  E.g., 0x55000 was enough to load miniroot and ffs but not
 enough for miniroot, ffs and exec_elf32.
 
 
 -- 
 -- Lubomir Sedlacik <salo@{NetBSD,Xtrmntr,silcnet}.org>   --
 


Home | Main Index | Thread Index | Old Index