From owner-freebsd-current@FreeBSD.ORG Tue Jun 25 03:21:32 2013 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id E116E12C for ; Tue, 25 Jun 2013 03:21:32 +0000 (UTC) (envelope-from jroberson@jroberson.net) Received: from mail-pa0-x22a.google.com (mail-pa0-x22a.google.com [IPv6:2607:f8b0:400e:c03::22a]) by mx1.freebsd.org (Postfix) with ESMTP id B6EF51FFA for ; Tue, 25 Jun 2013 03:21:32 +0000 (UTC) Received: by mail-pa0-f42.google.com with SMTP id rl6so11992146pac.15 for ; Mon, 24 Jun 2013 20:21:32 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=date:from:x-x-sender:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version:content-type:x-gm-message-state; bh=WSKAWMuR0u5oqUpLVVolEHRnpTo8GdesRUgDi1i6XXI=; b=gwUH8EWk41PVeLBxKNX5z5k9Jtumcwp++nBkUZgLFHFtywoIx05lGhDLcpv+KPcsiQ F8ff2Tz55GYty121EXPYIP+cNZXceCRf2EWzs/i/WuoVX/i3BSlSwoqMdPXbc5/xRiKu Rt6JSqkha3VsxuRwZE0FAzsZRYKHwbyxFubOb2rXmSG7UnTq4W6igZBaWBfG0c9zEeZO WZY4BV5i633yzJIG71VmAcUBoM4zwjp0MML5B0GIuuS7UEtpw0uZzXpqXQwHll0j9nxK dQ6xCeFMJCCVH0p++ExD8EPDR5wbRorStW7sXrhI0VasvGAAw8g6nKUD1ue3ItbpwQdO jCwg== X-Received: by 10.66.136.16 with SMTP id pw16mr19228102pab.202.1372130492507; Mon, 24 Jun 2013 20:21:32 -0700 (PDT) Received: from rrcs-66-91-135-210.west.biz.rr.com (rrcs-66-91-135-210.west.biz.rr.com. [66.91.135.210]) by mx.google.com with ESMTPSA id kc8sm15009678pbc.18.2013.06.24.20.21.30 for (version=TLSv1 cipher=RC4-SHA bits=128/128); Mon, 24 Jun 2013 20:21:31 -0700 (PDT) Date: Mon, 24 Jun 2013 17:23:34 -1000 (HST) From: Jeff Roberson X-X-Sender: jroberson@desktop To: Ruslan Bukin Subject: Re: Kernel build fails on ARM: Cannot fork: Cannot allocate memory In-Reply-To: <20130623170507.GA79364@mail.bsdpad.com> Message-ID: References: <51C4A067.7010203@semihalf.com> <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> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII; format=flowed X-Gm-Message-State: ALoCoQkH+YICaBuMC8vylhMTx4s/hqSJAHn/goCdgFe2Lj6dWbxwMoh53qsHjOclME2D7thpXAGO Cc: Konstantin Belousov , Zbyszek Bodek , freebsd-current@freebsd.org, freebsd-arm@FreeBSD.org X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 25 Jun 2013 03:21:32 -0000 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. Thanks, Jeff