×

INDI Library v2.0.6 is Released (02 Feb 2024)

Bi-monthly release with minor bug fixes and improvements

indi_eqmod_telescope hangs with 100% CPU

  • Posts: 1009
  • Thank you received: 133
Hi,
I'm continuously getting hangs of the indi_eqmod_telescope thread. It would suddenly start consuming 100% CPU and stop responding to any communication.
I enabled debugging, and the common issue seems to be that one of the encoders suddenly reports a completely different (negative) value:
woodstock:indi_eqmod_telescope% grep GetRAEncoder indi_eqmod_telescope_14:26:24.log|tail -4
SCOPE   115.310675 sec  : GetRAEncoder() = 8388608
SCOPE   116.370232 sec  : GetRAEncoder() = 8388608
SCOPE   117.429490 sec  : GetRAEncoder() = 8388608
SCOPE   118.490701 sec  : GetRAEncoder() = -12288
woodstock:indi_eqmod_telescope% grep GetDEEncoder indi_eqmod_telescope_14:35:04.log|tail -4
SCOPE   368.654925 sec  : GetDEEncoder() = 9376373
SCOPE   369.713867 sec  : GetDEEncoder() = 9376373
SCOPE   370.773503 sec  : GetDEEncoder() = 9376373
SCOPE   371.833989 sec  : GetDEEncoder() = -761

I am currently using it through the Synscan hand controller in PC Direct mode - could that be the problem?
5 years 5 months ago #30249

Please Log in or Create an account to join the conversation.

  • Posts: 1009
  • Thank you received: 133
This seems to be some communication problem. If I look at the logs, and compare the good and bad case, I see
COMM    106.305638 sec  : dispatch_command: ":j2", 4 bytes written
COMM    106.321439 sec  : read_eqmod: "=003091", 8 bytes read
SCOPE   106.321567 sec  : GetDEEncoder() = 9515008
--
COMM    107.365940 sec  : dispatch_command: ":j2", 4 bytes written
COMM    107.382985 sec  : read_eqmod: "=0030", 9 bytes read
SCOPE   107.383103 sec  : GetDEEncoder() = -49729536
It reads an additional byte (9 instead of 8 ). I checked all hangs I have logs for, always the same: Good reads receive 8 bytes, the bad one 9. Some suggestions how to further narrow this down would be highly welcome!
The following user(s) said Thank You: Jasem Mutlaq
Last edit: 5 years 5 months ago by Peter Sütterlin.
5 years 5 months ago #30269

Please Log in or Create an account to join the conversation.

Good observations. Perhaps you could be put a break point once the value < 0 and then trace that back to read_eqmod and see what's going on with this particular read? You'd need to know how to use gdb (or QtCreator)
5 years 5 months ago #30308

Please Log in or Create an account to join the conversation.

  • Posts: 1009
  • Thank you received: 133
Sorry, I had put that back for a while (during new moon...)
Meanwhile I got my direct usb cable for eqmod. Only some quick tests so far, but with that cable there were no hangs/misscommunications. Also, I had been using the normal synscan module extensively via exactly the same cable and did not experience problems there either, so it somehow seems linked to the PC Direct mode.

Full moon is ahead, so I'll probably have some time trying this breakpoint/debug thing. I'm not really a programmer though...
I'll share my findings (should I get some...)
5 years 5 months ago #30515

Please Log in or Create an account to join the conversation.

Time to create page: 0.588 seconds