MyTooliT / ICOc

ICOc is a tool to control the ICOtronic system, acquire data, and test stationary transceiver units and sensory tool holders.
https://mytoolit.github.io/ICOc/
2 stars 0 forks source link

ICOn Measure: Program Stuck While Reading Data #50

Closed sanssecours closed 9 months ago

sanssecours commented 9 months ago

Problem Description

The measure subcommand of icon might be stuck forever, if no new streaming data is sent over the CAN bus.

Steps to Reproduce

Execute the following command:

icon measure -t 1 -n Test-STH

Expected Result

The command reads streaming data for one second and then stores the result.

Actual Result

The command freezes:

Sample Rate: 9524 Hz
Read sensor data:   0%|                                                     | 3/9524.0 [00:00<31:15,  5.08 values/s]

while no new data seems to arrive over the CAN bus.

Notes

~This will usually not happen. Until now I only could reproduce this behavior once (on Linux).~

Update: Seem this happens a lot of times (on Linux). Sometimes the program only retrieves one message, sometimes it retrieves multiple hundred messages before the measurement is stuck. It also seems the ICOtronic hardware is in some kind of erronous state, if this happens once. Afterwards pretty much every subsequent measurement will get stuck as well. After resetting the system with the command:

icon stu reset

everything seems to work as expected again.

Suggested Solution

Add timeout to async for loop that iterates over data, if possible.