Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-5099186

Linux: JVM does not work well with exec-shield

    Details

    • Type: Bug
    • Status: Closed
    • Priority: P3
    • Resolution: Duplicate
    • Affects Version/s: 5.0, 6
    • Fix Version/s: None
    • Component/s: hotspot
    • Labels:
      None
    • Subcomponent:
    • CPU:
      generic, x86
    • OS:
      linux

      Description

      A recently introduced security feature (exec-shield) may cause JVM to throw
      StackOverflowException or even die on a crash. The problem is that the
      exec-shield patch randomizes the starting stack pointer so much that the
      main thread is started below (or near) its stack limit.

      Please see Redhat bugzilla:
         https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=126297

      This should not affect pure Java application, as the default Java launcher
      does not have PT_GNU_STACK, so exec-shield should be disabled by default.
      However, native application using JNI_CreateJavaVM to invoke JVM might
      run into troubles on RHEL 3 or Fedora Core 2.

      Anyway, if you are seeing this problem, you could get around the issue
      by disabling exec-shield-randomize, e.g. (run as root):
        sysctl -w kernel.exec-shield-randomize=0
      or,
        echo "0" > /proc/sys/kernel/exec-shield-randomize

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                hhuangsunw Hui Huang (Inactive)
                Reporter:
                hhuangsunw Hui Huang (Inactive)
              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Imported:
                  Indexed: