You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@activemq.apache.org by "Christopher L. Shannon (JIRA)" <ji...@apache.org> on 2016/03/22 15:55:25 UTC

[jira] [Created] (AMQ-6221) ActiveMQ messages should synchronize on state changes

Christopher L. Shannon created AMQ-6221:
-------------------------------------------

             Summary: ActiveMQ messages should synchronize on state changes
                 Key: AMQ-6221
                 URL: https://issues.apache.org/jira/browse/AMQ-6221
             Project: ActiveMQ
          Issue Type: Bug
          Components: Broker, JMS client
    Affects Versions: 5.14.0
            Reporter: Christopher L. Shannon
            Assignee: Christopher L. Shannon


In AMQ-5857, the text field was changed to be cleared after calling beforeMarshall on a text message.  This is causing general concurrency issues when multiple threads access the message.  The most notable issue is when using the VM transport and concurrent store and dispatch is turned on for KahaDB as seen in AMQ-6218.  In that ticket I re-arranged the order a bit on copy to help with the race condition but it is still theoretically possible.  We need to add explicit synchronization when reading/writing the marshalled/unmarshalled state fields to prevent the race condition.

Right now ActiveMQTextMessage is the most noticable example since it has been changed to clear out text on marshalling by default.   Map and Object messages don't currently clear out their data by default like text message does but they could be affected if their clearMarshalledState() methods are called, such as when reduceMemoryFootprint is turned on. 



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)