Uploaded image for project: 'ActiveMQ'
  1. ActiveMQ
  2. AMQ-6221

ActiveMQTextMessage should synchronize on state changes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Won't Fix
    • Affects Version/s: 5.13.2
    • Fix Version/s: 5.13.3, 5.14.0
    • Component/s: Broker, JMS client
    • Labels:
      None

      Description

      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 in ActiveMQTextMessage.

      Right now ActiveMQTextMessage is the main issue 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 so they aren't currently affected but would need synchronization added in a future commit if the same strategy was followed.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                cshannon Christopher L. Shannon
                Reporter:
                cshannon Christopher L. Shannon
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: