search for: rlimit_as

Displaying 20 results from an estimated 35 matches for "rlimit_as".

2002 Dec 27
1
RLIMIT_AS patch for FreeBSD
Hey, I've just updated the FreeBSD dovecot port to the 0.99.4 beta release, the following patch was needed as FreeBSD has setrlimit(2) but does not define RLIMIT_AS (I believe). I switched the code the require both, alternatively find a parallel option in the FreeBSD setrlimit(2) manual page. ( http://www.freebsd.org/cgi/man.cgi?setrlimit ) You may be interested in integrating this patch. --- src/lib/restrict-process-size.c Fri Dec 27 18:19:41 2002 +++ src/l...
2015 Oct 14
2
[PATCH 1/2] lib: info: Move common code for setting child rlimits.
...(guestfs_h *g, const char *filename) @@ -276,12 +277,7 @@ get_json_output (guestfs_h *g, const char *filename) guestfs_int_cmd_add_arg (cmd, fdpath); guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree, CMD_STDOUT_FLAG_WHOLE_BUFFER); -#ifdef RLIMIT_AS - guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_AS, 1000000000 /* 1GB */); -#endif -#ifdef RLIMIT_CPU - guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); -#endif + set_child_rlimits (cmd); r = guestfs_int_cmd_run (cmd); close (fd); if (r == -1) @@ -560,12 +556,7 @@ o...
2007 Jun 04
1
[LLVMdev] Patch to build on NetBSD
...nix/Program.inc,v retrieving revision 1.24 diff -u -p -r1.24 Program.inc --- Program.inc 23 Apr 2007 07:22:51 -0000 1.24 +++ Program.inc 4 Jun 2007 13:05:22 -0000 @@ -125,11 +125,13 @@ static void SetMemoryLimits (unsigned si r.rlim_cur = limit; setrlimit (RLIMIT_RSS, &r); #endif +#ifdef RLIMIT_AS // e.g. NetBSD doesn't have it. // Virtual memory. getrlimit (RLIMIT_AS, &r); r.rlim_cur = limit; setrlimit (RLIMIT_AS, &r); #endif +#endif } int
1998 Nov 21
2
simple perl script bypasses limits
Any user with shell access, or with access to upload a cgi script can exploit this to make machine thrash badly. Seems to circumvent any limits in the kernel Here are my settings dlai@whale.home.org:/home/dlai?limit cputime unlimited filesize 20000 kbytes datasize 8192 kbytes stacksize 8192 kbytes coredumpsize 1000000 kbytes memoryuse 8192 kbytes descriptors
2008 Jan 15
2
Out of memory [repost as a new thread]
Hi, this happens since a few days on a Gentoo hardened system using a grsecurity enabled kernel running Dovecot 1.0.10, only to 2 of 10 users though: --8<-- kernel: grsec: From 192.168.0.1: denied resource overstep by \ requesting 537325568 for RLIMIT_AS against limit 536870912 \ for /usr/libexec/dovecot/imap[imap:15708] uid/euid:30010/30010 \ gid/egid:30006/30006, parent /usr/sbin/dovecot[dovecot:15574] \ uid/euid:0/0 gid/egid:0/0 kernel: grsec: From 192.168.0.1: denied resource overstep by \ requesting 537321472 for RLIMIT_AS against limit 5...
2016 May 09
2
R process killed when allocating too large matrix (Mac OS X)
On 05/05/2016 10:11, Uwe Ligges wrote: > Actually this also happens under Linux and I had my R processes killed > more than once (and much worse also other processes so that we had to > reboot a server, essentially). I found that setting RLIMIT_AS [1] works very well on Linux. But this requires that you cap memory to some fixed value. > library(RAppArmor) > rlimit_as(1e9) > rnorm(1e9) Error: cannot allocate vector of size 7.5 Gb The RAppArmor package has many other utilities to protect your server such from a mis-behaving process...
2008 Jan 15
4
Dovecot With cygwin
Hi This is jesse. I am running exim as my mail server on cygwin. But i need imap/pop3 for accessing mail. I found that dovecot works on cygwin with some code change. So can i know how to compile dovecot on cygwin. This is important ANYBODY ____________________________________________________________________________________ Be a better friend, newshound, and know-it-all with Yahoo!
2007 Apr 12
3
[LLVMdev] compilation failure on OS X powerpc
...X panther. I am using gcc 4.0.3 installed from Darwin Ports to compile llvm. When I try to compile llvm, I get the following error: llvm[1]: Compiling Program.cpp for Debug build Unix/Program.inc: In function 'void llvm::SetMemoryLimits(unsigned int)': Unix/Program.inc:127: error: 'RLIMIT_AS' was not declared in this scope Does anyone know what the problem is? Regards, Ryan
2015 May 26
0
[PATCH] lib: Limit space and time used by 'qemu-img info' subprocess.
..._int_cmd_add_arg (cmd, "json"); guestfs_int_cmd_add_arg (cmd, fdpath); guestfs_int_cmd_set_stdout_callback (cmd, parse_json, &tree, - CMD_STDOUT_FLAG_WHOLE_BUFFER); + CMD_STDOUT_FLAG_WHOLE_BUFFER); +#ifdef RLIMIT_AS + guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_AS, 1000000000 /* 1GB */); +#endif +#ifdef RLIMIT_CPU + guestfs_int_cmd_set_child_rlimit (cmd, RLIMIT_CPU, 10 /* seconds */); +#endif r = guestfs_int_cmd_run (cmd); close (fd); if (r == -1) @@ -548,6 +562,12 @@ old_parser_run_qemu_img_info...
2007 Feb 18
2
[LLVMdev] LLVM Cygwin build RLIMIT_RSS configuration problem
Hi Aaron, On Sun, 2007-02-18 at 20:43 +0000, Aaron Gray wrote: > Hi Reid, > > Cygwin 'sys/resource.h' has get/setrlimit() functions support for > RLIMIT_DATA and RLIMIT_AS but not RLIMIT_RSS. Then, please fix it to not use RLIMIT_RSS in the cygwin case. Perhaps you should just use RLIMIT_AS for cygwin. It will trigger sooner than RLIMIT_RSS but that's probably okay. Reid. > > Aaron > > ----- Original Message ----- > From: "Reid Spencer&q...
2007 Apr 12
0
[LLVMdev] compilation failure on OS X powerpc
...4.0.3 > installed from Darwin Ports to compile llvm. When I try to compile > llvm, I get the following error: > > llvm[1]: Compiling Program.cpp for Debug build > Unix/Program.inc: In function 'void llvm::SetMemoryLimits(unsigned int)': > Unix/Program.inc:127: error: 'RLIMIT_AS' was not declared in this scope I don't know much about darwin ports. I assume it's an FSF version of GCC? If so, I strongly recommend against using it. FSF GCC has a number of minor ABI differences with Apple GCC. I'd strongly suggest getting and installing Xcode 2.4, it is...
2015 Oct 14
0
[PATCH 2/2] lib: Add comment and regression test for case where main process has large heap.
....img diff --git a/src/command.c b/src/command.c index 0547111..e9f357a 100644 --- a/src/command.c +++ b/src/command.c @@ -558,6 +558,17 @@ run_child (struct command *cmd) } #endif /* HAVE_SETRLIMIT */ + /* NB: If the main process (which we have forked a copy of) uses + * more heap than the RLIMIT_AS we set above, then any call to + * malloc or any extension of the stack will fail with ENOMEM or + * SIGSEGV respectively. Luckily we only use RLIMIT_AS followed by + * execvp below, so we get away with it, but adding any code here + * could cause a failure. + * + * There is a regressi...
2007 Feb 18
0
[LLVMdev] LLVM Cygwin build RLIMIT_RSS configuration problem
...07 9:08 PM Subject: Re: [LLVMdev] LLVM Cygwin build RLIMIT_RSS configuration problem > Hi Aaron, > > On Sun, 2007-02-18 at 20:43 +0000, Aaron Gray wrote: >> Hi Reid, >> >> Cygwin 'sys/resource.h' has get/setrlimit() functions support for >> RLIMIT_DATA and RLIMIT_AS but not RLIMIT_RSS. > > Then, please fix it to not use RLIMIT_RSS in the cygwin case. Perhaps > you should just use RLIMIT_AS for cygwin. It will trigger sooner than > RLIMIT_RSS but that's probably okay. > > Reid. > >> >> Aaron >> >> ----- Original...
2007 Feb 18
0
[LLVMdev] LLVM Cygwin build RLIMIT_RSS configuration problem
Hi Reid, Cygwin 'sys/resource.h' has get/setrlimit() functions support for RLIMIT_DATA and RLIMIT_AS but not RLIMIT_RSS. Aaron ----- Original Message ----- From: "Reid Spencer" <rspencer at reidspencer.com> To: "LLVM Developers Mailing List" <llvmdev at cs.uiuc.edu> Sent: Sunday, February 18, 2007 8:32 PM Subject: Re: [LLVMdev] LLVM Cygwin build RLIMIT_RSS config...
2016 May 11
0
R process killed when allocating too large matrix (Mac OS X)
...2016 01:08, Jeroen Ooms wrote: > On 05/05/2016 10:11, Uwe Ligges wrote: >> Actually this also happens under Linux and I had my R processes killed >> more than once (and much worse also other processes so that we had to >> reboot a server, essentially). > I found that setting RLIMIT_AS [1] works very well on Linux. But this > requires that you cap memory to some fixed value. > >> library(RAppArmor) >> rlimit_as(1e9) >> rnorm(1e9) > Error: cannot allocate vector of size 7.5 Gb > > The RAppArmor package has many other utilities to protect your serve...
2001 Feb 08
0
openssh2.3.0p1 and /etc/limits
...Ported to shadow-login + * by Cristian Gafton - gafton at sorosis.ro + * + * We are passed a string of the form ('BASH' constants for ulimit) + * [Aa][Cc][Dd][Ff][Mm][Nn][Rr][Ss][Tt][Uu][Ll][Pp] + * (eg. 'C2F256D2048N5' or 'C2 F256 D2048 N5') + * where: + * [Aa]: a = RLIMIT_AS max address space (KB) + * [Cc]: c = RLIMIT_CORE max core file size (KB) + * [Dd]: d = RLIMIT_DATA max data size (KB) + * [Ff]: f = RLIMIT_FSIZE Maximum filesize (KB) + * [Mm]: m = RLIMIT_MEMLOCK max locked-in-memory address space (KB) + * [Nn]: n = RLIMIT_NOFILE max number of open files + * [Rr]:...
2016 May 05
2
R process killed when allocating too large matrix (Mac OS X)
On 05.05.2016 04:25, Marius Hofert wrote: > Hi Simon, > > ... all interesting (but quite a bit above my head). I only read > 'Linux' and want to throw in that this problem does not appear on > Linux (it seems). I talked about this with Martin Maechler and he > reported that the same example (on one of his machines; with NA_real_ > instead of '0's in the matrix)
2007 Feb 18
2
[LLVMdev] LLVM Cygwin build RLIMIT_RSS configuration problem
Hi Aaaron, On Sun, 2007-02-18 at 19:50 +0000, Aaron Gray wrote: > In order to get Cygwin working there is a need to add a > HAVE_RLIMIT_RSS and associated logic. This was just recently added. Does cygwin even have getrlimit and setrlimit? IIRC correctly, it doesn't. So, perhaps these functions need to be written differently for Cygwin. What's the equivalent win32 call? If cygwin
2007 Apr 12
2
[LLVMdev] compilation failure on OS X powerpc
...lled from Darwin Ports to compile llvm. When I try to compile >>llvm, I get the following error: >> >>llvm[1]: Compiling Program.cpp for Debug build >>Unix/Program.inc: In function 'void llvm::SetMemoryLimits(unsigned int)': >>Unix/Program.inc:127: error: 'RLIMIT_AS' was not declared in this scope > > > I don't know much about darwin ports. I assume it's an FSF version of > GCC? If so, I strongly recommend against using it. FSF GCC has a number > of minor ABI differences with Apple GCC. I'd strongly suggest getting and &...
2008 Apr 10
1
memory issues with 1.1.rc4 (now it's PAM)
...ault): client in: AUTH 1 PLAIN service=imap lip=NN.NN.NN.NN rip=NNN.NN.NNN.NN lport=143 mail.info; dovecot: auth-worker(default): pam(XXXXXXXXXXXX,NNN.NN.NNN.NN): lookup service=imap kern.alert; kernel: grsec: From NN.NN.NN.NN: denied resource overstep by requesting 134242304 for RLIMIT_AS against limit 134217728 for /us authpriv.err; dovecot-auth: PAM unable to dlopen(/lib/security/pam_unix.so) authpriv.err; dovecot-auth: PAM [error: /lib/security/pam_unix.so: failed to map segment from shared object: Cannot allocate memory] authpriv.err; dovecot-auth: PAM adding faulty module: /lib...