Repository navigation
Fix bugs in progress reporting - #243
Merged
Merged
Conversation
JonatanWaern
force-pushed
the
progress-fixes
branch
from
October 13, 2026 12:29
85d4f20 to
29c91de
Compare
JonatanWaern
force-pushed
the
progress-fixes
branch
from
October 26, 2026 09:14
29c91de to
b4caac0
Compare
The in-flight trackers were keyed by job hash, which is the same for every job on the same file. When a newer job for a file was dispatched while an older, cancelled one was still running, both shared one entry, and whichever finished first removed it. has_work() then reported no work while the newer job still ran, so the server ended its analysis progress early. dml-builtins.dml is hit by this on every device: each analysed import re-requests it, cancelling the running job. dfa exported on the early progress end and failed with "No device analyses found", because builtins, its imports, and so the device analysis had not been done. Key the trackers by an id assigned when the job is dispatched, and look up in-flight device jobs by hash among the values. Signed-off-by: Jonatan Waern<jonatan.waern@intel.com>
DeviceAnalysisJob sent DeviceAnalysisDone before sending the analysis itself. The server's handler for it updates the stored analyses, which could then run before the analysis was in the channel, leaving it unstored until some later update. An export right after the analysis progress ended could then find no device analysis. Send the analysis first, as isolated analysis jobs already do. Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
The server ends its analysis progress at the top of its loop, once no message is pending and the queue has no work. Analysis jobs sent their done message before leaving the in-flight tracker, and cancelled jobs sent nothing at all. If the loop handled the last done message before the job left the tracker, or the last job to exit was a cancelled one, the loop blocked waiting for a message with the progress still open, and dfa waited for its end forever. Send a message once a job has left the tracker, so that the loop re-checks for remaining work, and re-check state waits on it. Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
Two isolated analysis jobs on the same file are in flight at once. Each reports on its own rendezvous channel, so it blocks until the test receives from it, and the test decides the order in which they exit. Once the older job has exited, the queue must still report the newer one as in-flight work, and each exit must be signalled with AnalysisJobExited. With the trackers keyed by job hash, the older job's exit removes the newer job's entry and has_isolated_work() turns false. Without the exit message the test gets none from the older job. Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
The jobs use it for nothing else, and this ensures we always notify _something_ regardless of how a job exits Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
Signed-off-by: Jonatan Waern <jonatan.waern@intel.com>
JonatanWaern
force-pushed
the
progress-fixes
branch
from
October 26, 2026 09:15
b4caac0 to
3c9df95
Compare
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.
Originally discovered and worked on in the scip-branch over at #239, see that PR for discussion