You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@artemis.apache.org by "jbertram (via GitHub)" <gi...@apache.org> on 2026/09/10 20:18:25 UTC
[PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
jbertram opened a new pull request, #6690:
URL: https://github.com/apache/artemis/pull/6690
(no comment)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
Posted by "DmN-dev (via GitHub)" <gi...@apache.org>.
DmN-dev commented on PR #6690:
URL: https://github.com/apache/artemis/pull/6690#issuecomment-6167346809
> This is really meant for 3.0 so I've converted it to draft for now. I'll close this and send another one for 3.0 when that branch is ready.
Netty 4.1 will be EOL on July 1st, 2027
https://netty.io/news/2026/09/09/4-1-EOL-announcement.html
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on code in PR #6690:
URL: https://github.com/apache/artemis/pull/6690#discussion_r4207653409
##########
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis:
##########
@@ -124,6 +124,10 @@ if [ -n "$ARTEMIS_SHELL_HISTORY" ]; then
SHELL_HISTORY_ARG="-Dartemis.shell.history=${ARTEMIS_SHELL_HISTORY}"
fi
+# Netty 4.2 only uses Unsafe on JDK 24+ when it's explicitly permitted. However, the broker uses some Unsafe operations
+# via Netty so we must enable it. The option is unrecognized before JDK 23, so it's only added when recognized.
+$JAVACMD --sun-misc-unsafe-memory-access=allow --version > /dev/null 2>&1 && ALLOW_UNSAFE="--sun-misc-unsafe-memory-access=allow"
Review Comment:
I updated the distro scripts. However, I'll address the `--enable-native-access=ALL-UNNAMED` issue in another PR as it's a pre-existing condition not directly related to this PR.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on PR #6690:
URL: https://github.com/apache/artemis/pull/6690#issuecomment-5714189790
Very nice work with this @jbertram !
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
Posted by "AntonRoskvist (via GitHub)" <gi...@apache.org>.
AntonRoskvist commented on code in PR #6690:
URL: https://github.com/apache/artemis/pull/6690#discussion_r4036687781
##########
artemis-cli/src/main/resources/org/apache/activemq/artemis/cli/commands/bin/artemis:
##########
@@ -124,6 +124,10 @@ if [ -n "$ARTEMIS_SHELL_HISTORY" ]; then
SHELL_HISTORY_ARG="-Dartemis.shell.history=${ARTEMIS_SHELL_HISTORY}"
fi
+# Netty 4.2 only uses Unsafe on JDK 24+ when it's explicitly permitted. However, the broker uses some Unsafe operations
+# via Netty so we must enable it. The option is unrecognized before JDK 23, so it's only added when recognized.
+$JAVACMD --sun-misc-unsafe-memory-access=allow --version > /dev/null 2>&1 && ALLOW_UNSAFE="--sun-misc-unsafe-memory-access=allow"
Review Comment:
I think this line needs to be added to `artemis-distribution/src/main/resources/bin/artemis` as well (and I guess the .cmd equivalent also), otherwise the journal auto tune throws a `java.lang.UnsupportedOperationException`
It might also be worth to consider the addition of `--enable-native-access=ALL-UNNAMED` here and in the `artemis-utility.profile` file to get rid of the otherwise quite repetitive warning message:
> WARNING: A restricted method in java.lang.System has been called
> WARNING: java.lang.System::loadLibrary has been called by io.netty.util.internal.NativeLibraryUtil in an unnamed module (file:/...../apache-artemis-2.58...../lib/netty-common-4.2.17.Final.jar)
> WARNING: Use --enable-native-access=ALL-UNNAMED to avoid a warning for callers in this module
> WARNING: Restricted methods will be blocked in a future release unless native access is enabled
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org
Re: [PR] ARTEMIS-5734 upgrade to Netty 4.2 [artemis]
Posted by "jbertram (via GitHub)" <gi...@apache.org>.
jbertram commented on PR #6690:
URL: https://github.com/apache/artemis/pull/6690#issuecomment-6039538566
This is really meant for 3.0 so I've converted it to draft for now. I'll close this and send another one for 3.0 when that branch is ready.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@artemis.apache.org
For additional commands, e-mail: issues-help@artemis.apache.org