NetBSD Problem Report #47672
From jmmv@netbsd.org Wed Mar 20 02:20:03 2013
Return-Path: <jmmv@netbsd.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
by www.NetBSD.org (Postfix) with ESMTP id 61B3863F105
for <gnats-bugs@gnats.NetBSD.org>; Wed, 20 Mar 2013 02:20:03 +0000 (UTC)
Message-Id: <20130320022003.DB2E214A260@mail.netbsd.org>
Date: Wed, 20 Mar 2013 02:20:03 +0000 (UTC)
From: jmmv@netbsd.org
Reply-To: jmmv@netbsd.org
To: gnats-bugs@NetBSD.org
Subject: tmpfs fails to mount
X-Send-Pr-Version: 3.95
>Number: 47672
>Category: kern
>Synopsis: tmpfs fails to mount
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: open
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Wed Mar 20 02:25:01 +0000 2013
>Last-Modified: Wed Mar 20 08:40:03 +0000 2013
>Originator: Julio Merino
>Release: NetBSD 6.99.17
>Organization:
>Environment:
System: NetBSD nbair.virtual.network 6.99.17 NetBSD 6.99.17 (GENERIC) #15: Mon Mar 18 22:07:41 JST 2013 jmmv@nbair.virtual.network:/home/jmmv/os/netbsd/amd64/obj/home/jmmv/os/netbsd/src/sys/arch/amd64/compile/GENERIC amd64
Architecture: x86_64
Machine: amd64
>Description:
When running the NetBSD test suite with Kyua on my machine (not
in QEMU), all the tests that need to mount a tmpfs fail. In fact,
mounting a tmpfs after the test suite has run fails as well
indefinitely and the only solution I've found is to reboot the
machine.
I'm running current amd64 on a VMware virtual machine that has 2
cores and 1GB of RAM.
The way mount_tmpfs fails is due to an EINVAL error returned from
mount(2). Upon further investigation, I found that this is being
returned from tmpfs_mount() in:
if (tmpfs_mem_info(true) < TMPFS_PAGES_RESERVED)
return EINVAL;
The tmpfs_mem_info(true) call is returning 0 and TMPFS_PAGES_RESERVED
is 1024, which of course makes this test fail.
Additionally, I have found the following messages in my dmesg that
might be related:
pmap_unwire: wiring for pmap 0xfffffe800c802670 va 0x7f7ff7b0a000 did not change!
pmap_unwire: wiring for pmap 0xfffffe800c802670 va 0x7f7ff7b0c000 did not change!
pmap_unwire: wiring for pmap 0xfffffe800c802670 va 0x7f7ff7b0f000 did not change!
They appear right before my debugging printf()s in tmpfs_mount(), and
they appeared only once in all my debugging efforts. Probably a
red herring...
If I change the order of the tests in the test suite so that fs/tmpfs/
runs earlier, then the tests pass because mount_tmpfs just works.
So I deduce that either some specific test in the test suite is
messing up the memory (very memory aggressive?), or the amount of
tests run beforehand mess up the memory somehow.
>How-To-Repeat:
Build NetBSD with MKKYUA=yes and run "kyua test" within /usr/tests.
Maybe run it twice.
Interestingly, I cannot get this to fail in qemu but maybe it's
because the qemu VM is quiescent otherwise and nothing interferes
with the tests.
One reason that might explain why this triggers with Kyua and not
with atf-run is that Kyua spawns way more subprocesses while running
tests, which in turn cause more churn on the memory and might explain
this. But if this was the case, running the tests twice in atf-run
should reproduce this (haven't tried). I have verified that Kyua
does not use huge amounts of memory, so this is not the issue.
>Fix:
Dunno, but something is wrong in tmpfs.
>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/47672: tmpfs fails to mount
Date: Wed, 20 Mar 2013 09:38:16 +0100
Sounds like either a amd64 pmap problem or a problem with VMware to me.
Can you get it to fail manually?
Martin
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.