APAR status
Closed as program error.
Error description
A Singleton Bean's @PostConstruct or @PreDestroy method can hit a deadlock. Scenario: The Singleton calls another managed object (like another session bean or asynchronous bean) OR the Singleton has a lifecycle interceptor. The other managed object calls the Singleton (either through an asynchronous method that is invoked at the right time ,so a timing problem, or through the method the Singleton called on it during it's lifecycle event) We deadlock because the Singleton is locked from the lifecycle event, but now the other managed object is waiting to acquire a lock on the Singleton at the same time as the Singleton lifecycle event is trying to obtain a lock on the other managed object. Workaround: Rewrite the other method of the interceptor or managed object to not aquire a write lock.
Local fix
Problem summary
**************************************************************** * USERS AFFECTED: All users of IBM WebSphere Application * * Server * **************************************************************** * PROBLEM DESCRIPTION: Users can experience a deadlock while * * an EJB Singleton bean is either * * initializing or being destroyed. * **************************************************************** * RECOMMENDATION: * **************************************************************** Users can experience a deadlock while an EJB Singleton bean is either initializing or being destroyed. This can cause a thread to either hang during server shutdown if the deadlock is during the destroy of the Singleton or cause a hung thread during application use if the deadlock is in the creation of the bean. A customer can experience both.
Problem conclusion
For @PreDestroy we are no longer locking the Singleton bean, depending on when the destroy resolves, the other managed object might get an error stating the bean has been stopped/destroyed. For @PostConstruct the EJBContainer must lock the creation of SingletonBeans to ensure only one gets created. Instead of deadlocking forever we now have a timeout value of attempting to obtain a lock. This value is 2 minutes by default but configurable by @AccessTimeout value either on the class or the @PostConstruct method. A thread that times out trying to access the Singleton will get a javax.ejb.ConcurrentAccessTimeoutException The fix for this APAR is targeted for inclusion in fix pack 9.0.5.10 and 8.5.5.21 for Websphere Application Server and 21.0.0.7 for Liberty. For more information, see 'Recommended Updates for WebSphere Application Server': https://www.ibm.com/support/pages/node/715553
Temporary fix
Comments
APAR Information
APAR number
PH36416
Reported component name
WEBS APP SERV N
Reported component ID
5724H8800
Reported release
900
Status
CLOSED PER
PE
NoPE
HIPER
NoHIPER
Special Attention
NoSpecatt / Xsystem
Submitted date
2021-04-19
Closed date
2021-08-04
Last modified date
2021-08-04
APAR is sysrouted FROM one or more of the following:
APAR is sysrouted TO one or more of the following:
Fix information
Fixed component name
WEBS APP SERV N
Fixed component ID
5724H8800
Applicable component levels
R850 PSY
UP
R900 PSY
UP
[{"Business Unit":{"code":"BU059","label":"IBM Software w\/o TPS"},"Product":{"code":"SSEQTP","label":"WebSphere Application Server"},"Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"9.0","Line of Business":{"code":"LOB45","label":"Automation"}}]
Document Information
Modified date:
02 November 2021