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:
Created attachment 96471 [details] Program to reproduce the problem
NOMINATING to U2 MUSTFIX list per Charline's note of 12/12/03. JUSTIFICATION: Not a acceptable bug.
This is not a bug. See http://www.opengroup.org/onlinepubs/007904975/functions/pthread_attr_setstacksize.html The pthread_attr_setstacksize() function shall fail if: [EINVAL] 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.