Created attachment 27800 [details] screenshot with strange error r1183374 See attached TP. Run AMQ web admin monitor and open Queues tab - the queue displays "0" (zero) Number of consumers. Run the TP and stop it in few seconds: 1) Jmeter is not stopping - "Shutting does all test treads. Please be patient" message is staying forever; 2) Check AMQ web-console - there are all initiated threads have not been closed its connections; 3) stramge error for "JMS Subscriber - 001" - Response message: javax.naming.NamingException: Something already bound at Elite_To_MorphoTrak; ER: 1) Jmeter stops successfully; 2) AMQ displays "0" consumers against the queue; 3) error for "JMS Subscriber - 001" has to be "0 message(s) received successfully";
Created attachment 27801 [details] JMeter TP
Using "Shutdown" from menu also does not work (same behave as by Stop).
(In reply to comment #0) > Created attachment 27800 [details] > screenshot with strange error > > r1183374 > > See attached TP. > > Run AMQ web admin monitor and open Queues tab - the queue displays "0" (zero) > Number of consumers. > > Run the TP and stop it in few seconds: > > 1) Jmeter is not stopping - "Shutting does all test treads. Please be patient" > message is staying forever; JMeter cannot "shutdown" unless it receives a message because you set timeout to 0 (means no timeout) so JMeter is waiting on receive until it receives a message(I don't see any solution to this unless interrupt is fixed in AMQ so stop will work) My test with Stop works. > 2) Check AMQ web-console - there are all initiated threads have not been closed > its connections; Yes duplicate of bug 51997 > 3) stramge error for "JMS Subscriber - 001" - Response message: > javax.naming.NamingException: Something already bound at Elite_To_MorphoTrak; > This issue is mentionned by many AMQ client and not reproductible with OpenJMS. It is related to ReadOnlyContext and LazyCreateContext in AMQ, maybe you should check AMQ issues. I think it's a concurrency issue in AMQ JNDI layer. Maybe you should submit an issue to AMQ. Test with OpenJMS is OK. > ER: > 1) Jmeter stops successfully; > 2) AMQ displays "0" consumers against the queue; > 3) error for "JMS Subscriber - 001" has to be "0 message(s) received > successfully";
From this issue, the only one I reproduce is: stramge error for "JMS Subscriber - 001" - Response message: > javax.naming.NamingException: Something already bound at Elite_To_MorphoTrak; The other one is duplicate of bug 51997. The first one (Shutdown blocking is regular) and works when Stop is used. I investigated this issue "javax.naming.NamingException: Something already bound". I created a simple test case and tried not to cache Context and it works fine. and in fact it is due to the fact that we cache Context and use it by many threads. From this: http://download.oracle.com/javase/jndi/tutorial/beyond/misc/sync.html I conclude we should not do caching as it is not mandatory that context is Thread Safe (and it's not the case for AMQ one).
Date: Tue Oct 18 20:58:08 2011 New Revision: 1185853 URL: http://svn.apache.org/viewvc?rev=1185853&view=rev Log: Bug 52044 - JMS Subscriber used with many threads leads to javax.naming.NamingException: Something already bound with ActiveMQ Performances impact of No Caching of InitialContext are low. Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java jakarta/jmeter/trunk/xdocs/changes.xml
Date: Wed Oct 19 19:44:57 2011 New Revision: 1186430 URL: http://svn.apache.org/viewvc?rev=1186430&view=rev Log: Bug 52044 - JMS Subscriber used with many threads leads to javax.naming.NamingException: Something already bound with ActiveMQ Revert of modifications Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/Utils.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/Publisher.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/ReceiveSubscriber.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/PublisherSampler.java jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/sampler/SubscriberSampler.java jakarta/jmeter/trunk/xdocs/changes.xml
Date: Wed Oct 19 20:51:36 2011 New Revision: 1186482 URL: http://svn.apache.org/viewvc?rev=1186482&view=rev Log: Bug 52044 - JMS Subscriber used with many threads leads to javax.naming.NamingException: Something already bound with ActiveMQ Added ThreadId in cache key Modified: jakarta/jmeter/trunk/src/protocol/jms/org/apache/jmeter/protocol/jms/client/InitialContextFactory.java jakarta/jmeter/trunk/xdocs/changes.xml
This issue has been migrated to GitHub: https://github.com/apache/jmeter/issues/2609