Uploaded image for project: 'Code Tools'
  1. Code Tools
  2. CODETOOLS-7901032

tests that call setSecurityManager to run with othervm

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • jtreg4.1
    • None
    • tools
    • None
    • b10

      test that call setSecurityManager but does not run with othervm seems does not working well with "agentvm".

      We noticed 30 more such tests failed (in different run, both on windows and linux) due to below exception when run whole jdk langtools tests together with agentvm concurrency:

      java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager

      Here's one example:
      java/security/ProtectionDomain/AllPerm.java

      ----------System.err:(16/963)----------
      java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager
      at com.sun.javatest.regtest.RegressionSecurityManager.forbid(RegressionSecurityManager.java:136)
      at com.sun.javatest.regtest.RegressionSecurityManager.checkPermission(RegressionSecurityManager.java:116)
      at java.lang.System.setSecurityManager0(System.java:299)
      at java.lang.System.setSecurityManager(System.java:290)
      at AllPerm.main(AllPerm.java:60)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
      at java.lang.reflect.Method.invoke(Method.java:484)
      at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
      at java.lang.Thread.run(Thread.java:745)

      JavaTest Message: Test threw exception: java.lang.SecurityException
      JavaTest Message: shutting down test

      result: Failed. Execution failed: `main' threw exception: java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager

      Run with jtreg4.1/b09 with -agentvm -concurrency
      jtreg -agentvm -a -ea -esa -timeoutFactor:4 -J-Xmx512m -vmoption:-Xmx512m -conc:16 -v:fail,error,time -retain:fail,error -ignore:quiet -exclude:jdk/test/ProblemList.txt -exclude:jdk/test/closed/ProblemList.txt -xml:verify -jdk:build/windows-x86_64-normal-server-release/images/j2sdk-image jdk/test:jdk_core jdk/test:jdk_svc langtools/test

          Loading...
          Uploaded image for project: 'Code Tools'
          1. Code Tools
          2. CODETOOLS-7901032

          tests that call setSecurityManager to run with othervm

            • Icon: Bug Bug
            • Resolution: Fixed
            • Icon: P3 P3
            • jtreg4.1
            • None
            • tools
            • None
            • b10

              test that call setSecurityManager but does not run with othervm seems does not working well with "agentvm".

              We noticed 30 more such tests failed (in different run, both on windows and linux) due to below exception when run whole jdk langtools tests together with agentvm concurrency:

              java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager

              Here's one example:
              java/security/ProtectionDomain/AllPerm.java

              ----------System.err:(16/963)----------
              java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager
              at com.sun.javatest.regtest.RegressionSecurityManager.forbid(RegressionSecurityManager.java:136)
              at com.sun.javatest.regtest.RegressionSecurityManager.checkPermission(RegressionSecurityManager.java:116)
              at java.lang.System.setSecurityManager0(System.java:299)
              at java.lang.System.setSecurityManager(System.java:290)
              at AllPerm.main(AllPerm.java:60)
              at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
              at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
              at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
              at java.lang.reflect.Method.invoke(Method.java:484)
              at com.sun.javatest.regtest.MainAction$SameVMRunnable.run(MainAction.java:759)
              at java.lang.Thread.run(Thread.java:745)

              JavaTest Message: Test threw exception: java.lang.SecurityException
              JavaTest Message: shutting down test

              result: Failed. Execution failed: `main' threw exception: java.lang.SecurityException: Action forbidden by jtreg: setSecurityManager

              Run with jtreg4.1/b09 with -agentvm -concurrency
              jtreg -agentvm -a -ea -esa -timeoutFactor:4 -J-Xmx512m -vmoption:-Xmx512m -conc:16 -v:fail,error,time -retain:fail,error -ignore:quiet -exclude:jdk/test/ProblemList.txt -exclude:jdk/test/closed/ProblemList.txt -xml:verify -jdk:build/windows-x86_64-normal-server-release/images/j2sdk-image jdk/test:jdk_core jdk/test:jdk_svc langtools/test

                    jjg Jonathan Gibbons
                    amlu Amy Lu (Inactive)
                    Votes:
                    0 Vote for this issue
                    Watchers:
                    8 Start watching this issue

                      Created:
                      Updated:
                      Resolved:

                        jjg Jonathan Gibbons
                        amlu Amy Lu (Inactive)
                        Votes:
                        0 Vote for this issue
                        Watchers:
                        8 Start watching this issue

                          Created:
                          Updated:
                          Resolved: