ArduPlane, ArduCopter, ArduRover, ArduSub source
Go to file
Andrew Tridgell 322b7520de AP_CANManager: fixed critical race in log_text()
the AP_CANManager::log_text() gets called from debug logging in
AP_DroneCAN. It is a method on a common AP_CANManager object which is
shared by multiple AP_DroneCAN threads.

if two threads call the debug log messages at the same time then we
can end up with _log_pos greater than LOG_BUFFER_SIZE (1024) and
overwrite past the end of the buffer

in the crash_dump we have for this case the next piece of memory was
hal.can[0], and the overwrite of the buffer had corrupted the
MessageRam_ structurre in the ChibiOS CAN interface code. That led to
a hardfault on receive of a CAN message

Note that this issue only happens if CAN_LOGLEVEL is set to greater
than zero, and the default is zero. So users can avoid the bug by
checking they have not changed CAN_LOGLEVEL.

Also, this is likely an issue that only happens on startup, as once
the two AP_DroneCAN threads are fully running they have the same
thread priority so can't pre-empt each other. During startup some
messages are sent from the main thread which has a different priority
to the AP_DroneCAN threads, and can thus trigger this issue
2024-12-14 15:41:38 +11:00
.github .github: remove mantic test from environnement testing EOL 2024-11-26 15:41:16 +11:00
.vscode vscode: set lua version to 5.3 2024-02-07 18:44:56 +11:00
AntennaTracker Tracker: 4.6.0-beta2 release notes 2024-12-12 15:15:35 +11:00
ArduCopter Copter: 4.6.0-beta2 release notes 2024-12-12 15:15:41 +11:00
ArduPlane Plane: 4.6.0-beta2 release notes 2024-12-12 15:15:44 +11:00
ArduSub Sub: add support for `AVAILABLE_MODES` msg 2024-11-13 20:11:50 +11:00
Blimp Blimp: add support for `AVAILABLE_MODES` msg 2024-11-13 20:11:50 +11:00
Rover Rover: 4.6.0-beta2 release notes 2024-12-12 15:15:39 +11:00
Tools Tools: remove superfluous linefeed from panic strings 2024-12-14 10:06:13 +11:00
benchmarks waf: add gbenchmark Waf tool 2015-12-03 07:54:31 +11:00
docs treewide: fix shebangs - /bin/bash -> /usr/bin/env bash 2024-02-13 11:36:23 +11:00
libraries AP_CANManager: fixed critical race in log_text() 2024-12-14 15:41:38 +11:00
modules MAVLink: add required messages to support addition of modes at runtime 2024-11-13 20:11:50 +11:00
tests AP_gtest: enable testing for exit conditions, SITL unit tests 2021-09-28 09:11:48 +10:00
.dir-locals.el emacs: add a .dir-locals.el 2016-10-24 09:41:31 -02:00
.dockerignore Tools: fix junit report and add firmware version on report 2023-11-22 18:32:19 +11:00
.editorconfig .editorconfig: Update for more standards aware editors 2023-05-23 09:56:28 +10:00
.flake8 Tools: Improved flake8 speed, ignore, and exclude 2022-06-28 13:16:24 +10:00
.git-blame-ignore-revs .git-blame: Ignore reformat in ROS2 2024-09-06 21:28:25 +10:00
.gitattributes .gitattributes: mark bin, elf and hex as binary 2021-05-20 11:45:02 +10:00
.gitignore AP_HAL_ESP32: move generated sdkconfig to build folder 2024-12-10 10:32:47 +11:00
.gitmodules lwip: remove ext/lwip and add as modules/lwip 2024-01-03 12:14:47 +11:00
.pre-commit-config.yaml pre-commit: remove check for dds_xrce_profile.xml 2024-05-29 17:47:52 +10:00
.pydevproject AP_Relay: add -1:Disabled to list of param values 2014-05-15 17:13:37 +09:00
.valgrind-suppressions Valgrind: add supressions file and .valgrindrc using it 2019-07-18 16:49:11 +10:00
.valgrindrc Valgrind: add supressions file and .valgrindrc using it 2019-07-18 16:49:11 +10:00
BUILD.md docker: add usage instructions to BUILD.md 2024-05-29 08:31:11 +09:00
CODE_OF_CONDUCT.md Add developer code of coduct 2022-02-08 10:53:35 +11:00
COPYING.txt cmake overhaul, cleaned up readme, added license 2011-09-30 17:32:51 -04:00
Dockerfile Dockerfile: Added Micro-XRCE-DDS-GEN instal to Dockerfile. 2024-11-08 10:50:05 +11:00
Doxyfile.in cfg: Fix typos 2016-05-13 19:20:07 -03:00
Makefile Make: use https:// scheme for ardupilot URLs 2019-12-10 07:53:46 +11:00
README.md README: add Navigator maintainer attribution 2024-06-27 00:06:38 -03:00
Vagrantfile Vagrant: add support for Ubuntu Noble, 24.04 2024-05-10 10:20:34 +10:00
pyproject.toml global: add skip-string-normalization to black config 2022-07-26 21:23:42 +10:00
waf waf: use python3 even if /usr/bin/python is v2 2023-05-06 10:09:04 +10:00
wscript Tools:waf: add option to build IOMCU firmware with profiled support 2024-11-20 19:12:44 +11:00

README.md

ArduPilot Project

Discord

Test Copter Test Plane Test Rover Test Sub Test Tracker

Test AP_Periph Test Chibios Test Linux SBC Test Replay

Test Unit Teststest size

Test Environment Setup

Cygwin Build Macos Build

Coverity Scan Build Status

Test Coverage

Autotest Status

ArduPilot is the most advanced, full-featured, and reliable open source autopilot software available. It has been under development since 2010 by a diverse team of professional engineers, computer scientists, and community contributors. Our autopilot software is capable of controlling almost any vehicle system imaginable, from conventional airplanes, quad planes, multi-rotors, and helicopters to rovers, boats, balance bots, and even submarines. It is continually being expanded to provide support for new emerging vehicle types.

The ArduPilot project is made up of:

User Support & Discussion Forums

Developer Information

Top Contributors

How To Get Involved

License

The ArduPilot project is licensed under the GNU General Public License, version 3.

Maintainers

ArduPilot is comprised of several parts, vehicles and boards. The list below contains the people that regularly contribute to the project and are responsible for reviewing patches on their specific area.