You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Bug] Cannot read field mbean because finalML is null #24410 #24411
I searched in the issues and found nothing similar.
Read release policy
I understand that unsupported versions don't get bug fixes. I will attempt to reproduce the issue on a supported version of Pulsar client and Pulsar broker.
User environment
version: 3.3.6
Issue Description
I noticed that PR #14606 attempted to fix this issue but was closed with the note that it had already been addressed in PR #12103. However, after checking the code in Pulsar 3.3.6, I can confirm that the fix from PR #12103 is present, yet the issue still persists. This suggests that the previous fix may not have fully resolved the problem.
I noticed that PR #14606 attempted to fix this issue but was closed with the note that it had already been addressed in PR #12103. However, after checking the code in Pulsar 3.3.6, I can confirm that the fix from PR #12103 is present, yet the issue still persists. This suggests that the previous fix may not have fully resolved the problem.
@gaozhangmin Have you configured managedLedgerAddEntryTimeoutSeconds to some value? If it's non-zero, it's possible that this is a bug in the managedLedgerAddEntryTimeoutSeconds feature. It seems that race conditions are possible which could lead to the NPE that you are seeing.
@gaozhangmin Have you configured managedLedgerAddEntryTimeoutSeconds to some value? If it's non-zero, it's possible that this is a bug in the managedLedgerAddEntryTimeoutSeconds feature. It seems that race conditions are possible which could lead to the NPE that you are seeing.
managedLedgerAddEntryTimeoutSeconds was configured in my case, i need some time, since it's hard to reproduce
Thanks @gaozhangmin for the report. This is the race @lhotari suspected in the managedLedgerAddEntryTimeoutSeconds check. The periodic check ran on a scheduler thread and could call handleAddFailure on an OpAddEntry that had just completed and been recycled, which leaves ml null. #27056 now runs the check on the managed ledger executor, where adds complete and get recycled, so it can't see a recycled op. It also guards the periodic task, so an exception can't cancel it. Closing as fixed. If it still happens on a currently supported release that includes that change, please reopen.
Activity
lhotari commentedon Jun 19, 2025
Your case is different than #14606 or #12103.
pulsar/managed-ledger/src/main/java/org/apache/bookkeeper/mledger/impl/OpAddEntry.java
Lines 334 to 346 in c1c18d6
In your case, the NPE happens on line 339, before the lambda code block that is executed within the executor.
lhotari commentedon Jun 19, 2025
@gaozhangmin Have you configured
managedLedgerAddEntryTimeoutSecondsto some value? If it's non-zero, it's possible that this is a bug in themanagedLedgerAddEntryTimeoutSecondsfeature. It seems that race conditions are possible which could lead to the NPE that you are seeing.gaozhangmin commentedon Jun 20, 2025
managedLedgerAddEntryTimeoutSeconds was configured in my case, i need some time, since it's hard to reproduce
merlimat commentedon Oct 24, 2026
Thanks @gaozhangmin for the report. This is the race @lhotari suspected in the
managedLedgerAddEntryTimeoutSecondscheck. The periodic check ran on a scheduler thread and could callhandleAddFailureon anOpAddEntrythat had just completed and been recycled, which leavesmlnull. #27056 now runs the check on the managed ledger executor, where adds complete and get recycled, so it can't see a recycled op. It also guards the periodic task, so an exception can't cancel it. Closing as fixed. If it still happens on a currently supported release that includes that change, please reopen.