Bug 1268424

Summary: [GSS](6.4.z) SFSB infinite loop if Passivate fails
Product: [JBoss] JBoss Enterprise Application Platform 6 Reporter: Brad Maxwell <bmaxwell>
Component: EJB, ClusteringAssignee: Tomas Hofman <thofman>
Status: CLOSED CURRENTRELEASE QA Contact: Jan Martiska <jmartisk>
Severity: unspecified Docs Contact:
Priority: high    
Version: 6.4.0CC: cdewolf, clichybi, david.lloyd, thofman, vtunka
Target Milestone: CR1   
Target Release: EAP 6.4.5   
Hardware: Unspecified   
OS: Unspecified   
URL: https://github.com/jbossas/jboss-eap/pull/2580
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 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: 1235745    

Description Brad Maxwell 2015-10-02 19:22:17 UTC
If a Stateful Session Bean is accessed and then goes into passivation and an exception occurs, the next call to get the SFSB gets stuck in an infinite loop looking for the SFSB key in this class:

ejb3/src/main/java/org/jboss/as/ejb3/cache/impl/backing/PassivatingBackingCacheImpl.java

It appears PassivateTask is scheduled with a thread pool, it attempts the passivation and logs the exception that occurs, but the SFSB key does not appear to be removed when passivation fails, this results in the infinite loop above.

./src/main/java/org/jboss/as/ejb3/cache/spi/impl/PassivateTask.java

Comment 5 Tomas Hofman 2015-10-05 12:04:45 UTC
I presume this is free to take Brad?

Comment 6 Carlo de Wolf 2015-10-05 12:11:30 UTC
If a SFSB fails to passivate it should not be destroyed. (Though this is allowed by spec.)
This might become a configuration option in the future.

Thus bug is purely about the infinite loop that occurs.

Comment 9 Tomas Hofman 2015-10-07 11:49:54 UTC
PR: https://github.com/jbossas/jboss-eap/pull/2580

In the end I decided not to destroy the bean but call postActivate() and leave it active instead. Asked Paul for review.

Comment 12 JBoss JIRA Server 2015-10-08 15:24:58 UTC
Tomas Hofman <thofman> updated the status of jira WFLY-5496 to Coding In Progress

Comment 16 Jan Martiska 2015-11-03 13:11:09 UTC
Verified with EAP 6.4.5.CR1.
The newly added PassivationSucceedsUnitTestCase fails intermittently, there will be a separate BZ to resolve it.

Comment 17 Petr Penicka 2017-01-17 11:42:33 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.

Comment 18 Petr Penicka 2017-01-17 11:42:54 UTC
Retroactively bulk-closing issues from released EAP 6.4 cumulative patches.