NetBSD Problem Report #43908

From www@NetBSD.org  Sun Sep 26 20:17:42 2010
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [204.152.190.11])
	by www.NetBSD.org (Postfix) with ESMTP id 5974463B9CD
	for <gnats-bugs@gnats.NetBSD.org>; Sun, 26 Sep 2010 20:17:42 +0000 (UTC)
Message-Id: <20100926201741.E510663B9B8@www.NetBSD.org>
Date: Sun, 26 Sep 2010 20:17:41 +0000 (UTC)
From: arto.huusko@pp2.inet.fi
Reply-To: arto.huusko@pp2.inet.fi
To: gnats-bugs@NetBSD.org
Subject: linux32 stat64 does not really work on tmpfs
X-Send-Pr-Version: www-1.0

>Number:         43908
>Category:       kern
>Synopsis:       linux32 stat64 does not really work on tmpfs
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    kern-bug-people
>State:          open
>Class:          sw-bug
>Submitter-Id:   net
>Arrival-Date:   Sun Sep 26 20:20:00 +0000 2010
>Last-Modified:  Tue Nov 02 21:25:01 +0000 2010
>Originator:     Arto Huusko
>Release:        5.99.39
>Organization:
>Environment:
NetBSD mutteri.local 5.99.39 NetBSD 5.99.39 (MUTTERI) #1: Sun Sep 26 22:22:29 EEST 2010  root@maailma.local:/local/scratch/build/nbsd-current/amd64/obj/sys/arch/amd64/compile/MUTTERI amd64

>Description:
stat64 system call in linux32 emulation does not work on files on tmpfs.

Or, that is, the system call itself does work, but when glibc tries
to convert the stat64 struct to normal 32 bit stat, it fails because the
files on tmpfs have huge inode numbers.
>How-To-Repeat:
Try to run linux32 binary that uses ORBit2, and observe endless stream
of:

Can not stat /tmp/orbit-arto
>Fix:
Smaller inode numbers for files on tmpfs?

>Audit-Trail:
From: Martin Husemann <martin@duskware.de>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/43908: linux32 stat64 does not really work on tmpfs
Date: Mon, 27 Sep 2010 13:26:26 +0200

 On Sun, Sep 26, 2010 at 08:20:00PM +0000, arto.huusko@pp2.inet.fi wrote:
 > Smaller inode numbers for files on tmpfs?

 File a PR against glibc?

From: Arto Huusko <arto.huusko@pp2.inet.fi>
To: gnats-bugs@NetBSD.org
Cc: 
Subject: Re: kern/43908
Date: Tue, 02 Nov 2010 21:32:02 +0200

 Presumably, when running 32 bit glibc on top of a really 32 bit linux
 kernel, linux never returns inode numbers over 32 bits. So not a glibc
 bug.

 However, unless smaller inode numbers for tmpfs are not possible, I
 understand this a bug that is not feasible to fix in NetBSD's
 linux32 emulation. To mitigate this:

   - document this in bugs section of compat_linux
   - possibly warn about this in the same way as with too large
     directory offset cookies

From: christos@zoulas.com (Christos Zoulas)
To: gnats-bugs@NetBSD.org, kern-bug-people@netbsd.org, 
	gnats-admin@netbsd.org, netbsd-bugs@netbsd.org, arto.huusko@pp2.inet.fi
Cc: 
Subject: Re: kern/43908
Date: Tue, 2 Nov 2010 17:20:53 -0400

 On Nov 2,  7:35pm, arto.huusko@pp2.inet.fi (Arto Huusko) wrote:
 -- Subject: Re: kern/43908

 | The following reply was made to PR kern/43908; it has been noted by GNATS.
 | 
 | From: Arto Huusko <arto.huusko@pp2.inet.fi>
 | To: gnats-bugs@NetBSD.org
 | Cc: 
 | Subject: Re: kern/43908
 | Date: Tue, 02 Nov 2010 21:32:02 +0200
 | 
 |  Presumably, when running 32 bit glibc on top of a really 32 bit linux
 |  kernel, linux never returns inode numbers over 32 bits. So not a glibc
 |  bug.
 |  
 |  However, unless smaller inode numbers for tmpfs are not possible, I
 |  understand this a bug that is not feasible to fix in NetBSD's
 |  linux32 emulation. To mitigate this:
 |  
 |    - document this in bugs section of compat_linux
 |    - possibly warn about this in the same way as with too large
 |      directory offset cookies

 I don't see why we cannot deal with this in a sane way. Perhaps even
 as kludgy as to have a tmpfs flag not to generate large inodes...

 christos

NetBSD Home
NetBSD PR Database Search

(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.