Bug 2036 - Java fails to run on systems with 64K page size with nptl
Summary: Java fails to run on systems with 64K page size with nptl
Status: RESOLVED FIXED
Alias: None
Product: glibc
Classification: Unclassified
Component: nptl (show other bugs)
Version: unspecified
: P2 critical
Target Milestone: ---
Assignee: Ulrich Drepper
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-12-12 23:05 UTC by Steven Munroe
Modified: 2018-04-19 14:12 UTC (History)
1 user (show)

See Also:
Host: powerpc-unknown-linux-gnu
Target: powerpc-unknown-linux-gnu
Build:
Last reconfirmed:
fweimer: security-


Attachments
Large page test case for pthread_create (1.18 KB, text/x-c)
2005-12-12 23:25 UTC, Steven Munroe
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Steven Munroe 2005-12-12 23:05:33 UTC
This problem was raised for the IBM Java-1.4.1 SDK but applies to any program
using nptl where the system page size is larger then PTHREAD_STACK_MIN. This can
happen on powerpc starting with the POWER5+ systems whihc support 64K pages in
hardware.

It does not fail on linuxthreads.

In this case the pthread_create fails because the default value of pthread_attr
for stack_size was set from PTHREAD_STACK_MIN which is a compile time constant.
In this case it was much smaller then the actual page size. 

The other problem is that the test in allocatestack.c that verifies the minimum
allocation for stack space includes the guard page plus 2 additonal pages. This
is ok where the pagesize is less then the PTHREAD_STACK_MIN but gets rediculous
with large pages sizes.
Comment 2 Steven Munroe 2005-12-12 23:25:57 UTC
Created attachment 800 [details]
Large page test case for pthread_create

This is a version of the existing test that adds explicit tests for the
pthread_attr_setstacksize = PTHREAD_STACK_MIN and (2 * sysconf(_SC_PAGESIZE)
cases.
Comment 3 Ulrich Drepper 2005-12-30 21:06:04 UTC
What could be fixed is fixed.  The rest is a problem of the ABI.  The minimum
stack size should have been selected more carefully.  There is nothing which can
be done.  If the stack is too small, it is too small.