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

Different methods synchronizing on different mutexes when changing the same field

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 5.5.1
    • 5.6.0
    • Broker
    • Darwin phillip.local 9.8.0 Darwin Kernel Version 9.8.0: Wed Jul 15 16:55:01 PDT 2009; root:xnu-1228.15.4~1/RELEASE_I386 i386 i386

    Description

      org.apache.activemq.broker.region.PrefetchSubscription.prefetchExtension is changed while guarded by a mutex on this (PrefetchSubscription) in PrefetchSubscription.pullMessage(...) and PrefetchSubscription.dispatchLock in PrefetchSubscription.acknowledge(...).

      This can lead to the corruption of the prefetchExtension variable (eg, prefetchExtension++ in pullMessage() is not an atomic operation so prefetchExtension may change in acknowledge() mid-way through this operation).

      Attachments

        Activity

          People

            tabish Timothy A. Bish
            philliph Phillip Henry
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: