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

(process) Runtime.exec can fail due to SecurityException (lnx)

    XMLWordPrintable

Details

    • b112
    • generic
    • generic
    • Verified

    Description

      This bug relates to this discussion:
        http://mail.openjdk.java.net/pipermail/core-libs-dev/2010-August/004782.html

      and is probably a regression caused by 6944584.

      Here's how the test fails on Linux:

      Exception in thread "main" java.lang.ExceptionInInitializerError
      at java.util.concurrent.SynchronousQueue.<init>(SynchronousQueue.java:827)
      at java.util.concurrent.SynchronousQueue.<init>(SynchronousQueue.java:817)
      at java.util.concurrent.Executors.newCachedThreadPool(Executors.java:194)
      at java.lang.UNIXProcess.<clinit>(UNIXProcess.java:120)
      at java.lang.ProcessImpl.start(ProcessImpl.java:128)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:1016)
      at java.lang.Runtime.exec(Runtime.java:610)
      at java.lang.Runtime.exec(Runtime.java:448)
      at java.lang.Runtime.exec(Runtime.java:345)
      at SecurityManagerClinit.main(SecurityManagerClinit.java:71)
      Caused by: java.lang.RuntimeException: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.java.util.concurrent")
      at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.<init>(AtomicReferenceFieldUpdater.java:217)
      at java.util.concurrent.atomic.AtomicReferenceFieldUpdater.newUpdater(AtomicReferenceFieldUpdater.java:93)
      at java.util.concurrent.SynchronousQueue$TransferStack.<clinit>(SynchronousQueue.java:294)
      ... 10 more
      Caused by: java.security.AccessControlException: access denied ("java.lang.RuntimePermission" "accessClassInPackage.java.util.concurrent")
      at java.security.AccessControlContext.checkPermission(AccessControlContext.java:345)
      at java.security.AccessController.checkPermission(AccessController.java:555)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:549)
      at java.lang.SecurityManager.checkPackageAccess(SecurityManager.java:1529)
      at sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java:134)
      at sun.reflect.misc.ReflectUtil.checkPackageAccess(ReflectUtil.java:119)
      at java.util.concurrent.atomic.AtomicReferenceFieldUpdater$AtomicReferenceFieldUpdaterImpl.<init>(AtomicReferenceFieldUpdater.java:214)
      ... 12 more

      Attachments

        Issue Links

          Activity

            People

              martin Martin Buchholz
              alanb Alan Bateman
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: