[PR #7338] [MERGED] port map: the watchdog runs, so rest-017's three rows are ported #7506

Closed
opened 2026-11-03 06:40:14 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/7338
Author: @MSedgeMC
Created: 11/2/2026
Status: ✅ Merged
Merged: 11/2/2026
Merged by: @ludovic111

Base: main ← Head: chore/vol-c-rest-017


📝 Commits (3)

  • 09c41ee port_map: the watchdog runs, so its three rows are ported
  • 5623c08 port_map: rest-017's session id, packet error and idle rows name the code
  • af03b84 Merge main into #7338

📊 Changes

1 file changed (+6 additions, -6 deletions)

View changed files

📝 tools/port_map/rest-017.tsv (+6 -6)

📄 Description

Rows of tools/port_map/rest-017.tsv (112 rows, map-check clean against 26.3): the dedicated server — ServerWatchdog, the connection listeners, the ban and op lists, the console commands.

Verdicts

row was now where
ServerWatchdog.run missing port crates/horizon-client/src/game/dedicated.rs::Watchdog::run
ServerWatchdog.createWatchdogCrashReport missing port crates/horizon-client-render/src/crash.rs::report_watchdog
ServerWatchdog.exit missing inline crates/horizon-client/src/game/dedicated.rs::Watchdog::run

All three were filed as missing with notes saying no watchdog runs. One does: dedicated.rs starts a "Server Watchdog" thread from max-tick-time where DedicatedServer.initServer does, exactly as vanilla's note describes, and Watchdog::run is ServerWatchdog.run:

  • it measures the tick in progress against its due time and fires when it is max-tick-time behind;
  • it logs vanilla's two lines ("A single server tick took … seconds", "Considering it to be crashed…");
  • it writes the report through crash::report_watchdog, whose doc names ServerWatchdog, and logs the path;
  • then it exits the process with 1 — ServerWatchdog.exit folded in, with its one deviation in the note: vanilla sleeps 10 s and dumps the stuck thread's stack first, which Rust cannot read from another thread, so the report carries no thread dump either (that gap is now stated on createWatchdogCrashReport rather than as "Horizon has no watchdog").

Notes repaired

  • ServerConnectionListener.getSessionId now names the code: lan/conn.rs sends the player's own uuid as session in login finished, where vanilla sends one random id per server run.
  • ServerCommonPacketListenerImpl.onPacketError loses its "unsure": no packet-handling exception is recorded anywhere in the tree for a crash report, so the gap is real.
  • DedicatedServer.setPlayerIdleTimeout says which half is missing: lan/command_order.rs lists setidletimeout among the vanilla names and the command dispatcher has no arm for it, while the idle sweep the property drives is dedicated.rs's.

Map-check:

PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-017.tsv
112 rows, no problems.

Proven: the three ports read at the cite — Watchdog::start's max_tick_time filter, run's behind > max test, its two log lines, the report_watchdog call and std::process::exit(1); report_watchdog's own body and its empty stack; lan/conn.rs's session: uuid; and the absence of a setidletimeout arm by grepping the dispatcher.

Not proven: that the watchdog fires in practice — I did not stall a server tick; the exit deviation's user-visible cost (no thread dump, 10 s earlier) is read from the two implementations, not observed.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/7338 **Author:** [@MSedgeMC](https://github.com/MSedgeMC) **Created:** 11/2/2026 **Status:** ✅ Merged **Merged:** 11/2/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `chore/vol-c-rest-017` --- ### 📝 Commits (3) - [`09c41ee`](https://github.com/horizon-rust/horizon/commit/09c41ee5afaad34671340f9663a80d3ff1f657f4) port_map: the watchdog runs, so its three rows are ported - [`5623c08`](https://github.com/horizon-rust/horizon/commit/5623c08022e18c5f599ef6c99b9d7531a9f04dde) port_map: rest-017's session id, packet error and idle rows name the code - [`af03b84`](https://github.com/horizon-rust/horizon/commit/af03b845d104501bae406bc06fc79d0ae64f9d7e) Merge main into #7338 ### 📊 Changes **1 file changed** (+6 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `tools/port_map/rest-017.tsv` (+6 -6) </details> ### 📄 Description Rows of `tools/port_map/rest-017.tsv` (112 rows, map-check clean against 26.3): the dedicated server — `ServerWatchdog`, the connection listeners, the ban and op lists, the console commands. **Verdicts** | row | was | now | where | | --- | --- | --- | --- | | `ServerWatchdog.run` | missing | port | `crates/horizon-client/src/game/dedicated.rs::Watchdog::run` | | `ServerWatchdog.createWatchdogCrashReport` | missing | port | `crates/horizon-client-render/src/crash.rs::report_watchdog` | | `ServerWatchdog.exit` | missing | inline | `crates/horizon-client/src/game/dedicated.rs::Watchdog::run` | All three were filed as missing with notes saying no watchdog runs. One does: `dedicated.rs` starts a "Server Watchdog" thread from `max-tick-time` where `DedicatedServer.initServer` does, exactly as vanilla's note describes, and `Watchdog::run` is `ServerWatchdog.run`: - it measures the tick in progress against its due time and fires when it is `max-tick-time` behind; - it logs vanilla's two lines ("A single server tick took … seconds", "Considering it to be crashed…"); - it writes the report through `crash::report_watchdog`, whose doc names `ServerWatchdog`, and logs the path; - then it exits the process with 1 — `ServerWatchdog.exit` folded in, with its one deviation in the note: vanilla sleeps 10 s and dumps the stuck thread's stack first, which Rust cannot read from another thread, so the report carries no thread dump either (that gap is now stated on `createWatchdogCrashReport` rather than as "Horizon has no watchdog"). **Notes repaired** - `ServerConnectionListener.getSessionId` now names the code: `lan/conn.rs` sends the player's own uuid as `session` in login finished, where vanilla sends one random id per server run. - `ServerCommonPacketListenerImpl.onPacketError` loses its "unsure": no packet-handling exception is recorded anywhere in the tree for a crash report, so the gap is real. - `DedicatedServer.setPlayerIdleTimeout` says which half is missing: `lan/command_order.rs` lists `setidletimeout` among the vanilla names and the command dispatcher has no arm for it, while the idle sweep the property drives is `dedicated.rs`'s. Map-check: ``` PORT_LEDGER_OUT=... python3 tools/port_ledger.py map-check tools/port_map/rest-017.tsv 112 rows, no problems. ``` **Proven:** the three ports read at the cite — `Watchdog::start`'s `max_tick_time` filter, `run`'s `behind > max` test, its two log lines, the `report_watchdog` call and `std::process::exit(1)`; `report_watchdog`'s own body and its empty stack; `lan/conn.rs`'s `session: uuid`; and the absence of a `setidletimeout` arm by grepping the dispatcher. **Not proven:** that the watchdog fires in practice — I did not stall a server tick; the exit deviation's user-visible cost (no thread dump, 10 s earlier) is read from the two implementations, not observed. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 06:40:14 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#7506
No description provided.