* zsh-2.6beta20 doesn't compile under Linux pre2.0.14 @ 1996-06-07 20:31 jkroeger 1996-06-10 17:03 ` Zoltan Hidvegi 1996-06-13 0:25 ` Felix von Leitner 0 siblings, 2 replies; 5+ messages in thread From: jkroeger @ 1996-06-07 20:31 UTC (permalink / raw) To: zsh-users Recent Linux kernels introduced a new limit for the address space of a process: #define RLIMIT_AS 9 /* address space limit */ This makes compiling zsh fail with the following error message: builtin.c:3539: #error there are some unknown limits. Fix me! make[1]: *** [builtin.o] Error 1 make[1]: Leaving directory `/usr/src/bin/zsh-2.6-beta20/Src' make: *** [Src] Error 2 Unfortunately I don't know how to fix zsh so that it can handle the new resource limit :-( -- Johannes Kroeger <jkroeger@squirrel.owl.de> Send me mail with subject "send pgp-key" to get my PGP key ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14 1996-06-07 20:31 zsh-2.6beta20 doesn't compile under Linux pre2.0.14 jkroeger @ 1996-06-10 17:03 ` Zoltan Hidvegi 1996-06-10 17:39 ` Steven L Baur 1996-06-12 15:52 ` Johannes Kroeger 1996-06-13 0:25 ` Felix von Leitner 1 sibling, 2 replies; 5+ messages in thread From: Zoltan Hidvegi @ 1996-06-10 17:03 UTC (permalink / raw) To: jkroeger; +Cc: zsh-users > Recent Linux kernels introduced a new limit for the address space of a process: > > #define RLIMIT_AS 9 /* address space limit */ > > This makes compiling zsh fail with the following error message: > > builtin.c:3539: #error there are some unknown limits. Fix me! > make[1]: *** [builtin.o] Error 1 > make[1]: Leaving directory `/usr/src/bin/zsh-2.6-beta20/Src' > make: *** [Src] Error 2 > > Unfortunately I don't know how to fix zsh so that it can handle the new > resource limit :-( It is surprising that the there days before the final 2.0 release a new feature appeared. Here is the patch. I think zsh will be the first shell which can set this new limit. There is no patch to the manual simply because I do not know what is this limit. Also a new flag should be inveted to set this limit with ulimit. Please tell me your suggestions. Zoltan *** Src/builtin.c 1996/06/06 17:23:43 2.39 --- Src/builtin.c 1996/06/10 16:53:08 *************** *** 3535,3540 **** --- 3535,3545 ---- # define NEXT_RLIM (RLIMIT_MEMLOCK + 1) "memorylocked", # endif /* RLIMIT_MEMLOCK */ + # if defined RLIMIT_AS && RLIMIT_AS == NEXT_RLIM + # undef NEXT_RLIM + # define NEXT_RLIM (RLIMIT_AS + 1) + "addressspace", + # endif /* RLIMIT_AS */ # if NEXT_RLIM != RLIM_NLIMITS #error there are some unknown limits. Fix me! # endif *************** *** 3957,3962 **** --- 3962,3973 ---- limit /= 1024; break; # endif /* RLIMIT_VMEM */ + # ifdef RLIMIT_AS + case RLIMIT_AS: + printf("address space (kb) "); + limit /= 1024; + break; + # endif /* RLIMIT_AS */ } /* display the limit */ if (limit == RLIM_INFINITY) ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14 1996-06-10 17:03 ` Zoltan Hidvegi @ 1996-06-10 17:39 ` Steven L Baur 1996-06-12 15:52 ` Johannes Kroeger 1 sibling, 0 replies; 5+ messages in thread From: Steven L Baur @ 1996-06-10 17:39 UTC (permalink / raw) To: zsh-users >>>>> "Zoltan" == Zoltan Hidvegi <hzoli@cs.elte.hu> writes: (Your patch produces a compilable zsh on Linux 2.0, thanks). Zoltan> It is surprising that the there days before the final 2.0 Zoltan> release a new feature appeared. Here is the patch. I think Zoltan> zsh will be the first shell which can set this new limit. Zoltan> There is no patch to the manual simply because I do not know Zoltan> what is this limit. Also a new flag should be inveted to set Zoltan> this limit with ulimit. It's related to the problem found recently where ``grep x /dev/zero'' would crash the system. I don't believe it does anything, at least I haven't found any code via grep in the kernel source that does anything with it. Zoltan> Please tell me your suggestions. Here's the only authoritative information about it I'm aware of: X-From-Line: owner-linux-kernel-outgoing@vger.rutgers.edu Fri Jun 7 17:17:37 1996 Return-Path: owner-linux-kernel-outgoing@vger.rutgers.edu Received: from wolverine.hq.cic.net (work.nether.net [198.87.18.3]) by deanna.miranova.com (8.7.5/8.6.9) with ESMTP id RAA23647 for <steve@miranova.com>; Fri, 7 Jun 1996 17:17:36 -0700 Received: from vger.rutgers.edu (vger.rutgers.edu [128.6.190.2]) by wolverine.hq.cic.net (8.7.5/8.6.9+jared) with ESMTP id UAA12029; Fri, 7 Jun 1996 20:08:13 -0400 Received: by vger.rutgers.edu id <106459-20973>; Fri, 7 Jun 1996 07:46:19 -0500 Date: Fri, 7 Jun 1996 09:22:26 +0300 (EET DST) From: Linus Torvalds <torvalds@cs.helsinki.fi> To: Michael Meskes <meskes@informatik.rwth-aachen.de> cc: Linux-Kernel Mailinglist <linux-kernel@vger.rutgers.edu> Subject: Re: the mmap() problem, a'la "grep x /dev/zero" In-Reply-To: <199606070607.IAA00447@circe.informatik.rwth-aachen.de> Message-ID: <Pine.LNX.3.91.960607091748.10892A-100000@linux.cs.Helsinki.FI> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-linux-kernel@vger.rutgers.edu Precedence: bulk Lines: 33 Xref: deanna.miranova.com linux-kernel:1385 On Fri, 7 Jun 1996, Michael Meskes wrote: > > circe:meskes 105) grep x /dev/zero > grep: memory exhausted Umm, this looks ok - that's what supposed to happen. Linux can't fix the fact that grep doesn't work well on /dev/null (or any file that is that huge), but at least the above isn't a crash.. > It allocated much more memory than it should. I had a limit of 4MB, but the > size went up to 12MB (5MB resident). Umm, _what_ size? If you set a RLIMIT_DATA (or whatever the name is), that will only make a difference for the process bss (*), and if grep uses mmap(), then we'd need to have a "virtual memory" limit. However, we don't have any such limit, although I added a RLIMIT_AS for 2.0 (but it's currently unchecked). (*) that's the curent Linux interpretation, at least. Do other unixes consider mmap'ed data part of RLIMIT_DATA? > Also I was able to run the memtest > program on 8MB despite datasize limited to 1MB. Hmm I have to check the > sources to see what happened. And my program with a global definition of > 'char a[128MB]' still dumpos core. Well, dumping core is the corect thing to do - it failed to get the BSS at exec time, so when the program actually ran it was "kind of" unhappy.. Linus -- steve@miranova.com baur Unsolicited commercial e-mail will be proofread for $250/hour. Andrea Seastrand: For your vote on the Telecom bill, I will vote for anyone except you in November. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14 1996-06-10 17:03 ` Zoltan Hidvegi 1996-06-10 17:39 ` Steven L Baur @ 1996-06-12 15:52 ` Johannes Kroeger 1 sibling, 0 replies; 5+ messages in thread From: Johannes Kroeger @ 1996-06-12 15:52 UTC (permalink / raw) To: hzoli; +Cc: zsh-users Hello Zoltan, Thank you for your quick patch. As Steven L Baur <steve@miranova.com> noticed in <m2hgsjimn9.fsf@deanna.miranova.com>, RLIMIT_AS is only defined in <asm/resource.h> but not yet used in the kernel. >[...]. Also a new flag should be invented to set this limit with ulimit. >Please tell me your suggestions. RLIMIT_AS is only defined for the Intel, Alpha and Mips architectures. <asm-i386/resource.h> and <asm-alpha/resource.h> have no RLIMIT_VMEM, and <asm-mips/resource.h> has the following definition: #define RLIMIT_VMEM 6 /* mapped memory */ #define RLIMIT_AS RLIMIT_VMEM So it seems that 'ulimit -v' and 'limit vmemorysize' are the right commands to control the new resource limit. Anyway, I would recommend you to ask the gurus in the linux-kernel list about the intended implementation of the "address space limit". Cheers, Johannes -- Johannes Kroeger <jkroeger@squirrel.owl.de> Send me mail with subject "send pgp-key" to get my PGP key ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: zsh-2.6beta20 doesn't compile under Linux pre2.0.14 1996-06-07 20:31 zsh-2.6beta20 doesn't compile under Linux pre2.0.14 jkroeger 1996-06-10 17:03 ` Zoltan Hidvegi @ 1996-06-13 0:25 ` Felix von Leitner 1 sibling, 0 replies; 5+ messages in thread From: Felix von Leitner @ 1996-06-13 0:25 UTC (permalink / raw) To: jkroeger; +Cc: zsh-users Thus spake jkroeger@squirrel.owl.de (jkroeger@squirrel.owl.de): > Recent Linux kernels introduced a new limit for the address space of a process: > #define RLIMIT_AS 9 /* address space limit */ > This makes compiling zsh fail with the following error message: > builtin.c:3539: #error there are some unknown limits. Fix me! > make[1]: *** [builtin.o] Error 1 > make[1]: Leaving directory `/usr/src/bin/zsh-2.6-beta20/Src' > make: *** [Src] Error 2 Apply this diff, it works for me. Felix --- Src/builtin.c Thu Jun 13 02:23:09 1996 +++ Src/builtin.c.new Thu Jun 13 02:22:49 1996 @@ -3535,6 +3535,11 @@ # define NEXT_RLIM (RLIMIT_MEMLOCK + 1) "memorylocked", # endif /* RLIMIT_MEMLOCK */ +# if defined RLIMIT_AS && RLIMIT_AS == NEXT_RLIM +# undef NEXT_RLIM +# define NEXT_RLIM (RLIMIT_AS + 1) + "addressspace", +# endif /* RLIMIT_AS */ # if NEXT_RLIM != RLIM_NLIMITS #error there are some unknown limits. Fix me! # endif ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~1996-06-13 0:41 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 1996-06-07 20:31 zsh-2.6beta20 doesn't compile under Linux pre2.0.14 jkroeger 1996-06-10 17:03 ` Zoltan Hidvegi 1996-06-10 17:39 ` Steven L Baur 1996-06-12 15:52 ` Johannes Kroeger 1996-06-13 0:25 ` Felix von Leitner
Code repositories for project(s) associated with this public inbox https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).