bugmake - Bugs: bug #22010, The increased stack rlimit is...


bug #22010: The increased stack rlimit is inherited by the subprocesses to make.

Submitter:  None
Submitted:  Sat 12 Jan 2008 10:23:33 PM UTC
Severity:  3 - Normal Item Group:  Bug
Status:  Fixed Privacy:  Public
Assigned to:  psmith Open/Closed:  Closed
Component Version:  3.81 Operating System:  POSIX-Based
Fixed Release:  3.82 Triage Status:  None
* Mandatory Fields

Add a New Comment Rich Markup

Sun 07 Jun 2009 01:33:23 AM UTC, comment #1: 

Fixed; if I change the stack limit I remember the original value and reset it after forking for a job.  I also added ulimit to the list of shell commands so make will choose the slow path when ulimit is present.

Paul D. Smith <psmith>
Group administrator
Sat 12 Jan 2008 10:23:33 PM UTC, original submission:  

As has been noted in bug #18396, the excessive use of stack in make is not a good thing. But worse is that the increased rlimit is inherited by the subprocesses started by the make.

$ make --version
GNU Make 3.81
Copyright (C) 2006  Free Software Foundation, Inc.
This is free software; see the source for copying conditions.
There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A

This program built for ia64-unknown-linux-gnu
$ cat foo.mk
        : && ulimit -a
$ make -f foo.mk
core file size          (blocks, -c) 0
data seg size           (kbytes, -d) unlimited
scheduling priority             (-e) 0
file size               (blocks, -f) unlimited
pending signals                 (-i) 4056
max locked memory       (kbytes, -l) 128
max memory size         (kbytes, -m) unlimited
open files                      (-n) 1024
pipe size            (512 bytes, -p) 8
POSIX message queues     (bytes, -q) 819200
real-time priority              (-r) 0
stack size              (kbytes, -s) 2097152
cpu time               (seconds, -t) unlimited
max user processes              (-u) 4056
virtual memory          (kbytes, -v) unlimited
file locks                      (-x) unlimited

Ok, that you want to use stack, but wouldn't you say that ~2GB is a bit excessive?

Unfortunately, some parts of glibc aren't prepared for those kinds of stack sizes (eg pthreads, which causes some applications to fail intermittently with SIGSEGV).

Please at least restore the ulimits for the subprocesses.



(Note: upload size limit is set to 16384 kB, after insertion of the required escape characters.)

Attach Files:

No files currently attached


Depends on the following items: None found

Items that depend on this one: None found


Carbon-Copy List
  • -email is unavailable- added by psmith (Posted a comment)

    There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.

    Only logged-in users can vote.


    Follow 5 latest changes.

    Date Changed by Updated Field Previous Value => Replaced by
    2010-07-28 psmith Fixed Release4.0 3.82
    2009-06-07 psmith StatusNone Fixed
        Assigned toNone psmith
        Open/ClosedOpen Closed
        Fixed ReleaseNone 4.0

    Back to the top

    Powered by Savane 3.13-c54d.
    Corresponding source code