Bug 61569 - JMS Point-to-Point Test Plan: Synchronization issue when putting reply
Summary: JMS Point-to-Point Test Plan: Synchronization issue when putting reply
Status: RESOLVED FIXED
Alias: None
Product: JMeter
Classification: Unclassified
Component: Main (show other bugs)
Version: 2.13
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: JMeter issues mailing list
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2017-09-27 18:21 UTC by Igor Panainte
Modified: 2017-09-27 18:38 UTC (History)
1 user (show)



Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Igor Panainte 2017-09-27 18:21:50 UTC
Hi,

I selected JMSMessageID for request and JMSCorrelationID for response and this correlation doesn't work properly.

lib: ApacheJMeter_jms.jar

I have investigated and found that problem is in concurrency. Producer (FixedQueueExecutor line: 82) send a message, consumer (Receiver line: 134) got a reply before producer save a request in placeholder and try to save it in  placeholder, MessageAdmin(line: 124) try to get a request holder but it was not save till and result will be null and request will fail.

Solution: 
Receiver.java line: 133-135
  
  } else {
      admin.putReply(messageKey, reply);
  }

replace with:
  
  } else {
      synchronized(admin) {
         admin.putReply(messageKey, reply);
      }
  }

I fixed and tested this bug on my local machine after that I didn't have any problem with response fail.

If you need I can provide more details about this bugfix. 

Regards,
Igor
Comment 1 Philippe Mouawad 2017-09-27 18:36:38 UTC
Author: pmouawad
Date: Wed Sep 27 18:36:16 2017
New Revision: 1809895

URL: http://svn.apache.org/viewvc?rev=1809895&view=rev
Log:
Bug 61569 - JMS Point-to-Point Test Plan: Synchronization issue when putting reply
Bugzilla Id: 61569

Modified:
    jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/Receiver.java
    jmeter/trunk/xdocs/changes.xml