Bug 43791 - JMeter will use 100%CPU if message broker is stopped
JMeter will use 100%CPU if message broker is stopped
Status: RESOLVED FIXED
Product: JMeter
Classification: Unclassified
Component: Main
2.3
All All
: P2 normal (vote)
: ---
Assigned To: JMeter issues mailing list
:
Depends on:
Blocks:
  Show dependency tree
 
Reported: 2007-11-03 10:18 UTC by Alessio Tomasino
Modified: 2008-07-05 13:22 UTC (History)
1 user (show)



Attachments
Diff file (Receiver.java) (1.45 KB, patch)
2007-11-03 10:21 UTC, Alessio Tomasino
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Alessio Tomasino 2007-11-03 10:18:08 UTC
To reproduce:
1. create a JMS Point-To-Point Sampler
2. run the test
3. stop the JMS broker (I'm using Weblogic Server 10)

Symtoms:
1. Jmeter will use 100% CPU
2. Message to stdout (continuosly repeated):

weblogic.jms.common.IllegalStateException: [JMSClientExceptions:055088]The consu
mer is closed
        at weblogic.jms.client.JMSConsumer.checkClosed(JMSConsumer.java:674)
        at weblogic.jms.client.JMSConsumer.receive(JMSConsumer.java:510)
        at weblogic.jms.client.WLConsumerImpl.receive(WLConsumerImpl.java:167)
        at org.apache.jmeter.protocol.jms.sampler.Receiver.run(Receiver.java:74)

        at java.lang.Thread.run(Thread.java:595)


Root cause:

QueueReceiver is not closed (Receiver.java)

Thanks,

Alessio
Comment 1 Alessio Tomasino 2007-11-03 10:21:12 UTC
Created attachment 21083 [details]
Diff file (Receiver.java)

It closes the JMS QueueReceiver:

	// close consumer, session & connection
		if (consumer != null) {
			try {
				consumer.close();
				if (session != null)
					session.close();
				if (conn != null)
					conn.close();
			} catch (JMSException e) {
				e.printStackTrace();
			}
Comment 2 Sebb 2008-07-05 13:22:33 UTC
Thanks for the report and patch.

Code has been updated in SVN:

URL: http://svn.apache.org/viewvc?rev=674234&view=rev
Log:
Bug 43791 - ensure QueueReceiver is closed