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

JDK17 - fix nodetool_test.TestNodetool.test_sjk

Details

    • Bug
    • Status: Resolved
    • Normal
    • Resolution: Fixed
    • 5.0-alpha1, 5.0
    • CI
    • None

    Description

       
      https://app.circleci.com/pipelines/github/ekaterinadimitrova2/cassandra/2321/workflows/de1f521d-c5cb-4ddd-bc45-9ec71b577bf3/jobs/19923/tests
       

      AssertionError: Expected 'SJK hh' output assert False == True self = <nodetool_test.TestNodetool object at 0x7f9ab6d95908> @since('4.0') def test_sjk(self): """ Verify that SJK generally works. """ cluster = self.cluster cluster.populate([1]).start() node = cluster.nodelist()[0] out, err, _ = node.nodetool('sjk --help') logger.debug(out) hasPattern = False for line in out.split(os.linesep): if " ttop [Thread Top] Displays threads from JVM process" == line: hasPattern = True assert hasPattern == True, "Expected help about SJK ttop" out, err, _ = node.nodetool('sjk') logger.debug(out) hasPattern = False for line in out.split(os.linesep): if " ttop [Thread Top] Displays threads from JVM process" == line: hasPattern = True assert hasPattern == True, "Expected help about SJK ttop" out, err, _ = node.nodetool('sjk hh -n 10 --live') logger.debug(out) hasPattern = False for line in out.split(os.linesep): if re.match('.*Instances.*Bytes.*Type.*', line): hasPattern = True > assert hasPattern == True, "Expected 'SJK hh' output" E AssertionError: Expected 'SJK hh' output E assert False == True nodetool_test.py:482: AssertionError

      Attachments

        Activity

          I already have a fix in my branch for this one, I will take care of it probably tomorrow. It was some export as far as I recall

          e.dimitrova Ekaterina Dimitrova added a comment - I already have a fix in my branch for this one, I will take care of it probably tomorrow. It was some export as far as I recall

          The test fails because of this:

           

          bin/nodetool sjk hh
          java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: class org.gridkit.lab.jvm.attach.AttachManager$AttachManagerInt$VMWarpper (in unnamed module @0x6c779568) cannot access class sun.tools.attach.HotSpotVirtualMachine (in module jdk.attach) because module jdk.attach does not export sun.tools.attach to unnamed module @0x6c779568
          

          From what I tested it seems this is the only sjk command that hits the issue. jvm-attach-api is already on latest 1.5 version and it seems that one was not updated since 2019. 

          Adding below export to jvm17-clients.options solves the problem, I will send mail to dev ML prior running CI:

          --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED

           

          e.dimitrova Ekaterina Dimitrova added a comment - The test fails because of this:   bin/nodetool sjk hh java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.IllegalAccessError: class org.gridkit.lab.jvm.attach.AttachManager$AttachManagerInt$VMWarpper (in unnamed module @0x6c779568) cannot access class sun.tools.attach.HotSpotVirtualMachine (in module jdk.attach) because module jdk.attach does not export sun.tools.attach to unnamed module @0x6c779568 From what I tested it seems this is the only sjk command that hits the issue. jvm-attach-api is already on latest 1.5 version and it seems that one was not updated since 2019.  Adding below export to jvm17-clients.options solves the problem, I will send mail to dev ML prior running CI: --add-exports jdk.attach/sun.tools.attach=ALL-UNNAMED  
          e.dimitrova Ekaterina Dimitrova added a comment - - edited

          Mail sent. I will wait until tomorrow before pushing CI run and posting patch for review here, in case someone on @dev has any concerns. 

          e.dimitrova Ekaterina Dimitrova added a comment - - edited Mail sent . I will wait until tomorrow before pushing CI run and posting patch for review here, in case someone on @dev has any concerns. 

          Patch, CI run
          I ran only the JDK17 tests because the change affects only them. We add the export in the jvm17-clients.options

          e.dimitrova Ekaterina Dimitrova added a comment - Patch , CI run I ran only the JDK17 tests because the change affects only them. We add the export in the jvm17-clients.options

          brandon.williams do you mind to review, please, if you have a few minutes?  

          e.dimitrova Ekaterina Dimitrova added a comment - brandon.williams  do you mind to review, please, if you have a few minutes?  

          +1. Woohoo, all the python dtests pass on j17 now.

          brandon.williams Brandon Williams added a comment - +1. Woohoo, all the python dtests pass on j17 now.

          Committed, thanks!

          Woohoo  

          To https://github.com/apache/cassandra

             b4d4cf716b..de1ff6d4d1  trunk -> trunk

          e.dimitrova Ekaterina Dimitrova added a comment - Committed, thanks! Woohoo   To https://github.com/apache/cassandra     b4d4cf716b..de1ff6d4d1   trunk -> trunk

          People

            e.dimitrova Ekaterina Dimitrova
            e.dimitrova Ekaterina Dimitrova
            Ekaterina Dimitrova
            Brandon Williams
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: