JDK-4480981 : LINUX: need a different way to detect floating stack pthread lib
  • Type: Bug
  • Component: hotspot
  • Sub-Component: runtime
  • Affected Version: 1.4.0
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • OS: linux
  • CPU: generic
  • Submitted: 2001-07-18
  • Updated: 2002-08-01
  • Resolved: 2002-08-01
Related Reports
Relates :  
Description
As the fix for 4415774, we need to detect if glibc is running in floating
stack mode (i686) or if it's running in old 2M fixed-stack mode (i386).
The detection is done by checking if glibc has the new API pthread_getattr_np().

However, many recent Linux distributions with latest glibc release are
still running in fixed stack mode, since pthread_getattr_np() is present
in glibc since 2.2.3, this can cause VM to believe incorrectly it is running
on floating stack. It may have some performance impact (because 
pthread_getspecific implementation is slow on fixed stack pthread) as
well as making some of the logic look confusing.

Comments
EVALUATION This bug was filed a year ago in anticipation that as the Linux community is shifting to 2.4 kernel, VM might not work well on Linux distributions which are based on 2.4 kernel but still uses libraries built for 2.2 kernels. But as it turns out, VM works quite smoothly on such systems. As the switch to 2.4 kernel is almost completed and we haven't seen any problem that needs a fix for this bug, it's time to close the bug. When the time comes that we can drop support for 2.2 kernels, several layers of hacks, including this floating stack check, can be removed. And we will have a much cleaner Linux port. ###@###.### 2002-08-01
01-08-2002