Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 901214 (JBPAPP6-1661)

Summary: Remote clients trapped in infinite loop
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jitka Kozana <jkudrnac>
Component: RemotingAssignee: David M. Lloyd <david.lloyd>
Status: CLOSED NEXTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.0.1CC: david.lloyd, jkudrnac, lthon, pgier, rjanik, rsvoboda
Target Milestone: ---Keywords: Regression, TestBlocker
Target Release: EAP 6.0.1   
Hardware: Unspecified   
OS: Unspecified   
URL: http://jira.jboss.org/jira/browse/JBPAPP6-1661
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2012-11-30 15:23:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
jboss-remoting-3.2.14.GA-SNAPSHOT.jar none

Description Jitka Kozana 2012-11-28 11:49:34 UTC
project_key: JBPAPP6

At the end of our test case, we could not terminate some of our clients. The termination of our clients is done by setting a "stop" state to the clients. The client runs in an infinite loop and at the beginning of the loop checks its state. But some clients seemed to be trapped in infinite loop in IntIndexHashMap.doPut() and therefore did not pay attention to the changed state. 

Here is the output of the jstack:

{code}
"Runner - 1995" daemon prio=10 tid=0x00007ff068e9f800 nid=0x212e runnable [0x00007fef791c4000]
   java.lang.Thread.State: RUNNABLE
	at org.jboss.remoting3.remote.IntIndexHashMap.doPut(IntIndexHashMap.java:406)
	at org.jboss.remoting3.remote.IntIndexHashMap.putIfAbsent(IntIndexHashMap.java:154)
	at org.jboss.remoting3.remote.RemoteConnectionChannel.writeMessage(RemoteConnectionChannel.java:305)
	at org.jboss.ejb.client.remoting.ChannelAssociation.acquireChannelMessageOutputStream(ChannelAssociation.java:249)
	at org.jboss.ejb.client.remoting.RemotingConnectionEJBReceiver.processInvocation(RemotingConnectionEJBReceiver.java:196)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:181)
	at org.jboss.ejb.client.TransactionInterceptor.handleInvocation(TransactionInterceptor.java:42)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
	at org.jboss.ejb.client.ReceiverInterceptor.handleInvocation(ReceiverInterceptor.java:125)
	at org.jboss.ejb.client.EJBClientInvocationContext.sendRequest(EJBClientInvocationContext.java:183)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:136)
	at org.jboss.ejb.client.EJBInvocationHandler.doInvoke(EJBInvocationHandler.java:121)
	at org.jboss.ejb.client.EJBInvocationHandler.invoke(EJBInvocationHandler.java:104)
	at $Proxy0.getSerialAndIncrement(Unknown Source)
	at org.jboss.smartfrog.clustering.ejb3.StatefulSBProcessorFactoryImpl$EJB3RequestProcessor.processRequest(StatefulSBProcessorFactoryImpl.java:75)
	at org.jboss.smartfrog.loaddriver.CompoundRequestProcessorFactoryImpl$CompoundRequestProcessor.processRequest(CompoundRequestProcessorFactoryImpl.java:52)
	at org.jboss.smartfrog.loaddriver.Runner.run(Runner.java:87)
	at java.lang.Thread.run(Thread.java:662)
{code}

Comment 1 Jitka Kozana 2012-11-28 11:52:04 UTC
Affects Testing: Added: Regression,Blocks Testing


Comment 2 Ladislav Thon 2012-11-28 13:55:22 UTC
Looking at the commits and also bisecting on master (which is currently almost the same as the 3.2 branch) leads me to believe that {{dafe961d658ff9f996b9647ccc896335940399fe}} is the cause. Reverting it made the issue disappear. However, when I tried to do the same on the 3.2 branch (reverting {{c2b9e857bc1a4fcaea40c387d62d72713cafd5ca}}), the issue stays. I'm not sure about possible differences, will look into it more.

Comment 3 Ladislav Thon 2012-11-28 15:03:56 UTC
Bisecting on the 3.2 branch leads me to {{05ecf6598556c653ef3c0bd1a1d5eec4f42d9a9a}}, which looks totally unrelated. Will continue tomorrow.

Comment 4 David M. Lloyd 2012-11-28 15:33:57 UTC
I think there is a simple bug, not a regression per se; it's just that certain circumstances seem to exacerbate it.  Working on a fix now.

Comment 5 David M. Lloyd 2012-11-28 15:43:35 UTC
Link: Added: This issue Cloned to JBPAPP6-1662


Comment 6 David M. Lloyd 2012-11-28 15:45:45 UTC
Would it be possible to test this fix: https://github.com/dmlloyd/jboss-remoting/commit/3e065e2 - this should remove the hang.

Comment 7 Jitka Kozana 2012-11-28 15:50:41 UTC
David, thank you for the quick action, please send me the whole jar.
Jitka

Comment 8 David M. Lloyd 2012-11-28 15:58:11 UTC
Attached the snapshot build at rev 3e065e28e3671d03654f3b0f405c8162d94d2d79

Comment 9 David M. Lloyd 2012-11-28 15:58:11 UTC
Attachment: Added: jboss-remoting-3.2.14.GA-SNAPSHOT.jar


Comment 10 Jitka Kozana 2012-11-28 16:02:58 UTC
Thanks! Testing now.


Comment 11 Jitka Kozana 2012-11-28 17:12:59 UTC
I patched my client with your jar and the test did successfully terminate all clients. 
But the jar you send me is build from master and we are using tag 3.2. Please merge the fix in the 3.2 tag and create me a new jar.
Thank you,
Jitka

Comment 12 David M. Lloyd 2012-11-28 17:28:54 UTC
I don't know what you mean; this is a snapshot build of what would become 3.2.14.GA.

Since it worked though, I will simply tag and release it.

Comment 13 Jitka Kozana 2012-11-29 08:15:16 UTC
Sorry for the confusion. I was somewhat convinced the jar you sent me was built on master branch, even though in the name it says 3.2.14.
Anyway, it fixes the problem.

Comment 14 Jitka Kozana 2012-11-30 07:45:17 UTC
[~dmlloyd] Please add fix version and resolve this issue, thank you.

Comment 15 Rostislav Svoboda 2012-11-30 08:57:57 UTC
Resolving, this should be fixed in EAP 6.0.1 ER4.1.

Setting fix version to ER4 as we don't have ER4.1 added here. Point versions are really pain.

Comment 16 Jitka Kozana 2012-11-30 15:23:36 UTC
Verified during EAP 6.0.1.ER4.1 runs, closing.