You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@storm.apache.org by "dpol1 (via GitHub)" <gi...@apache.org> on 2026/07/09 13:51:53 UTC
[PR] Fix NPE in WorkerState.transferLocalBatch causing worker crashes (storm)
dpol1 opened a new pull request, #8896:
URL: https://github.com/apache/storm/pull/8896
## Summary
Fixes #7533 — NPE in `WorkerState.transferLocalBatch` causing workers to exit.
## Root cause
`transferLocalBatch` looks up `taskToExecutorQueue.get(tuple.dest)` and dereferences the result without a null check. The map contains only tasks assigned to this worker at startup. During a rebalance, peer workers with a stale assignment cache send tuples to tasks this worker no longer owns; the lookup returns `null` and the NPE propagates to `StormServerHandler.exceptionCaught`, which calls `Runtime.getRuntime().exit(1)`.
This is a regression from STORM-2306: the 1.x `transferLocal` path guarded both lookups explicitly ("Received invalid messages for unknown tasks. Dropping…"). The redesign dropped both guards.
## Changes
- `WorkerState.java`: null check on `queue` after line 572; on `null`, drop the tuple, log a warning with `tuple.dest`, increment `dropCount`. Method visibility `private` → package-private for testability.
- `WorkerStateTest.java`: new test verifying that a tuple addressed to an unknown task is silently dropped (no exception thrown).
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix NPE in WorkerState.transferLocalBatch causing worker crashes (storm)
Posted by "reiabreu (via GitHub)" <gi...@apache.org>.
reiabreu commented on PR #8896:
URL: https://github.com/apache/storm/pull/8896#issuecomment-4946757777
Thanks for the fix @dpol1
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
Re: [PR] Fix NPE in WorkerState.transferLocalBatch causing worker crashes (storm)
Posted by "reiabreu (via GitHub)" <gi...@apache.org>.
reiabreu merged PR #8896:
URL: https://github.com/apache/storm/pull/8896
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: issues-unsubscribe@storm.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org