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

Linux: JVM does not work well with exec-shield

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: P3 P3
    • None
    • 5.0, 6
    • hotspot
    • None
    • generic, x86
    • linux

      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

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: