Bug 1094380
Summary: | (6.4.z) Multi threaded ejb invocations via remote-naming produce EJBCLIENT000025 if the Context is closed | ||||||
---|---|---|---|---|---|---|---|
Product: | [JBoss] JBoss Enterprise Application Platform 6 | Reporter: | wfink | ||||
Component: | Naming | Assignee: | Enrique Gonzalez Martinez <egonzale> | ||||
Status: | CLOSED CURRENTRELEASE | QA Contact: | Jan Martiska <jmartisk> | ||||
Severity: | unspecified | Docs Contact: | Russell Dickenson <rdickens> | ||||
Priority: | unspecified | ||||||
Version: | 6.1.0, 6.2.0, 6.1.1, 6.2.1, 6.2.2 | CC: | bbaranow, cdewolf, egonzale, emartins, jawilson, jmartisk, rsvoboda | ||||
Target Milestone: | CR2 | ||||||
Target Release: | EAP 6.4.1 | ||||||
Hardware: | Unspecified | ||||||
OS: | Unspecified | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2017-01-17 09:58:37 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: | |||||||
Bug Depends On: | |||||||
Bug Blocks: | 1170672, 1207953 | ||||||
Attachments: |
|
Description
wfink
2014-05-05 14:44:50 UTC
The problem here is in the naming component. When several threads are using EJBContext the NamingStoreCache is mixing context among threads. Cache problem & race condition description When the InitialContext creates a new RemoteNamingStore, *The cache is not taking into account the EJBClientHandler*. This EJBClientHandler could have different EJBClientContextIdentifier. When a remote ejb is invoked every thread is using the same RemoteNamingStore therefore the same EJBClientContext during an invocation (in this case because the endpoint data is the same). This leads to a race condition: ThreadA: close the context (raising the closed flag in the ejbcontext) ThreadB: tries to invoke the context. It raises the error EJBCLIENT000025. (both threads are using the RemoteNamingStore, therefore the same EJBClientHandler and EJBClientContext). Note for Wildfly : It also happens that EJBClientContext is executed before the RemoteNaming.CloseTask leading to a new stacktrace. (this happens for jboss-remote-naming 2.0.3.Final and jboss-remoting 4.0.5.Final due to the shutdown of the ExecutorService in EJBClientContext::close call. Naming component 2.x upstream component PR https://github.com/jbossas/jboss-remote-naming/pull/22 1.x component PR https://github.com/jbossas/jboss-remote-naming/pull/23 Please provide test (as discussed with Carlo) to include this in CP01 payload. I will qa_ack afterwards. Created attachment 1019572 [details]
TestCase
Providing test case:
execution:
mvn test
Note:
the dependency for the jboss.as should be modified to run the test. Property "version.org.jboss.as"
Verified in EAP 6.4.1.CR2. Retroactively bulk-closing issues from released EAP 6.4 cummulative patches. |