xfs
[Top] [All Lists]

Re: shell filesize limit of 4 GB

To: linux-xfs@xxxxxxxxxxx
Subject: Re: shell filesize limit of 4 GB
From: Todd Raeker <raeker@xxxxxxxxx>
Date: Mon, 5 Nov 2001 14:20:09 -0500
In-reply-to: <20011101171046.E541473@xxxxxxxxxxxxxxxxxxxxxxxx>
References: <01102909435902.11332@chemraeker1> <3BE0C2A6.C1D891BE@xxxxxxxxxxxx> <20011101171046.E541473@xxxxxxxxxxxxxxxxxxxxxxxx>
Sender: owner-linux-xfs@xxxxxxxxxxx
On Thursday 01 November 2001 01:10, Nathan Scott wrote:
> hi Jonathan,
>
> [For the tcsh-bugs@xxxxxxxxx folk, this is a Linux+XFS system
> with glibc 2.2.4, the problem involves setting any high limits
> with large file support enabled - its a tcsh/glibc header file
> interaction bug, by the look of things]
>
> On Wed, Oct 31, 2001 at 10:33:58PM -0500, Jonathan Dill wrote:
> > Steve Lord wrote:
> > > I do know that if you use the limits interface then there is only 4
> > > bytes of space in the kernel to store limits. Which means you cannot
> > > impose a limit of greater than 4G bytes. The rollover you are seeing
> > > is probably because of this. Setting a limit to RLIM_INFINITY which
> > > is 0xffffffff on i386 effectively disables the limit checking and this
> > > is the only way to get into higher order files.
> >
> > How do I set the limit to RLIM_INFINITY?  Trying to do it with the limit
> > command seems to have no effect:
> >
> > [root@amanda ~]# limit -h filesize
> > filesize    4194303 kbytes
> > [root@amanda ~]# limit -h filesize 68719476736
> > [root@amanda ~]# limit -h filesize
> > filesize    0 kbytes
> >
> > It's curious that I was still able to create a 4.7 GB file.  With the
> > old tcsh without -D_FILE_OFFSET_BITS=64, this is what I get even though
> > I can't create > 2 GB files:
> >
> > [root@bit ~]# limit -h filesize
> > filesize    unlimited
> >
> > If I have problems the next time I'm trying to create large files, I
> > guess I'll have to try bash and see what I can do with that.
>
> Okay... I've had another quick look at this problem.  Firstly,
> there is a more recent version of tcsh at http://www.tcsh.org/
> - so, I'm using that one (which has fixed the O_LARGEFILE issue,
> btw).  The limit problem you describe above remains, however.
>
> So, poking around in tcsh-6.11.00/sh.func.c for my first time,
> the problem would appear to be a type-related bug in sh.func.c
> in its definition of RLIM_TYPE.  Try out this patch (and verify
> that you get the "debug" output at compile time)...
>
> diff -Naur tcsh-6.11.00/sh.func.c tcsh-6.11.00-ns/sh.func.c
> --- tcsh-6.11.00/sh.func.c      Tue Mar 13 23:53:50 2001
> +++ tcsh-6.11.00-ns/sh.func.c   Thu Nov  1 16:39:02 2001
> @@ -1720,7 +1720,8 @@
>  #    if defined(_SX)
>        typedef long long RLIM_TYPE;
>  #    else /* _SX */
> -      typedef unsigned long RLIM_TYPE;
> +#     warning debug - using unsigned long long RLIM_TYPE
> +      typedef unsigned long long RLIM_TYPE;
>  #    endif /* _SX */
>  #   endif /* SOLARIS2 || (sgi && SYSVREL > 3) */
>  #  endif /* BSD4_4 && !__386BSD__  */
>
>
> tcsh-6.11.00-ns# ./tcsh
> tcsh-6.11.00-ns# limit filesize
> filesize      unlimited
> tcsh-6.11.00-ns# dd if=/dev/zero of=big bs=1024 seek=687194 count=1
> 1+0 records in
> 1+0 records out
> tcsh-6.11.00-ns# ls -lh big
> -rw-rw-r--    1 root     root         671M Nov  1 16:56 big
> tcsh-6.11.00-ns# dd if=/dev/zero of=bigger bs=1024 seek=6871947673 count=1
> 1+0 records in
> 1+0 records out
> tcsh-6.11.00-ns# ls -lh bigger
> -rw-rw-r--    1 root     root         6.4T Nov  1 16:56 bigger
> tcsh-6.11.00-ns# dd if=/dev/zero of=sick bs=1024 seek=6871947673699 count=1
> 1+0 records in
> 1+0 records out
> tcsh-6.11.00-ns# ls -lh sick
> -rw-rw-r--    1 root     root         6.3P Nov  1 16:57 sick
> tcsh-6.11.00-ns#
> tcsh-6.11.00-ns#
> tcsh-6.11.00-ns# limit filesize 68719476736
> tcsh-6.11.00-ns# limit filesize
> filesize        unlimited
> tcsh-6.11.00-ns#
> tcsh-6.11.00-ns# limit filesize 4194303
> tcsh-6.11.00-ns# limit filesize
> filesize        4194303 kbytes
> tcsh-6.11.00-ns# limit filesize 4194304
> tcsh-6.11.00-ns# limit filesize
> filesize        unlimited
> tcsh-6.11.00-ns# uname -a
> Linux troppo 2.4.14-pre6-xfs #65 Thu Nov 1 13:06:14 EST 2001 i686 unknown
> tcsh-6.11.00-ns#
>
>
> So, that seems to work now - and not an XFS related problem.
> Definately a tcsh bug though.
>
> cheers.

Hi All,

  I started this large file limit issue and am still having problems.  
Applying the patches above and numerous suggestions still limit me to 4 GB 
even though tcsh I have supports large files and limit reports unlimited 
filesize.  

  I even tried the above dd commands and notice that ls -l reports the 
correct size but df shows no change.  More important an intended 6 GB file 
took less than a second to create.

  Has anybody else been working/try to solve this problem and who has advice?

Thanks.

Todd.


-- 
Todd Raeker
Department of Chemistry
University of Michigan
(734) 647-2867 Phone
(734) 615-6950 FAX


<Prev in Thread] Current Thread [Next in Thread>