Restore detailed entity information in watchdog dumps - #14242
Open
electronicboy wants to merge 1 commit into
Open
Restore detailed entity information in watchdog dumps#14242electronicboy wants to merge 1 commit into
electronicboy wants to merge 1 commit into
Conversation
Watchdog dumps lost their per-entity detail in 1.21.4. The instrumentation survived - ServerLevel still tracks the currently ticking entity, and Entity still records the move() start position and move vector under posLock - but the code that printed it was dropped while the "Detail more information in watchdog dumps" feature patch was inlined into the per-file patches, along with the four Entity accessors that exposed the move state. This restores the readout and those accessors. It lives in WatchdogThread rather than FeatureHooks since none of it is chunk-system dependent. The dump is wrapped in a catch-all: it reads concurrently mutating entity state off the server thread, and an exception there would otherwise cost us the thread dump and the halt that follows it.
electronicboy
force-pushed
the
restore-entity-ticking-watchdog
branch
from
September 9, 2026 21:42
48a4205 to
5bf6568
Compare
|
Last updated for: 5bf65680a1d9009b0681ad462ba62516efc3a0b6. Download the Paperclip jar for this pull request: paper-14242.zip Maven PublicationThe artifacts published by this PR:Repository DeclarationIn order to use the artifacts published by the PR, add the following repository to your buildscript: repositories {
maven("https://maven-prs.papermc.io/Paper/pr14242") {
name = "Maven for PR #14242" // https://github.com/PaperMC/Paper/pull/14242
mavenContent {
includeModule("io.papermc.paper", "dev-bundle")
includeModule("io.papermc.paper", "paper-api")
}
}
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Watchdog dumps lost their per-entity detail in 1.21.4. When the server thread is stuck, the dump still prints the thread stack, but not which entity is being ticked or what state it is in — which is often the part that actually identifies the problem. An excessive movement vector, or the position of a busted entity so it can be found and removed, is exactly the information that makes a hang diagnosable, and its absence has been noticed more than once.
The instrumentation was never removed, only the readout.
ServerLevelstill sets and clearscurrentlyTickingEntityaround everytickNonPassenger, andEntitystill records themove()start position and move vector underposLock, so servers have been paying for the tracking since 1.21.4 with no way to read any of it back out.It was dropped incidentally while the
Detail more information in watchdog dumpsfeature patch was inlined into the per-file patches (48f34f8c90,13b890950d,3b0b3a0aef) — the call site was replaced withdumpAllChunkLoadInfo, the bodies were emptied, and the fourEntityaccessors that exposed the move state went with them, leaving those fields private with no reader.This restores
dumpTickingInfo/dumpEntityand the accessors. Notes on the two judgement calls:WatchdogThreadrather thanFeatureHooks, since none of it is chunk-system dependent.Verified by hanging the server thread inside
Entity#move(fall damage is dispatched from withinmove, so the move-vector branch is exercised too) and reading the early-warning dump:Two limits worth knowing: only the outermost ticking entity is reported, since
currentlyTickingEntityis a single reference assigned only when null; and the packet-handling branch is compile-verified only, as testing it needs a connected client.