Bug Report: NullPointerException in com.sun.jts.CosTransactions.RecoveryManager
/ FISH-5851
#5491
Labels
Status: Accepted
Confirmed defect or accepted improvement to implement, issue has been escalated to Platform Dev
Type: Bug
Label issue as a bug defect
Description
Follow-up to https://forum.payara.fish/t/nullpointerexception-in-com-sun-jts-costransactions-recoverymanager-when-restoring-ejb-timers/81
We came across this issue with Payara 5.2020.4. One of our instances threw the following exception during startup:
There is a race condition around the semaphore
resyncInProgress
which can be NULLed concurrently after checking for NULL.Variable is set to
null
here:Payara/appserver/transaction/jts/src/main/java/com/sun/jts/CosTransactions/RecoveryManager.java
Lines 695 to 698 in 8761aec
But could be queried e.g. here:
Payara/appserver/transaction/jts/src/main/java/com/sun/jts/CosTransactions/RecoveryManager.java
Lines 1458 to 1465 in 8761aec
In the forum thread @pdudits suggested a possible fix. I will create a corresponding PR.
Expected Outcome
Normal startup.
Current Outcome
Server throws NPE and does not start. We only encountered this once since it seems to be a rare race condition.
Steps to reproduce
We did not find a way to provoke this.
Environment
The text was updated successfully, but these errors were encountered: