Bug 1388911 - [GSS](6.4.z) JMS Server restart causes JMS Clients to hang
Summary: [GSS](6.4.z) JMS Server restart causes JMS Clients to hang
Keywords:
Status: CLOSED EOL
Alias: None
Product: JBoss Enterprise Application Platform 6
Classification: JBoss
Component: HornetQ
Version: 6.4.6
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
: ---
Assignee: jboss-set
QA Contact: Miroslav Novak
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-26 12:42 UTC by Francesco Marchioni
Modified: 2020-02-14 18:03 UTC (History)
3 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2019-08-19 12:44:01 UTC
Type: Bug


Attachments (Terms of Use)
Example application to be deployed on the client (1.92 KB, application/zip)
2016-10-26 12:42 UTC, Francesco Marchioni
no flags Details
EAP Client configuration (21.37 KB, application/xml)
2016-10-26 12:44 UTC, Francesco Marchioni
no flags Details
EAP server configuration (23.48 KB, application/xml)
2016-10-26 12:44 UTC, Francesco Marchioni
no flags Details

Description Francesco Marchioni 2016-10-26 12:42:39 UTC
Created attachment 1214283 [details]
Example application to be deployed on the client

Description of problem:

After an EAP JMS Server is restarted, threads on an EAP JMS Client threads attempting to re-connect to the server via RemoteConnectionFactory will hang. 

Version-Release number of selected component (if applicable): Reproduced on 6.4.6. I was able to reproduce the issue also on the latest CP (10).


How reproducible: 
Attached a sample project which contains a JMS Consumer which is triggered every minute by an EJB Timer. The JMS Consumer is an Asynchronous Stateless EJB. In order to show evidence of the issue, we have configured to fire 5 Consumers and the Async Thread size is set to 5.
When the issue happens, all EJB Threads will be stuck in org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:265)
Additionally, I have noted that the client EAP will be not manageable any more (the native management port will stop listening).


Steps to Reproduce:
1. start the server: ./standalone.sh -c standalone-full-server.xml
2. start the client  ./standalone.sh -c standalone-full-client.xml
3. deploy the jmsclient.war in the client EAP
4. The class Poller.java will schedule 5 Timers
5. When fired the EJB timers will log:

(EJB default - 5) Attempt to Read message
(EJB default - 4) Attempt to Read message
(EJB default - 1) Attempt to Read message
(EJB default - 2) Attempt to Read message
(EJB default - 3) Attempt to Read message

6. Since now, just before the receive timeout elapses (20 seconds) shut down the server and restart it a few seconds later. 

I was able to reproduce it based on the following timeline:
Timer fired [1 min]        Attempt to read message (20 sec)  Timer fired
---------------------------|----------------------|-----------------------------
                                              [Ko] [Restart]
Actual results:
EJB threads are stuck on:
java.lang.Thread.State: TIMED_WAITING
	at java.lang.Object.wait(Native Method)
	- waiting on <5617704b> (a org.hornetq.core.client.impl.ClientConsumerImpl)
	at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:259)
	at org.hornetq.core.client.impl.ClientConsumerImpl.receive(ClientConsumerImpl.java:401)
	at org.hornetq.jms.client.HornetQMessageConsumer.getMessage(HornetQMessageConsumer.java:220)
	at org.hornetq.jms.client.HornetQMessageConsumer.receive(HornetQMessageConsumer.java:129)
	at demo.ProcessQueue.getQueuedRequest(ProcessQueue.java:80)
	at demo.ProcessQueue.process(ProcessQueue.java:44)

You won't see any other:
(EJB default - X) Attempt to Read message 

Expected results:
The EJB threads should not be locked. You should continue to see logging:
(EJB default - X) Attempt to Read message

Additional info: See https://c.na7.visual.force.com/apex/Case_View?id=500A000000VVsxs&sfdc.override=1

Please Note: standalone-full-server.xml and standalone-full-client.xml are attached to the case (01720588)

Comment 1 Francesco Marchioni 2016-10-26 12:44:00 UTC
Created attachment 1214284 [details]
EAP Client configuration

Comment 2 Francesco Marchioni 2016-10-26 12:44:40 UTC
Created attachment 1214285 [details]
EAP server configuration

Comment 3 Francesco Marchioni 2016-10-26 12:46:13 UTC
I have attached here as well the configuration files.


Note You need to log in before you can comment on or make changes to this bug.