[
https://issues.apache.org/jira/browse/ARTEMIS-5134?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Timothy A. Bish resolved ARTEMIS-5134.
--------------------------------------
Fix Version/s: 2.42.0
Resolution: Fixed
> Incorrect address size calculated due to a race condition in AMQP application
> properties decode process
> -------------------------------------------------------------------------------------------------------
>
> Key: ARTEMIS-5134
> URL: https://issues.apache.org/jira/browse/ARTEMIS-5134
> Project: ActiveMQ Artemis
> Issue Type: Bug
> Components: AMQP
> Affects Versions: 2.36.0, 2.37.0, 2.38.0
> Reporter: Jean-Pascal Briquet
> Priority: Major
> Fix For: 2.42.0
>
> Attachments: AMQPDecodeApplicationPropsRaceTest.java
>
>
> *Configuration:*
> - Artemis cluster with queue paging enabled, CORE and AMQP protocols enabled
> and mirroring.
> - Artemis plugin that retrieves a message's application property in the
> afterSend() method for logging purpose.
>
> *When the problem occurs:*
> - The address size has still a residual value even when empty.
> - The address size gradually increases and can exceed the max-size-bytes
> limit, causing Artemis to start paging.
> - Initially, the issue was detected on the $ACTIVEMQ_ARTEMIS_MIRROR_ address
> but appears to occur in standard produce/consume scenario as well.
> - When a message arrives in the queue, paging is enabled, then stops
> immediately after the message is consumed.
>
> *Reproduction:*
> I didn't find a way to slow down the "lazyDecodeApplicationProperties" method.
> However, adding a Thread.sleep as follow in the AMQPMessage class help to
> replicate the issue:
> {code:java}
> protected ApplicationProperties
> lazyDecodeApplicationProperties(ReadableBuffer data) {
> if (applicationProperties == null && applicationPropertiesPosition !=
> VALUE_NOT_PRESENT) {
> try {
> Thread.sleep(10);
> } catch (InterruptedException e) {
> throw new RuntimeException(e);
> }
> applicationProperties = scanForMessageSection(data,
> applicationPropertiesPosition, ApplicationProperties.class);
> ... {code}
> Finally, run the provided test case from
> "tests/integration-tests/src/test/java/org/apache/activemq/artemis/tests/integration/plugin".
--
This message was sent by Atlassian Jira
(v8.20.10#820010)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]
For further information, visit: https://activemq.apache.org/contact