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

Bug 959875

Summary: ISPN 5.2.6.Final: Failed to passivate (unloaded) session: IllegalArgumentException: Cannot create a transactional context without a valid Transaction instance.
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Jitka Kozana <jkudrnac>
Component: ClusteringAssignee: Paul Ferraro <paul.ferraro>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: urgent Docs Contact:
Priority: urgent    
Version: 6.1.0CC: brian.stansberry, dandread, jdoyle, jkudrnac, lthon, mmarkus, myarboro, paul.ferraro, rjanik, rsvoboda, ttarrant
Target Milestone: ER7Keywords: Regression
Target Release: EAP 6.1.0   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-07-23 18:35:06 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: 900549    
Attachments:
Description Flags
server log none

Description Jitka Kozana 2013-05-06 07:32:53 UTC
Created attachment 744003 [details]
server log

EAP 6.1.0.ER6 with infinispan 5.2.6.Final and jboss-as-web-infinispan.jar https://bugzilla.redhat.com/show_bug.cgi?id=900549#c92. 
Application uses passivation as follows:
    <passivation-config>
        <use-session-passivation>true</use-session-passivation>
        <passivation-min-idle-time>75</passivation-min-idle-time>
        <passivation-max-idle-time>150</passivation-max-idle-time>
    </passivation-config>

This exception is showing up in the logs during the whole test. The test is soak test, with no node failures, so exceptions are not expected.
In one server log only, there are hundreds of thousands (!) of these exception in just one server log.

[JBossINF] ESC[0mESC[31m11:01:27,682 ERROR [org.jboss.as.web.session.DistributableSessionManager.clusterbench-passivating] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) JBAS01807
9: Failed to passivate  session VNS5a5u3w5olWCaUl-UplMg2: java.lang.IllegalArgumentException: Cannot create a transactional context without a valid Transaction instance.
[JBossINF]      at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:112)
[JBossINF]      at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:107)
[JBossINF]      at org.infinispan.CacheImpl.getInvocationContextForWrite(CacheImpl.java:465)
[JBossINF]      at org.infinispan.CacheImpl.lock(CacheImpl.java:561)
[JBossINF]      at org.infinispan.CacheImpl.lock(CacheImpl.java:546)
[JBossINF]      at org.infinispan.AbstractDelegatingAdvancedCache.lock(AbstractDelegatingAdvancedCache.java:166)
[JBossINF]      at org.infinispan.AbstractDelegatingAdvancedCache.lock(AbstractDelegatingAdvancedCache.java:166)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$4.invoke(DistributedCacheManager.java:307)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$4.invoke(DistributedCacheManager.java:304)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.BatchCacheInvoker.invoke(BatchCacheInvoker.java:48)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:81)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$ForceSynchronousCacheInvoker.invoke(DistributedCacheManager.java:544)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.evictSession(DistributedCacheManager.java:313)
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.processSessionPassivation(DistributableSessionManager.java:519) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.access$600(DistributableSessionManager.java:84) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager$PassivationCheck.passivate(DistributableSessionManager.java:1569) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager$PassivationCheck.access$300(DistributableSessionManager.java:1541) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.processExpirationPassivation(DistributableSessionManager.java:1305) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.AbstractSessionManager.processExpires(AbstractSessionManager.java:137) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:367) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1302) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1588) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1574) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]
[JBossINF] 

and: 
[JBossINF] ESC[0mESC[31m11:01:27,695 ERROR [org.jboss.as.web.session.DistributableSessionManager.clusterbench-passivating] (ContainerBackgroundProcessor[StandardEngine[jboss.web]]) JBAS018079: Failed to passivate unloaded  session wA-YOO1K8jCBxXqU7Hdfaqrg: java.lang.IllegalArgumentException: Cannot create a transactional context without a valid Transaction instance.
[JBossINF]      at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:112)
[JBossINF]      at org.infinispan.context.TransactionalInvocationContextContainer.createInvocationContext(TransactionalInvocationContextContainer.java:107)
[JBossINF]      at org.infinispan.CacheImpl.getInvocationContextForWrite(CacheImpl.java:465)
[JBossINF]      at org.infinispan.CacheImpl.lock(CacheImpl.java:561)
[JBossINF]      at org.infinispan.CacheImpl.lock(CacheImpl.java:546)
[JBossINF]      at org.infinispan.AbstractDelegatingAdvancedCache.lock(AbstractDelegatingAdvancedCache.java:166)
[JBossINF]      at org.infinispan.AbstractDelegatingAdvancedCache.lock(AbstractDelegatingAdvancedCache.java:166)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$4.invoke(DistributedCacheManager.java:307)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$4.invoke(DistributedCacheManager.java:304)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.SimpleCacheInvoker.invoke(SimpleCacheInvoker.java:34)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.BatchCacheInvoker.invoke(BatchCacheInvoker.java:48)
[JBossINF]      at org.jboss.as.clustering.infinispan.invoker.RetryingCacheInvoker.invoke(RetryingCacheInvoker.java:81)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager$ForceSynchronousCacheInvoker.invoke(DistributedCacheManager.java:544)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.evictSession(DistributedCacheManager.java:313)
[JBossINF]      at org.jboss.as.clustering.web.infinispan.DistributedCacheManager.evictSession(DistributedCacheManager.java:326)
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.processUnloadedSessionPassivation(DistributableSessionManager.java:343) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.access$700(DistributableSessionManager.java:84) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager$PassivationCheck.passivate(DistributableSessionManager.java:1571) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager$PassivationCheck.access$300(DistributableSessionManager.java:1541) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.DistributableSessionManager.processExpirationPassivation(DistributableSessionManager.java:1305) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.jboss.as.web.session.AbstractSessionManager.processExpires(AbstractSessionManager.java:137) [jboss-as-web-7.2.0.Final-redhat-6.jar:7.2.0.Final-redhat-6]
[JBossINF]      at org.apache.catalina.session.ManagerBase.backgroundProcess(ManagerBase.java:367) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase.backgroundProcess(ContainerBase.java:1302) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1588) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.processChildren(ContainerBase.java:1600) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at org.apache.catalina.core.ContainerBase$ContainerBackgroundProcessor.run(ContainerBase.java:1574) [jbossweb-7.2.0.Final-redhat-1.jar:7.2.0.Final-redhat-1]
[JBossINF]      at java.lang.Thread.run(Thread.java:662) [rt.jar:1.6.0_43]

I am attaching compressed server.log

Comment 1 Paul Ferraro 2013-05-06 12:55:51 UTC
Setting blocker flag to "?", since this looks like fallout from:
https://github.com/jbossas/jboss-eap/commit/4db033959d89b46990b54f62b938e7b7158d57e9
Though, honestly, I don't immediately know why this would be happening, since the lock is performed within the context of a tx (via BatchCacheInvoker).

Comment 2 Mircea Markus 2013-05-06 13:38:52 UTC
The TransactionManager that looks up the transaction associated with the current thread doesn't find any transaction associated with the current thread. Two possible causes for this are: the transaction wasn't started (or was completed by the time the lock() is invoked) or the TransactionManager the cache is using is different than the one configured for the cache.

Comment 4 Mircea Markus 2013-05-06 15:37:15 UTC
I've created:
https://issues.jboss.org/browse/ISPN-3077
JIRA also contains a workaround for the problem.

Comment 5 John Doyle 2013-05-06 16:24:00 UTC
What are our prospects for getting this fix or workaround into the release.  Looks like either one requires a code change.

Comment 6 Paul Ferraro 2013-05-06 16:40:25 UTC
I've implemented a workaround for ISPN-3077:
https://github.com/jbossas/jboss-eap/pull/140

Comment 7 Dimitris Andreadis 2013-05-06 16:45:58 UTC
So then, we are taking Paul's fix XOR Mircea's ISPN-3077 fix?

Comment 8 Paul Ferraro 2013-05-06 17:16:36 UTC
The ISPN-3077 fix would need to be ported to the 5.2.x branch, released as 5.2.7, and the component upgraded and tested in EAP.  If this is possible within the remaining time, great - but Dimitris is right, we don't need/want both fixes, only one or the other.

Comment 9 John Doyle 2013-05-06 18:32:44 UTC
I think we should take Paul's workaround given the time pressure.  Have we already missed our window for the build?

Comment 10 Paul Gier 2013-05-06 18:35:24 UTC
We can take the workaround in the github PR for ER7.

Comment 11 Jitka Kozana 2013-05-07 05:26:00 UTC
@Paul or @Rado, once the pull 140 is merged, can I have a jar to test with, please? Thanks!

Comment 12 Dimitris Andreadis 2013-05-07 09:19:27 UTC
Should we proceed with the merge, anyway? The test failure on lightning looks transient to me.

Comment 13 Jitka Kozana 2013-05-13 05:24:24 UTC
Verified.