kauailabs / allwpilib

Fork of Official Repository of WPILibJ and WPILibC, which contain in addition a HAL for the KauaiLabs VMX-pi.
Other
1 stars 3 forks source link

Abrupt loss of communication with driver station; robot app appears to have shut down #22

Closed kauailabs closed 5 years ago

kauailabs commented 5 years ago

Some communication timeouts are seen, then the Phoenix library indicates it is undergoing normal shutdown (as if the robot class is being detroyed?) and then the driver station loses communication.

Leading hypothesis: It looks like the main robot scheduler decided to shut down.

Logs from James Taylor, 8/26/2019

VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1877218400 VMX HAL: Error reading from bank 2, address 2, length 2. Mon Aug 19 12:50:27 2019 - ERROR: (-20018) VMX HAL: ERROR retrieving CAN Interrupt Status.
(VMXCAN.cpp [435]) VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. Mon Aug 19 12:50:27 2019 - ERROR: (-20018) VMX HAL: ERROR retrieving CAN Interrupt Status.
(VMXCAN.cpp [435]) VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1877218400 VMX HAL: Error reading from bank 2, address 2, length 2. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. Mon Aug 19 12:50:27 2019 - ERROR: (-20018) VMX HAL: ERROR retrieving CAN Interrupt Status.
(VMXCAN.cpp [435]) VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1877218400 VMX HAL: Error reading from bank 2, address 2, length 2. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. Mon Aug 19 12:50:27 2019 - ERROR: (-20018) VMX HAL: ERROR retrieving CAN Interrupt Status.
(VMXCAN.cpp [435]) VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1877218400 VMX HAL: Error reading from bank 2, address 2, length 2. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. Mon Aug 19 12:50:27 2019 - ERROR: (-20018) VMX HAL: ERROR retrieving CAN Interrupt Status.
(VMXCAN.cpp [435]) VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1877218400 VMX HAL: Error reading from bank 2, address 2, length 2. VMX HAL: Timeout in wait_for_comm_ready(vmx-pi ready to transmit [high]) after 5000 microseconds - Thread ID: 1902396512 VMX HAL: Error reading from bank 0, address 4, length 108. VMX HAL: Unexpectedly long delay (6627 microseconds) in wait_for_comm_ready(false) - Thread ID: 1902396512. diff_us: 6627; toolong_period_us: 500 Warning 0 [phoenix] Shutdown cleanly
[phoenix] Shutdown cleanly Warning 44004 FRC: The Driver Station has lost communication with the robot. Driver Station Warning 44002 Ping Results: link-bad, DS radio(.4)-bad, robot radio(.1)-bad, roboRIO(.2)-GOOD, FMS-bad FRC: Driver Station ping status has changed. Driver Station

kauailabs commented 5 years ago

This is believed to now be resolved; please retest this with VMX-pi 2019.4.1 Beta Release 13.

kauailabs commented 5 years ago

We have found one additional scenario for a shutdown like this. The java vm internally uses SIGSEGV and SIGILL signals (for implementation of memory barriers among other things) which conflicts with the signal handlers installed by the VMX-Pi HAL. This will be fixed in a new release if VMX-Pi HaL libraries.

kauailabs commented 5 years ago

This is fixed as of 2019.4.1 VMXpi Beta 16 Candidate (released 9/22/2019) and vmx-pi HAL version 1.1.207.