Skip to content

ARTEMIS-5948 Use Varhandle implementations from jctools#6289

Draft
cortlepp wants to merge 2 commits intoapache:mainfrom
cortlepp:safe-jctools-queues
Draft

ARTEMIS-5948 Use Varhandle implementations from jctools#6289
cortlepp wants to merge 2 commits intoapache:mainfrom
cortlepp:safe-jctools-queues

Conversation

@cortlepp
Copy link
Member

@cortlepp cortlepp commented Mar 11, 2026

Artemis currently uses some queues from jctools-core which rely on sun.misc.Unsafe internally. These methods are deprecated in JDK24+, issue a warning at runtime and will be removed in future versions of the JDK. Thus it makes sense to switch to an implementation which does not rely on those methods.

In their latest release JCTools have started to publish a new artifact, jctools-core-jdk11, which contains alternative Varhandle based implementations which do not use Unsafe. As far as I understand them they are designed to be a drop-in replacement to the existing Unsafe implementations.

@clebertsuconic
Copy link
Contributor

If we could wait the 2.53.0 release.. only merge this after 2.53 please?

@cortlepp
Copy link
Member Author

Currently org.apache.activemq.artemis.tests.integration.karaf.ArtemisFeatureTest is failing in JDK 17 and 21 (it passes in JDK 25) on line 152. I can't really tell from the test what the underlying problem is, since the test works with a timeout it might also just be flakiness. If someone knows more about this I would appreciate any advice.

@gemmellr
Copy link
Member

If we could wait the 2.53.0 release.. only merge this after 2.53 please?

I'd agree that would make sense. Its not yet mergeable anyhow though.

@gemmellr
Copy link
Member

Currently org.apache.activemq.artemis.tests.integration.karaf.ArtemisFeatureTest is failing in JDK 17 and 21 (it passes in JDK 25) on line 152. I can't really tell from the test what the underlying problem is, since the test works with a timeout it might also just be flakiness. If someone knows more about this I would appreciate any advice.

Note that the JDK25 fast-tests job passed only because the failing test is not run on JDK25. At least at the time Artemis started working on 25, Karaf didnt work on 25, so those tests had to be omitted.

I believe it failing on the line it is indicates the server bundle failed to start. I seem to recall there being a dir somewhere deep in the target dir where you can find the logs to help diagnose further.

@gemmellr gemmellr marked this pull request as draft March 11, 2026 14:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants