Skip to content

Log the actual deadline when scheduling a future task - #510

Open
samliok wants to merge 3 commits into
mainfrom
fix/monitor-deadline-log
Open

Log the actual deadline when scheduling a future task#510
samliok wants to merge 3 commits into
mainfrom
fix/monitor-deadline-log

Conversation

@samliok

@samliok samliok commented Aug 13, 2026

Copy link
Copy Markdown
Collaborator

What was wrong
Monitor.FutureTask (simplex/monitor.go:159) logged the field "deadline" with the monitor's current base time, while the scheduled task's deadline is time.Add(timeout).

Consequence
The "Scheduling task" log line reports a "deadline" that is earlier than the real one by the full timeout, and disagrees with the "deadline" logged by tick() for the same task. This misled triage of a CI hang, where the logged "deadline" was read as the actual deadline.

Fix
Compute the deadline once and log it, instead of the base time.

Found while triaging a CI hang, where the misleading log field derailed the investigation.

FutureTask logged the monitor's current time under the "deadline"
field instead of time.Add(timeout).
@samliok
samliok marked this pull request as ready for review August 14, 2026 21:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants