Uploaded image for project: 'Cassandra'
  1. Cassandra
  2. CASSANDRA-10026

AccessControlException in UFPureScriptTest

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Normal
    • Resolution: Fixed
    • Fix Version/s: 3.0 beta 1
    • Component/s: Legacy/Testing
    • Labels:
      None
    • Severity:
      Normal

      Description

      CASSANDRA-9129 removed JMXEnabledScheduledThreadPoolExecutor and replaced its usage in JavaBasedUDFuntion and ScriptBasedUDFunction with JMXEnabledThreadPoolExecutor as the scheduling capabilities were not required. This causes an AccessControlException as JMXEnabedThreadPoolExecutor & DebuggableThreadPoolExecutor reference internal o.a.c classes which is not permitted by the UDF execution sandbox's SecurityManager.

      JUnit output contains a bunch of

      [junit] Exception: java.security.AccessControlException thrown from the UncaughtExceptionHandler in thread "UserDefinedScriptFunctions:1"
      

      And ultimately fails with:

      [junit] Testcase: testJavascriptSimpleCollections(org.apache.cassandra.cql3.validation.entities.UFPureScriptTest):  Caused an ERROR
      [junit] execution of 'cql_test_keyspace_alt.function_1[list<double>]' failed: java.lang.IllegalArgumentException: Invalid thread ID parameter: 0
      [junit] org.apache.cassandra.exceptions.FunctionExecutionException: execution of 'cql_test_keyspace_alt.function_1[list<double>]' failed: java.lang.IllegalArgumentException: Invalid thread ID parameter: 0
      [junit]     at org.apache.cassandra.exceptions.FunctionExecutionException.create(FunctionExecutionException.java:35)
      [junit]     at org.apache.cassandra.cql3.functions.UDFunction.execute(UDFunction.java:286)
      [junit]     at org.apache.cassandra.cql3.selection.ScalarFunctionSelector.getOutput(ScalarFunctionSelector.java:60)
      [junit]     at org.apache.cassandra.cql3.selection.Selection$SelectionWithProcessing$1.getOutputRow(Selection.java:535)
      [junit]     at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.getOutputRow(Selection.java:363)
      [junit]     at org.apache.cassandra.cql3.selection.Selection$ResultSetBuilder.build(Selection.java:351)
      [junit]     at org.apache.cassandra.cql3.statements.SelectStatement.process(SelectStatement.java:581)
      [junit]     at org.apache.cassandra.cql3.statements.SelectStatement.processResults(SelectStatement.java:348)
      [junit]     at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:364)
      [junit]     at org.apache.cassandra.cql3.statements.SelectStatement.executeInternal(SelectStatement.java:72)
      [junit]     at org.apache.cassandra.cql3.QueryProcessor.executeOnceInternal(QueryProcessor.java:337)
      [junit]     at org.apache.cassandra.cql3.CQLTester.execute(CQLTester.java:654)
      [junit]     at org.apache.cassandra.cql3.validation.entities.UFPureScriptTest.testJavascriptSimpleCollections(UFPureScriptTest.java:89)
      [junit] Caused by: java.lang.IllegalArgumentException: Invalid thread ID parameter: 0
      [junit]     at sun.management.ThreadImpl.verifyThreadIds(ThreadImpl.java:154)
      [junit]     at sun.management.ThreadImpl.verifyThreadCpuTime(ThreadImpl.java:227)
      [junit]     at sun.management.ThreadImpl.getThreadCpuTime(ThreadImpl.java:251)
      [junit]     at sun.management.ThreadImpl.getThreadCpuTime(ThreadImpl.java:222)
      [junit]     at org.apache.cassandra.cql3.functions.UDFunction.executeAsync(UDFunction.java:369)
      [junit]     at org.apache.cassandra.cql3.functions.UDFunction.execute(UDFunction.java:272)
      [junit] 
      [junit] 
      [junit] Test org.apache.cassandra.cql3.validation.entities.UFPureScriptTest FAILED
      

        Attachments

          Activity

            People

            • Assignee:
              samt Sam Tunnicliffe
              Reporter:
              samt Sam Tunnicliffe
              Authors:
              Sam Tunnicliffe
              Reviewers:
              Robert Stupp
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: