Repository navigation
task: report a queued MDI as not idle - #4949
Merged
Merged
Conversation
When an MDI arrives while task is still busy, for instance with the cleanup after an abort, task puts it in its MDI queue and runs it later. The status that echoes the command still showed the interpreter idle, so a client that sends an MDI and then waits for idle returned at once and read the machine before the command had run. tests/interp/g28.2/invalid-pword did exactly that and failed on the i386 CI job of LinuxCNC#4942: "coordinated motion did not survive the rejected Pn (X stayed at 0.9999999999999999)", X still at 1 from the G0 X1 before. Task now sets the interpreter state to reading when it queues an MDI, as it does when it runs one straight away. It goes back to idle once the queued command has run, as before. The test no longer sleeps after its mode switches: task applies a mode in the cycle that echoes it, so the next command already sees it. Tested in a sandbox under load, runtests -j 8 with 8 CPU hogs: the test as it is on master failed 6 times in 220 runs, and passed 220 of 220 with this change; the test from this commit passed 240 of 240. The full runtests suite passes.
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.
tests/interp/g28.2/invalid-pword failed on the i386 package job of #4942 (https://github.com/LinuxCNC/linuxcnc/actions/runs/46831805320/job/143290469047): "coordinated motion did not survive the rejected Pn (X stayed at 0.9999999999999999)".
When task is busy, it queues an incoming MDI and runs it later, but the status that echoes the command still showed the interpreter idle. A client that sends an MDI and waits for idle, like this test, then reads the machine before the command has run. Task now reports a queued MDI as reading, as it does for one it runs straight away.
Under load (runtests -j 8 with 8 CPU hogs, in a sandbox) the test as it is on master failed 6 times in 220 runs, and passed all 220 with this change. The full runtests suite passes.