Date: Wed, 26 Jun 2013 14:31:31 +0200 From: Ralf Wenk <iz-rpi03@hs-karlsruhe.de> To: Jeff Roberson <jroberson@jroberson.net> Cc: freebsd-arm@FreeBSD.org Subject: Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory Message-ID: <E1Uroso-0059iO-HN@smtp.hs-karlsruhe.de> In-Reply-To: <alpine.BSF.2.00.1306241719550.95115@desktop> References: <alpine.BSF.2.00.1306201350330.2005@desktop> <51C4A067.7010203@semihalf.com> <alpine.BSF.2.00.1306221636360.43796@desktop> <20130623065706.GV91021@kib.kiev.ua> <20130623083220.GA41511@mail.bsdpad.com> <20130623143248.GA91021@kib.kiev.ua> <20130623144346.GA69378@mail.bsdpad.com> <20130623161617.GC91021@kib.kiev.ua> <20130623164425.GA77339@mail.bsdpad.com> <20130623165040.GD91021@kib.kiev.ua> <20130623170507.GA79364@mail.bsdpad.com> <alpine.BSF.2.00.1306241719550.95115@desktop>
next in thread | previous in thread | raw e-mail | index | archive | help
> On Sun, 23 Jun 2013, Ruslan Bukin wrote: > > > On Sun, Jun 23, 2013 at 07:50:40PM +0300, Konstantin Belousov wrote: > >> On Sun, Jun 23, 2013 at 08:44:25PM +0400, Ruslan Bukin wrote: > >>> On Sun, Jun 23, 2013 at 07:16:17PM +0300, Konstantin Belousov wrote: > >>>> On Sun, Jun 23, 2013 at 06:43:46PM +0400, Ruslan Bukin wrote: > >>>>> > >>>>> Trying to mount root from ufs:/dev/da0 []... > >>>>> WARNING: / was not properly dismounted > >>>>> warning: no time-of-day clock registered, system time will not be set accurately > >>>>> panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289 > >>>>> > >>>>> KDB: enter: panic > >>>>> [ thread pid 1 tid 100001 ] > >>>>> Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! > >>>>> db> bt > >>>>> Tracing pid 1 tid 100001 td 0xc547f620 > >>>>> _end() at 0xde9d0530 > >>>>> scp=0xde9d0530 rlv=0xc1211458 (db_trace_thread+0x34) > >>>>> rsp=0xde9d0514 rfp=0xc12d1b60 > >>>>> Bad frame pointer: 0xc12d1b60 > >>>>> db> > >>>> This is completely broken. It seems that witness triggered the panic, > >>>> and ddb is unable to obtain a backtrace from the normal panic(9) call. > >>>> > >>>> Show the output of the 'show alllocks'. > >>> > >>> No such command > >> Do you have witness in the kernel config ? If not, add it to the config > >> and retry. > > > > Trying to mount root from ufs:/dev/da0 []... > > WARNING: / was not properly dismounted > > warning: no time-of-day clock registered, system time will not be set accurately > > panic: __rw_wlock_hard: recursing but non-recursive rw pmap pv global @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:1289 > > > > KDB: enter: panic > > [ thread pid 1 tid 100001 ] > > Stopped at kdb_enter+0x48: ldrb r15, [r15, r15, ror r15]! > > db> show alllocks > > Process 1 (kernel) thread 0xc55fc620 (100001) > > exclusive sleep mutex pmap (pmap) r = 0 (0xc5600590) locked @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:729 > > exclusive rw pmap pv global (pmap pv global) r = 0 (0xc1479dd0) locked @ /usr/home/br/dev/head/sys/arm/arm/pmap-v6.c:728 > > shared rw vm object (vm object) r = 0 (0xc1551d4c) locked @ /usr/home/br/dev/head/sys/vm/vm_map.c:1809 > > exclusive sx vm map (user) (vm map (user)) r = 0 (0xc5600528) locked @ /usr/home/br/dev/head/sys/kern/imgact_elf.c:445 > > exclusive lockmgr ufs (ufs) r = 0 (0xc56f7914) locked @ /usr/home/br/dev/head/sys/kern/imgact_elf.c:821 > > exclusive sleep mutex Giant (Giant) r = 0 (0xc147c778) locked @ /usr/home/br/dev/head/sys/kern/vfs_mount.c:1093 > > db> > > > > Would any of the arm users be interested in testing a larger patch that > changes the way the kernel allocations KVA? It also has some UMA code > that lessens kernel memory utilization. > > http://people.freebsd.org/~jeff/vmem.diff > > Any reports would be helpful. Is there any ETA on getting stack tracing > fixed? I suspect the pmap recursion encountered with Kostik's patch exist > in the current kernel. The other changes in this patch my fix that as > well. I have tried the patch with CURRENT r252159, EABI and gcc 4.2.1 as the default compiler on my Pi and got the same panic which occurs since r251709. Ralf /boot/kernel/kernel data=0x3ddbe4+0x2447c syms=[0x4+0x8c840+0x4+0x66acf] Hit [Enter] to boot immediately, or any other key for command prompt. Booting [/boot/kernel/kernel]... Using DTB from memory address 0x00000100. Kernel entry at 0x100100... Kernel args: (null) KDB: debugger backends: ddb KDB: current backend: ddb Copyright (c) 1992-2013 The FreeBSD Project. Copyright (c) 1979, 1980, 1983, 1986, 1988, 1989, 1991, 1992, 1993, 1994 The Regents of the University of California. All rights reserved. FreeBSD is a registered trademark of The FreeBSD Foundation. FreeBSD 10.0-CURRENT #0 r252159M: Tue Jun 25 21:01:07 CEST 2013 root@IZ-FreeBSD1:/usr/obj/arm.armv6/home/rpi/head/sys/RPI-Bsc arm gcc version 4.2.1 20070831 patched [FreeBSD] panic: lock "vm map (user)" 0xc06ea050 already initialized KDB: enter: panic [ thread pid 0 tid 0 ] Stopped at $d: ldrb r15, [r15, r15, ror r15]! db> bt Tracing pid 0 tid 0 td 0xc04e4a40 db_trace_self() at db_trace_self pc = 0xc03dddb0 lr = 0xc03dde38 (db_trace_thread+0x4c) sp = 0xc060aaf4 fp = 0xc026d744 db_trace_thread() at db_trace_thread+0x4c pc = 0xc03dde38 lr = 0xc012a650 (db_stack_trace+0xdc) sp = 0xc060ab54 fp = 0xc026d744 db_stack_trace() at db_stack_trace+0xdc pc = 0xc012a650 lr = 0xc0129d30 (db_command+0x2cc) sp = 0xc060ab6c fp = 0xc026d744 r4 = 0xc04b5eb0 r5 = 0x00000000 db_command() at db_command+0x2cc pc = 0xc0129d30 lr = 0xc0129e98 (db_command_loop+0x5c) sp = 0xc060ac0c fp = 0xc026d744 r4 = 0xc060ac20 r5 = 0xc04b6178 r6 = 0x00000000 r7 = 0x00000000 r8 = 0x00000001 r10 = 0x600001d3 db_command_loop() at db_command_loop+0x5c pc = 0xc0129e98 lr = 0xc012c2bc (db_trap+0xe4) sp = 0xc060ac14 fp = 0xc026d744 db_trap() at db_trap+0xe4 pc = 0xc012c2bc lr = 0xc026d980 (kdb_trap+0xa0) sp = 0xc060ad2c fp = 0xc026d744 r4 = 0xc060adc4 kdb_trap() at kdb_trap+0xa0 pc = 0xc026d980 lr = 0xc03ef170 (undefinedinstruction+0x2c8) sp = 0xc060ad4c fp = 0xc026d744 r4 = 0x00000000 r5 = 0x00000000 r6 = 0x00000000 r7 = 0xc060adc4 r8 = 0xe7ffffff r10 = 0xe7ffffff undefinedinstruction() at undefinedinstruction+0x2c8 pc = 0xc03ef170 lr = 0xc03df578 (exception_exit) sp = 0xc060adc4 fp = 0x00000000 r4 = 0xc042efc0 r5 = 0xc0432ac8 r6 = 0xc04e6afc r7 = 0xc060ae44 r8 = 0xc04e4a40 r9 = 0xc06edc60 r10 = 0xc06ea000 exception_exit() at exception_exit pc = 0xc03df578 lr = 0xc03df578 (exception_exit) sp = 0xc060adc4 fp = 0x00000000 Unable to unwind further db>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?E1Uroso-0059iO-HN>