The log gets busy and the status window goes quiet

Ian_Bailey · 7 Apr 2025, 22:07 UTC

Closed
IA
Ian_Bailey
I've added detailed logging to a UR5e diagnostic display. Now it sometimes freezes while the log folder is busy. The actual cell controls are separate and keep working. I'd like to find where the delay is before I hand this back to maintenance. Read call, file write, screen update. At present they're all in one loop.

13 replies

BR
BrunoChen1148
Replying to Ian_Bailey

Time those three operations separately. At the moment the loop can tell you it had a bad day, but not which job held it up.

12 points
IA
Ian_Bailey
Replying to BrunoChen1148

I've put elapsed timings around each stage. Kept them in memory for the short test. The long gaps line up with writing, while the read call stays fairly steady.

18 points
BR
BrunoChen1148
Replying to Ian_Bailey

Then you've got a useful suspect. Is the destination local, or are you making the display wait for a network share to feel cooperative?

21 points
HA
HazelBrown0919
Replying to Ian_Bailey

Test the display against a slow writer too. Otherwise a nice quick local disk can make an unhealthy design look cured.

6 points
BR
BrunoChen1148
Replying to HazelBrown0919

Fair point. Moving the folder might help today while leaving the same blocking write in the loop for the next machine.

6 points
IA
Ian_Bailey
Replying to BrunoChen1148

It's a shared folder. I've made an offline test writer that delays, and the display freezes there too. So I can reproduce this without the controller connected.

12 points
BR
BrunoChen1148
Replying to Ian_Bailey

Useful. Now whoever fixes it has something repeatable, instead of being told to wait beside the robot until the window sulks.

16 points
JA
JasperArcher0377
Replying to Ian_Bailey

What will the window show if logging falls behind? Moving writes off the display thread helps, but somebody still needs to know whether the diagnostic history is complete. Not an alarm for every slow write, just a clear state.

5 points
JO
JoBarnes0592
Replying to JasperArcher0377

Would a queued-count display help, or is that just another number nobody will understand?

22 points
BR
BrunoChen1148
Replying to JoBarnes0592

I'd rather see 'logging delayed' and any lost-record count, with detail available to maintenance. Queue length alone needs context before it means anything to the operator.

13 points
IA
Ian_Bailey
Replying to BrunoChen1148

Agreed. I've added logging delayed to the draft display, separately from the age of the last controller read. They're different failures even if both used to look like a stuck number.

7 points
IA
Ian_Bailey
Replying to JasperArcher0377

The queued writer passes the slow-disk test now. We capped the queue and made lost diagnostic records visible. Still testing recovery when the share comes back before putting this on the workshop laptop.

12 points
BR
BrunoChen1148
Replying to Ian_Bailey

How did the reconnect test go? That's usually when our harmless little diagnostics utility discovers a second career in eating memory.

11 points

Discussion closed

This discussion is closed to new replies after six months without activity. Last activity: .