PX4 / PX4-Autopilot

PX4 Autopilot Software
https://px4.io
BSD 3-Clause "New" or "Revised" License
8.21k stars 13.38k forks source link

High RAM usage on NXP FMUK66 on main (likely due to UAVCAN) #21836

Closed dirksavage88 closed 11 months ago

dirksavage88 commented 1 year ago

Describe the bug

High ram usage (maxed) on main using the FMUK66 by Nxp.

To Reproduce

This is with uavcan enabled and active connections to a uavcan gps+mag. Could not open a system console or console commands not recognized due to max ram usage. Nothing else out of the ordinary running (see screenshot). There is 256k ram on this FMU

Expected behavior

Could not replicate on stable/1.13 where ram usage was not causing issues.

Screenshot / Media

IMG_3177 IMG_3176

Flight Log

Will send log on discord at request (dm)

Software Version

Main

Flight controller

FMUK66

Vehicle type

Multicopter

How are the different components wired up (including port information)

No response

Additional context

No response

dirksavage88 commented 1 year ago

So according to @PetervdPerk-NXP this is a known issue with uavcan enabled due to listener expansion with no known solution as of yet. Perhaps make uavcan selective of which listeners/topics?

dirksavage88 commented 1 year ago

Thanks @junwoo091400 for updating the title now that we know the exact cause of the high ram usage on this board

DronecodeBot commented 1 year ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-community-q-a-august-02-2023/33434/1

henrykotze commented 1 year ago

I dont have that NXP board but try this PR whether it helps to reduce the RAM usage. https://github.com/PX4/PX4-Autopilot/pull/21928

dirksavage88 commented 1 year ago

I'll give it a shot @henrykotze.

In the mean time I disabled mavlink on the 2nd telem port and that helped reduce RAM usage.

mrpollo commented 1 year ago

Hey @PetervdPerk-NXP have you experience this before? Have any helpful tips for us?

henrykotze commented 1 year ago

@dirksavage88 you will just need to configure the board via the 'make boardconfig' command and disable all uavcan related subscribers and controllers.

dirksavage88 commented 1 year ago

Kazam_screenshot_00012

About 90%, and I disabled all the uavcan subscribers except for GPS (which I use over DroneCAN), optical flow (I have a can flow sensor I use from time to time) and rangefinder. Serial over telem is back to default.

DronecodeBot commented 12 months ago

This issue has been mentioned on Discussion Forum for PX4, Pixhawk, QGroundControl, MAVSDK, MAVLink. There might be relevant details there:

https://discuss.px4.io/t/px4-community-q-a-september-20-2023/34296/2

dirksavage88 commented 11 months ago

Fixed in #21928