Px4-autopilot: UAVCAN hardfault on "uavcan param list"

Created on 22 Apr 2020  路  9Comments  路  Source: PX4/PX4-Autopilot

Describe the bug
After a few calls uavcan param <list/get/set>, I encounter a hardfault that leads to a reboot.

To Reproduce
Steps to reproduce the behavior:

  1. Black Cube (px4_fmu-v3_default) running latest PX4 master branch
  2. Power via USB
  3. Attach a Here2 GPS to CAN1 (the "real" CAN1)
  4. Connect to serial console via an FTDI adapter
  5. Call uavcan status to ensure UAVCAN is running (this will produce a crap ton of node-spin and vehicle_air_data errors, these don't appear in v1.10...). It doesn't matter if you set UAVCAN_ENABLE to 0 and manually start it after boot, or set UAVCAN_ENABLE to 1.
  6. Do a command like uavcan param list <nodeid> a few times
  7. Cube will hardfault after anywhere from 2-5 calls from a fresh boot

Log Files and Screenshots
image

uavcan status error messages:
status erros

The hardfault after some get and set commands:
hardfault occurance

Reproducing the hardfault with 3 calls to uavcan param list 3:
image

bug uavcan

Most helpful comment

All 9 comments

This is also a bug.

Screenshot from 2020-04-23 09-24-08

This is probably just the command line uavcan param helpers missing locking.

Forgot to update here - the possible fix #14741 does not seem to work. Still unclear what the root cause might be. The suggested solution makes sense (race condition on resource access), but the location of the error has not yet been found.

Thanks for the update, I'll try to reproduce locally with a debugger attached.

Cool, that would make things much easier for sure. It doesn't always throw a hardfault though; whatever memory corruption is occurring seems to happen in a few possible locations.

This issue has been automatically marked as stale because it has not had recent activity. Thank you for your contributions.

I experienced this too, I think this may have been a stack overflow, potentially fixed by #15864

Should be fixed by master, please re-open if that's not the case.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

prothen picture prothen  路  5Comments

lgh5054 picture lgh5054  路  4Comments

bthnekn picture bthnekn  路  4Comments

felix-west picture felix-west  路  4Comments

huangwen0907 picture huangwen0907  路  3Comments