Response parsing error #10

Closed
opened 2023-06-21 10:22:52 -04:00 by blizzardfinnegan · 2 comments

In the current version of this software, it is possible for a device to temporarily fall out of the predefined state machine, and remain uncaught for a single iteration. This appears to be mostly an edge case, however it will affect the final generated data.


Replicating the issue in a contained environment will be somewhat difficult, as it is due to serial response timings which cannot be manipulated easily. The following steps for reproduction assume that a control over response times is possible.

  1. Reboot a device.
  2. Once device has rebooted, run go_to_lifecycle_menu (See: device.rs), this logs in, then sends the debugmenu command.
  3. Device takes sufficiently long to load the debug menu that the only thing received back from the device is the echo from the send command.
  4. Device object catches unknown response, marks as error. Breaks out of loop.
  5. Device object believes itself to be in State::DebugMenu, when it isn't yet.
  6. Device object sends the LifecycleMenu command to TTY, despite not knowing what state the device on the other end of the TTY is in. Crucially, the device on the other end of the TTY drops the LifecycleMenu command rather than storing it. This leads to the device falling out of the expected state in the state machine.
  7. Continues following expected sequence for iteration, according to the Device object. Iteration fails after some time, sending the Quit command to the TTY, which reboots the device successfully.
In the current version of this software, it is possible for a device to temporarily fall out of the predefined state machine, and remain uncaught for a single iteration. This appears to be mostly an edge case, however it will affect the final generated data. --- Replicating the issue in a contained environment will be somewhat difficult, as it is due to serial response timings which cannot be manipulated easily. The following steps for reproduction assume that a control over response times is possible. 1. Reboot a device. 2. Once device has rebooted, run `go_to_lifecycle_menu` (See: `device.rs`), this logs in, then sends the debugmenu command. 3. Device takes sufficiently long to load the debug menu that the only thing received back from the device is the echo from the send command. 4. Device object catches unknown response, marks as error. Breaks out of loop. 5. Device object believes itself to be in State::DebugMenu, when it isn't yet. 6. Device object sends the LifecycleMenu command to TTY, despite not knowing what state the device on the other end of the TTY is in. Crucially, the device on the other end of the TTY drops the LifecycleMenu command rather than storing it. This leads to the device falling out of the expected state in the state machine. 7. Continues following expected sequence for iteration, according to the Device object. Iteration fails after some time, sending the Quit command to the TTY, which reboots the device successfully.
blizzardfinnegan added the
bug
label 2023-06-21 10:22:52 -04:00
blizzardfinnegan self-assigned this 2023-06-21 10:22:52 -04:00
Author
Owner

First attempt at resolving in commit c6c34462bb . Deployed in testing, will report with if issues persist.

First attempt at resolving in commit c6c34462bbf549810c97d6694f92f0f809daa37e . Deployed in testing, will report with if issues persist.
Author
Owner

No errors seen thus far. If testing continues without errors or complaints, this issue will be closed.

No errors seen thus far. If testing continues without errors or complaints, this issue will be closed.
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: blizzardfinnegan/seymourLifeRust#10
No description provided.