NetBSD Problem Report #45709
From campbell@mumble.net Tue Dec 13 17:32:04 2011
Return-Path: <campbell@mumble.net>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
by www.NetBSD.org (Postfix) with ESMTP id DC80863BC61
for <gnats-bugs@gnats.NetBSD.org>; Tue, 13 Dec 2011 17:32:03 +0000 (UTC)
Message-Id: <20111213173204.247A5982AB@pluto.mumble.net>
Date: Tue, 13 Dec 2011 17:32:04 +0000 (UTC)
From: Taylor R Campbell <campbell+netbsd@mumble.net>
Reply-To: Taylor R Campbell <campbell+netbsd@mumble.net>
To: gnats-bugs@gnats.NetBSD.org
Subject: tmpfs size went nuts
X-Send-Pr-Version: 3.95
>Number: 45709
>Category: kern
>Synopsis: tmpfs size went nuts
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: kern-bug-people
>State: analyzed
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Tue Dec 13 17:35:00 +0000 2011
>Closed-Date:
>Last-Modified: Thu Dec 05 17:20:03 +0000 2013
>Originator: Taylor R Campbell <campbell+netbsd@mumble.net>
>Release: NetBSD 5.99.58
>Organization:
>Environment:
System: NetBSD oberon.local 5.99.58 NetBSD 5.99.58 (RIAMONOHACK) #4: Sat Dec 10 23:18:29 UTC 2011 root@oberon.local:/home/riastradh/netbsd/current/obj/sys/arch/i386/compile/RIAMONOHACK i386
Architecture: i386
Machine: i386
>Description:
I have three tmpfses mounted, at
/tmp (1 GB)
/var/chroot/pbulk/2011Q3/tmp (2 GB)
/var/chroot/pbulk/current/tmp (1 GB)
Last night I started a bulk build chrooted in
/var/chroot/pbulk/2011Q3. A lot of packages started failing,
and I noticed that `df -h' reported the tmpfses to have a size
(not available space, but size) of 10--20 MB! The exact size
reported by df for each of the tmpfses varied over time between
around ten and twenty megabytes, sometimes ten, sometimes
fifteen, sometimes sixteen, &c. After an hour or so, the
tmpfses returned to their correct sizes of 1 GB or 2 GB.
>How-To-Repeat:
Do a bulk build with wrkobjdir set to a tmpfs in a chroot,
maybe?
>Fix:
Yes, please!
>Release-Note:
>Audit-Trail:
From: dieter roelants <dieter.NetBSD@pandora.be>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45709: tmpfs size went nuts
Date: Thu, 15 Dec 2011 10:49:28 +0100
On Tue, 13 Dec 2011 17:35:00 +0000 (UTC)
Taylor R Campbell <campbell+netbsd@mumble.net> wrote:
> Last night I started a bulk build chrooted in
> /var/chroot/pbulk/2011Q3. A lot of packages started failing,
> and I noticed that `df -h' reported the tmpfses to have a size
> (not available space, but size) of 10--20 MB! The exact size
> reported by df for each of the tmpfses varied over time between
> around ten and twenty megabytes, sometimes ten, sometimes
> fifteen, sometimes sixteen, &c. After an hour or so, the
> tmpfses returned to their correct sizes of 1 GB or 2 GB.
Could it be you didn't have enough free swap? I.e. the tmpfs file
system size seems to be capped by the amount of free memory.
dieter
From: Taylor R Campbell <campbell+netbsd@mumble.net>
To: dieter roelants <dieter.NetBSD@pandora.be>
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: kern/45709: tmpfs size went nuts
Date: Fri, 16 Dec 2011 22:59:31 +0000
Date: Thu, 15 Dec 2011 10:05:03 +0000 (UTC)
From: dieter roelants <dieter.NetBSD@pandora.be>
Could it be you didn't have enough free swap? I.e. the tmpfs file
system size seems to be capped by the amount of free memory.
Unlikely. I had two or three gigabytes of swap handy, and there was
only about a gigabyte of RAM in use at the time, plus a few dozens of
megabytes stored in the tmpfses. So there should have been four or
five gigabytes of memory free, not ten to twenty megabytes.
From: David Holland <dholland-bugs@netbsd.org>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: kern/45709: tmpfs size went nuts
Date: Sat, 17 Dec 2011 02:59:10 +0000
On Fri, Dec 16, 2011 at 11:00:10PM +0000, Taylor R Campbell wrote:
> From: Taylor R Campbell <campbell+netbsd@mumble.net>
> To: dieter roelants <dieter.NetBSD@pandora.be>
> Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
> netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
> Subject: Re: kern/45709: tmpfs size went nuts
> Date: Fri, 16 Dec 2011 22:59:31 +0000
>
> Date: Thu, 15 Dec 2011 10:05:03 +0000 (UTC)
> From: dieter roelants <dieter.NetBSD@pandora.be>
>
> Could it be you didn't have enough free swap? I.e. the tmpfs file
> system size seems to be capped by the amount of free memory.
>
> Unlikely. I had two or three gigabytes of swap handy, and there was
> only about a gigabyte of RAM in use at the time, plus a few dozens of
> megabytes stored in the tmpfses. So there should have been four or
> five gigabytes of memory free, not ten to twenty megabytes.
So, something was truncating to 32 bits? :-/
--
David A. Holland
dholland@netbsd.org
From: Taylor R Campbell <campbell+netbsd@mumble.net>
To: David Holland <dholland-bugs@netbsd.org>
Cc: kern-bug-people@netbsd.org, gnats-admin@netbsd.org,
netbsd-bugs@netbsd.org, gnats-bugs@NetBSD.org
Subject: Re: kern/45709: tmpfs size went nuts
Date: Sat, 17 Dec 2011 03:09:48 +0000
Date: Sat, 17 Dec 2011 03:00:06 +0000 (UTC)
From: David Holland <dholland-bugs@netbsd.org>
On Fri, Dec 16, 2011 at 11:00:10PM +0000, Taylor R Campbell wrote:
> Unlikely. I had two or three gigabytes of swap handy, and there was
> only about a gigabyte of RAM in use at the time, plus a few dozens of
> megabytes stored in the tmpfses. So there should have been four or
> five gigabytes of memory free, not ten to twenty megabytes.
So, something was truncating to 32 bits? :-/
Hmm, sounds plausible, particularly since I'm on i386. The
combination of size_t and uint64_t in tmpfs_bytes_max in tmpfs_subr.c
looks suspect, but it wouldn't surprise me if there were other
problems with this elsewhere in the system.
State-Changed-From-To: open->analyzed
State-Changed-By: rmind@NetBSD.org
State-Changed-When: Thu, 05 Dec 2013 17:20:03 +0000
State-Changed-Why:
Did your tmpfs mounts have any size (memory limit) specified? If there
is no size/limit specified, it currently uses the amount of free memory,
which is, obviously, fluctuating.
How do we want to fix this?
>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-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.