Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-73980

Killing threads not possible while using Java21

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • monitoring-plugin
    • None
    • Jenkins 2.462.1 Java 21

      Hello,

      When I click kill thread button on /monitoring page, I got following error:

      Caught unhandled exception with ID 53bf818a-5713-408c-aebe-0578be8d7232
      java.lang.UnsupportedOperationException
      	at java.base/java.lang.Thread.stop(Unknown Source)
      	at PluginClassLoader for monitoring//net.bull.javamelody.internal.model.Action.stopThread(Action.java:554)
      	at PluginClassLoader for monitoring//net.bull.javamelody.internal.model.Action.killThread(Action.java:540)
      	at PluginClassLoader for monitoring//net.bull.javamelody.internal.model.Action.execute(Action.java:292)

      Issue does not occur when I click same button on Jenkins instance based on Java 17

      Looks like Thread.stop method was removed from Java 21

      https://docs.oracle.com/en/java/javase/21/docs/api/java.base/java/lang/doc-files/threadPrimitiveDeprecation.html

       

            evernat evernat
            jgalda Jan Gałda
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated:
              Resolved: