Peter BarkerandClaude Opus 5 0da91dbac3 AP_HAL_SITL: do not truncate the stack dump on a short write
dump_stack_trace() and dump_core_file() both run a script on our own pid
and copy its output to stderr a block at a time.  The copy ended on any
write() which did not place the whole block:

    if (write(2, buf, ret) != ret) {
        // *sigh*
        break;
    }

write() is entitled to do that.  stderr is a pipe when SITL runs under
autotest, so a full pipe shortens a write, and a timer signal can cut one
short with EINTR.  Either way the copy stopped silently, part-way
through, with no "end dumpstack.sh output" line to show that anything was
missing.

Seen in CI: a backtrace ended at frame #8, in the middle of the frame
which would have named the caller - the one thing the dump exists to
provide.  A truncated core dump goes the same way and is even easier to
miss.

Keep writing until the block is out, retry EINTR on both the read and the
write, and say so if a write really does fail.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-25 10:22:12 +10:00
2026-08-20 08:47:04 +09:00
2026-08-04 13:02:09 +10:00
…
…
…
…
…

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

OpenSSF Best Practices

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.

Languages
C++ 62.3%
Python 17.7%
C 10%
Lua 4.8%
C# 2.1%
Other 2.7%