The stop() method on TimedBuffer class should be added to critical path of CriticalAnalyzer and it should be synchronised.
This is being applied in Artemis: https://github.com/apache/activemq-artemis/pull/1681 It is already applied in hornetq: commit d4c29e29c472ba90f313c774cd0f96f62006ff12 Author: Clebert Suconic <clebertsuconic> Date: Wed Nov 29 14:58:07 2017 -0500 BZ-1518851 & BZ-1487313 Fixing TimedBuffer and File Sync https://bugzilla.redhat.com/show_bug.cgi?id=1518851 https://bugzilla.redhat.com/show_bug.cgi?id=1487313
Verified with EAP 6.4.19.CP.CR2 Note: Included test is not executed automatically with any profile. Here is PR https://github.com/hornetq/hornetq/pull/2126 with fix.