Repository navigation
Revert HADOOP-19668 and HADOOP-19670: Replace Thread with SubjectInheritingThread - #8568
Conversation
…read (apache#8062)" This reverts commit 9cfbbf5.
…o restore pre-JDK22 Subject behaviour (apache#8061)" This reverts commit e57306e.
|
💔 -1 overall
This message was automatically generated. |
steveloughran
left a comment
There was a problem hiding this comment.
with this reverted, does everything work properly on a jvm without the the subject stuff?
@steveloughran Do you mean SIMPLE mode? After reverting, this part basically stays in the same state as branch-3.4 - no issue with SIMPLE mode on JDK 25. |
|
@steveloughran Jenkins fails several times (each round takes over a day) with exit code 143, likely OOM. But GitHub Actions passes (full UT except for the excluded flaky test list). Could you take another look? |
|
💔 -1 overall
This message was automatically generated. |
steveloughran
left a comment
There was a problem hiding this comment.
Approved. Do add "SubjectInheritingThread" to the title of the commit so that on a git log it is obvious what the commit is.
…ritingThread (#8568) * Revert "HADOOP-19670. [JDK22] Replace Thread with SubjectPreservingThread (#8062)" This reverts commit 9cfbbf5. * Revert "HADOOP-19668. Add SubjectInheritingThread and update Daemon to restore pre-JDK22 Subject behaviour (#8061)" This reverts commit e57306e. Plus a few style tunes. Reviewed-by: Steve Loughran <stevel@cloudera.com> Signed-off-by: Cheng Pan <chengpan@apache.org>
|
@steveloughran, thanks for the review. I updated the PR title and committed it to trunk (3.6.0) and branch-3.5 (3.5.1) |
…nService.PublicLocalizer.run() When pending.remove(completed) returns null, run() logged "Localized unknown resource" and returned, terminating the Public Localizer thread for the life of the NodeManager. The NM kept running, but all later public localization failed with RejectedExecutionException, so containers needing public resources hung until a restart -- the end state reported in YARN-9968. Skip the unattributable resource with continue instead. The branch is defensive rather than reachable today: addResource() wraps queue.submit(...) and pending.put(...) in one synchronized (pending) block so a future cannot complete and be dequeued before the map is updated, and pending is a synchronizedMap on the same monitor. It matters because YARN-11746 proposes shutting the NodeManager down when this thread exits, which would turn a single unknown resource into a node-wide outage. Hoisting the null check out of the try block also makes the assoc dereference in the ExecutionException handler provably safe, so SpotBugs no longer reports NP_NULL_ON_SOME_PATH_EXCEPTION. The exclude entry for it is therefore dropped rather than repaired; it had been inert since the revert of HADOOP-19668/19670 (apache#8568) restored run() without restoring the method name YARN-11912 changed to work(). Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ove() returns null When pending.remove(completed) returned null, run() logged "Localized unknown resource" and returned. That terminated the Public Localizer thread for the life of the NodeManager, and run()'s finally block shut the download pool down on the way out. Every later public-resource request was then rejected; YARN-1800's handler turns each RejectedExecutionException into a ResourceFailedLocalizationEvent, so containers fail rather than hang, but no public resource can be localized on that node again until the NM is restarted. That is the state reported in YARN-9968, which fixed a different branch of this method. Skip the unattributable resource with continue instead. The branch is defensive rather than reachable today: addResource() wraps queue.submit(...) and pending.put(...) in one synchronized (pending) block so a future cannot complete and be dequeued before the map is updated, and pending is a synchronizedMap on the same monitor. It matters because YARN-11746 proposes shutting the NodeManager down when this thread exits, which would turn a single unknown resource into a node-wide outage. Hoisting the null check out of the try block also makes the assoc dereference in the ExecutionException handler provably safe, so SpotBugs no longer reports NP_NULL_ON_SOME_PATH_EXCEPTION. The exclude entry for it is therefore dropped rather than repaired; it had been inert since the revert of HADOOP-19668/19670 (apache#8568) restored run() without restoring the method name YARN-11912 changed to work(). The new test submits a download straight to the completion queue so the Future is never recorded in pending, then asserts the localizer neither dies nor shuts its pool down. It fails on the unfixed code with "Public Localizer exited after taking an unknown resource". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
…ove() returns null When pending.remove(completed) returned null, run() logged "Localized unknown resource" and returned. That terminated the Public Localizer thread for the life of the NodeManager, and run()'s finally block shut the download pool down on the way out. Every later public-resource request was then rejected; YARN-1800's handler turns each RejectedExecutionException into a ResourceFailedLocalizationEvent, so containers fail rather than hang, but no public resource can be localized on that node again until the NM is restarted. That is the state reported in YARN-9968, which fixed a different branch of this method. Skip the unattributable resource with continue instead. The branch is defensive rather than reachable today: addResource() wraps queue.submit(...) and pending.put(...) in one synchronized (pending) block so a future cannot complete and be dequeued before the map is updated, and pending is a synchronizedMap on the same monitor. It matters because YARN-11746 proposes shutting the NodeManager down when this thread exits, which would turn a single unknown resource into a node-wide outage. Hoisting the null check out of the try block also makes the assoc dereference in the ExecutionException handler provably safe, so SpotBugs no longer reports NP_NULL_ON_SOME_PATH_EXCEPTION. The exclude entry for it is therefore dropped rather than repaired; it had been inert since the revert of HADOOP-19668/19670 (apache#8568) restored run() without restoring the method name YARN-11912 changed to work(). The new test submits a download straight to the completion queue so the Future is never recorded in pending, then asserts the localizer neither dies nor shuts its pool down. It fails on the unfixed code with "Public Localizer exited after taking an unknown resource". Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Description of PR
This PR reverts the
they are going to be replaced with
How was this patch tested?
Pass GHA.
For code changes:
LICENSE,LICENSE-binary,NOTICE-binaryfiles?AI Tooling
No AI usage.