This is the mail archive of the
mailing list for the glibc project.
Re: memory limits and thread stack sizes
- From: Andreas Jaeger <aj at suse dot de>
- To: Robert Schweikert <Robert dot Schweikert at abaqus dot com>
- Cc: libc-alpha at sources dot redhat dot com,Robert Schweikert <rjschwei at abaqus dot com>
- Date: Wed, 12 Mar 2003 21:12:03 +0100
- Subject: Re: memory limits and thread stack sizes
- References: <firstname.lastname@example.org>
Robert Schweikert <Robert dot Schweikert at abaqus dot com> writes:
> Hi all I have a couple of questions with respect to glibc and the kernel
> and the SuSE 7.3, 8.0, and 8.1 and RedHat 8.0 distributions. Hopefully
> someone can shed some light into the darkness that I live in at the
> moment. Both problem apply to x86 boxes.
> Problem 1.)
> An executable created by linking Fortran and C++ code seg faults when
> linked with -lpthread but works when not linked against the thread
> - this occurs when using the -auto flag when compiling the Fortran code,
> using the Intel Fortran compiler on SuSE 7.3 (glibc 2.2.4) and SuSE 8.0
> (glibc 2.2.5)
> - this works using the -auto flag when compiling the Fortran code, using
> the Intel Fortran compiler on RedHat 8.0
This could mean that your program uses a too large stack. Red Hat 8
has glibc 2 and if set up properlay allows a larger stack.
> - this works using the -automatic flag when using g77 for the Fortran
> code on all tested distributions (SuSE 7.3, SuSE 8.0, and RedHat 8.0)
g77 and Intel compiler handle this differently.
> According to Intel there is an issue with threads and the thread
> stacksize limit. However, setting the stack limit to 4 MB (limit
> stacksize 4096) and setting the KMP_STACKSIZE environment variable to 4
> MB did not help. The program that is being executed is very short and
> has a small stack thus that the 4MB limit should be more than
> The question now is does anyone know what the SuSE folks did when
> compiling glibc and is there a way for me to work around this problem?
SuSE ships a source RPM, so you can look it up yourself.
> Also does anyone know how SuSE 8.1 behaves with respect to this issue?
The same as older releases. There's a glibc compiled for i686 that
should not have these issues (using floating stacks) but that was
misconfigured unfortunatly :-(
> Problem 2.)
> Allocation of memory past 2GB for 1 process does not appear to work on
> SuSE 7.3 (glibc-2.2.4), not yet tested on RedHat 8.0 and SuSE 8.0. We
> use malloc for pretty much all memory allocation.
What do you mean with allocation? malloc (2GB)? That might be a bug
in glibc. Do you have a sample test program? Please report this
using gnats after having verified that it fails indeed with newer
glibc (2.3.x) releases.
> I have tried to find some detailed info on this with respect to
> distributions and versions of glibc and the kernel but what I found was
> either confusing or very old. Help is much appreciated.
SuSE Labs aj at suse dot de
private aj at arthur dot inka dot de