activemq-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Manuel Teira <mte...@tid.es>
Subject Client hungs trying to create/delete a temporary queue
Date Thu, 14 Jun 2007 08:44:44 GMT
Hello.

I'm suffering a non deterministic problem when activemq tries to 
create/delete temporary queues from a servlet service method. Basically, 
the servlet service method executes a method that:

1.-Creates a session on a shared connection.
2.-Creates a temporary queue on the session, a consumer on that queue 
and a producer on a fixed destination.
3.-Sends a message using the producer, setting the jmsReplyTo to the 
temporary queue.
4.-Starts the connection (perhaps this could be a problem source, 
because the connection, shared by all the servlet threads,  is going to 
be started a lot of times).
5.-Send the message using the producer.
6.-Receive the message using the consumer.
7.-Closes the session.
8.-Deletes the temporary queue.

I've eventually got a Tomcat with two locked threads: One in :

"http-8080-Processor1" daemon prio=10 tid=0x00127650 nid=0xd in 
Object.wait() [0
x340fe000..0x340ffc28]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Unknown Source)
        at 
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.waitFor(Fut
ureTask.java:267)
        at 
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureT
ask.java:117)
        - locked <0x4cfc65c0> (a 
org.apache.activemq.transport.FutureResponse)
        at 
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse
.java:44)
        - locked <0x4cfc65c0> (a 
org.apache.activemq.transport.FutureResponse)
        at 
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
elator.java:69)
        at 
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1108)
        at 
org.apache.activemq.ActiveMQConnection.createTempDestination(ActiveMQ
Connection.java:1453)
        at 
org.apache.activemq.ActiveMQSession.createTemporaryQueue(ActiveMQSess
ion.java:1103)

and another one in:

"http-8080-Processor8" daemon prio=10 tid=0x00123d38 nid=0x14 in 
Object.wait() [
0x2d47e000..0x2d47fca8]
        at java.lang.Object.wait(Native Method)
        at java.lang.Object.wait(Unknown Source)
        at 
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.waitFor(Fut
ureTask.java:267)
        at 
edu.emory.mathcs.backport.java.util.concurrent.FutureTask.get(FutureT
ask.java:117)
        - locked <0x4cfc6920> (a 
org.apache.activemq.transport.FutureResponse)
        at 
org.apache.activemq.transport.FutureResponse.getResult(FutureResponse
.java:44)
        - locked <0x4cfc6920> (a 
org.apache.activemq.transport.FutureResponse)
        at 
org.apache.activemq.transport.ResponseCorrelator.request(ResponseCorr
elator.java:69)
        at 
org.apache.activemq.ActiveMQConnection.syncSendPacket(ActiveMQConnect
ion.java:1108)
        at 
org.apache.activemq.ActiveMQConnection.deleteTempDestination(ActiveMQ
Connection.java:1475)
        at 
org.apache.activemq.command.ActiveMQTempDestination.delete(ActiveMQTe
mpDestination.java:49)


Once the tomcat server was restarted, it started working fine again 
(without need to restart the broker).

Any idea of what could be happening? I assume that we can use 
Connection.createSession from different threads at the same time, and 
since the rest of the code is always using the different session 
instances, I think that there shouldn't be any reentrant issues.

I'm using activemq 4.0.2 in the production environment. Migrating to 
4.1.1 would be a hard task (involving a lot of testing) that I can not 
assume if we have no proof of this problem to be corrected.

Best regards.


Mime
View raw message