Bug 111920 - pthread_attr_setstacksize failure.
pthread_attr_setstacksize failure.
Product: Red Hat Enterprise Linux 3
Classification: Red Hat
Component: glibc (Show other bugs)
ia64 Linux
medium Severity high
: ---
: ---
Assigned To: Jakub Jelinek
Brian Brock
Depends On:
  Show dependency treegraph
Reported: 2003-12-11 11:27 EST by Brett Johnson
Modified: 2007-11-30 17:06 EST (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2003-12-14 14:27:48 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Program to reproduce the problem (677 bytes, text/plain)
2003-12-11 11:28 EST, Brett Johnson
no flags Details

  None (edit)
Description Brett Johnson 2003-12-11 11:27:16 EST
Description of problem:

  When the attached program is compiled and run on rhel3, it fails
with a "Error on pthread_attr_setstacksize: 22".  If it is compiled on
another platform (i.e. debian or SuSe), it runs fine on that platform,
and on rhel3.  If the executable is compiled on rhel3, and executed on
any other platform, it fails with "./stacksize: /lib/libpthread.so.0:
version `GLIBC_2.3.3' not found (required by ./stacksize)"  (Even
though the rhel3 version of glibc reported by rpm is 2.3.2).

Version-Release number of selected component (if applicable):

  2.3.2 or 2.3.3, it's not clear what version rhel3 ships...

How reproducible:

  Every time.

Steps to Reproduce:
1. Compile attached program (gcc -o stacksize -lpthread stacksize.c)
2. Run program
Actual results:

$ ./stacksize
Using thread stack size: 131072
pthread_attr_init done.
Error on pthread_attr_setstacksize: 22

Expected results:

$ ./stacksize
Using thread stack size: 131072
pthread_attr_init done.

Additional info:
Comment 1 Brett Johnson 2003-12-11 11:28:15 EST
Created attachment 96471 [details]
Program to reproduce the problem
Comment 2 Larry Troan 2003-12-14 14:05:01 EST
NOMINATING to U2 MUSTFIX list per Charline's note of 12/12/03.

Not a acceptable bug.
Comment 3 Jakub Jelinek 2003-12-14 14:27:48 EST
This is not a bug.  See
The pthread_attr_setstacksize() function shall fail if:
  The value of stacksize is less than {PTHREAD_STACK_MIN} or exceeds a system-imposed limit.

PTHREAD_STACK_MIN is 196608 on IA-64 (both linuxthreads and NPTL
headers define this value), so pthread_attr_setstacksize must return EINVAL
in your testcase.

PTHREAD_STACK_MIN used to be 16384 in the past on all Linux architectures
which obviously was a bug, on IA-64 that is even less than a page
(which is up to 64K), while at least a guard page, a stack page, some room
for thread stack address cache coloring and some room for backing
store is needed.  16384 is an appropriate value for 4K page size architectures
like IA-32.

Note You need to log in before you can comment on or make changes to this bug.