Derby
  1. Derby
  2. DERBY-5811

8 test failures on IBM iseries - java.security.AccessControlException: Access denied (java.io.FilePermission ... jre/bin/java execute)

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Major Major
    • Resolution: Unresolved
    • Affects Version/s: 10.9.1.0
    • Fix Version/s: None
    • Component/s: Test
    • Environment:
      IBM iseries V6R1, V7R1, ibm 1.5 (SR12 FP1 + IZ94331, build pap32devifx-20110211), 1.6 (SR9+IZ94423, build pap3260sr9ifix-20110211_02). also 64 bit.
    • Urgency:
      Normal

      Description

      On iseries, I see 8 test failures with the 10.9.1.0 RC that do not occur with 10.8.2.2. The test failures occur in the following tets:

      1) org.apache.derbyTesting.functionTests.tests.lang.SequenceGeneratorTest
      test_13_5494
      2) spawnProcess:AutoloadTest(org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest)java.security.AccessControlException: Access denied
      3) spawnProcess:JDBCDriversEmbeddedTest(org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest)
      4) spawnProcess:JDBCDriversClientTest(org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest
      5) spawnProcess:JDBCDriversAllTest(org.apache.derbyTesting.functionTests.tests.jdbcapi.AutoloadTest
      6) testBasicRecovery(org.apache.derbyTesting.functionTests.tests.store.RecoveryTest)
      7) testOCRecovery(org.apache.derbyTesting.functionTests.tests.store.OCRecoveryTest)
      8) testLeak(org.apache.derbyTesting.functionTests.tests.memory.Derby5730Test

      Although I've seen trouble that appears intermittent with the AutoloadTest (see DERBY-5800), this appears different - it's a very specific warning about the jre/bin/java executable lacking the java.io.FilePermission execute.
      As we don't see this on other systems, this at first glance appears to be a jvm issue, or perhaps there are some special permission settings required for the user on iseries to support running these tests (as I'm by no means an iseries specialist, I don't know what these permissions would be).

      There were no failures in derbyall, and there are other tests which launch jvm processes, but I've not found what's different about these tests from others.

      Here's the stack trace from the test output for the first failure on the list:
      test_13_5494(org.apache.derbyTesting.functionTests.tests.lang.SequenceGeneratorTest)java.security.AccessControlException: Access denied (java.io.FilePermission /QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit/jre/bin/java execute)
      at java.security.AccessController.checkPermission(AccessController.java:103)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:558)
      at java.lang.SecurityManager.checkExec(SecurityManager.java:805)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
      at java.lang.Runtime.exec(Runtime.java:607)
      at java.lang.Runtime.exec(Runtime.java:480)
      at org.apache.derbyTesting.junit.BaseTestCase$8.run(BaseTestCase.java:575)
      at java.security.AccessController.doPrivileged(AccessController.java:241)
      at org.apache.derbyTesting.junit.BaseTestCase.execJavaCmd(BaseTestCase.java:571)
      at org.apache.derbyTesting.junit.BaseTestCase.assertExecJavaCmdAsExpected(BaseTestCase.java:507)
      at org.apache.derbyTesting.junit.BaseTestCase.assertLaunchedJUnitTestMethod(BaseTestCase.java:915)
      at org.apache.derbyTesting.functionTests.tests.lang.SequenceGeneratorTest.test_13_5494(SequenceGeneratorTest.java:786)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBareOverridable(BaseJDBCTestCase.java:424)
      at org.apache.derbyTesting.junit.BaseJDBCTestCase.runBare(BaseJDBCTestCase.java:441)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at org.apache.derbyTesting.junit.BaseTestSetup.run(BaseTestSetup.java:57)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)
      at junit.extensions.TestDecorator.basicRun(TestDecorator.java:24)
      at junit.extensions.TestSetup$1.protect(TestSetup.java:21)
      at junit.extensions.TestSetup.run(TestSetup.java:25)

      And here's the one for the last test failure:
      8) testLeak(org.apache.derbyTesting.functionTests.tests.memory.Derby5730Test)java.security.AccessControlException: Access denied (java.io.FilePermission /QOpenSys/QIBM/ProdData/JavaVM/jdk50/32bit/jre/bin/java execute)
      at java.security.AccessController.checkPermission(AccessController.java:103)
      at java.lang.SecurityManager.checkPermission(SecurityManager.java:558)
      at java.lang.SecurityManager.checkExec(SecurityManager.java:805)
      at java.lang.ProcessBuilder.start(ProcessBuilder.java:475)
      at java.lang.Runtime.exec(Runtime.java:607)
      at java.lang.Runtime.exec(Runtime.java:480)
      at org.apache.derbyTesting.junit.BaseTestCase$8.run(BaseTestCase.java:575)
      at java.security.AccessController.doPrivileged(AccessController.java:241)
      at org.apache.derbyTesting.junit.BaseTestCase.execJavaCmd(BaseTestCase.java:571)
      at org.apache.derbyTesting.functionTests.tests.memory.Derby5730Test.testLeak(Derby5730Test.java:64)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:79)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at org.apache.derbyTesting.junit.BaseTestCase.runBare(BaseTestCase.java:113)

      I've done a number of experiments, but the tests consistently fail.

      • modifications to CLASSPATH (with/without derby.jar, derbyrun.jar after, before derby.jar, derbyTesting.jar before/after derbyrun.jar)
      • with/without setting $JAVA_HOME, with/without -Djava.home
      • 32bit, 64bit jvm
      1. d5811repro.jar
        9 kB
        Myrna van Lunteren

        Issue Links

          Activity

          Hide
          Myrna van Lunteren added a comment -

          I think perhaps these tests vary from others in that they either do a new SpawnedProcess(execJavaCmd(cmd)) where the cmd is built from getClass().getName(), or they use the -m option from junit, also causing to spawn off another version of themselves (Recovery and OCRecovery).

          Show
          Myrna van Lunteren added a comment - I think perhaps these tests vary from others in that they either do a new SpawnedProcess(execJavaCmd(cmd)) where the cmd is built from getClass().getName(), or they use the -m option from junit, also causing to spawn off another version of themselves (Recovery and OCRecovery).
          Hide
          Myrna van Lunteren added a comment -

          Attaching a first attempt at reproducing this issue.
          Unfortunately, the repro works fine (does not show a problem) both on my windows laptop, and on the iseries machine (V6R1 with ibm 1.6).
          I'll have to go back to the drawing board...

          still, to use this repro, unjar it, ensure . (the current directory) is in your CLASSPATH, then execute like so:
          java -Djava.security.manager -Djava.security.policy=d5811repro.policy d5811repro

          Show
          Myrna van Lunteren added a comment - Attaching a first attempt at reproducing this issue. Unfortunately, the repro works fine (does not show a problem) both on my windows laptop, and on the iseries machine (V6R1 with ibm 1.6). I'll have to go back to the drawing board... still, to use this repro, unjar it, ensure . (the current directory) is in your CLASSPATH, then execute like so: java -Djava.security.manager -Djava.security.policy=d5811repro.policy d5811repro
          Hide
          Mike Matrigali added a comment -

          When you ran these tests is it likely you were running concurrent tests using different base ports? Trying to figure out if this is a duplicate of DERBY-6178.

          Show
          Mike Matrigali added a comment - When you ran these tests is it likely you were running concurrent tests using different base ports? Trying to figure out if this is a duplicate of DERBY-6178 .
          Hide
          Myrna van Lunteren added a comment -

          No, this is something else, I never ran with -Dderby.tests.basePort on this box.
          I think it was specific to the iseries machine or jvms. (I say 'was' because I currently do not have access to this OS, so I cannot say if this is still the case).

          Show
          Myrna van Lunteren added a comment - No, this is something else, I never ran with -Dderby.tests.basePort on this box. I think it was specific to the iseries machine or jvms. (I say 'was' because I currently do not have access to this OS, so I cannot say if this is still the case).

            People

            • Assignee:
              Unassigned
              Reporter:
              Myrna van Lunteren
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:

                Development