The logs were downloaded with process_ftp_reply() called in slices of 4.2 s, to send heartbeats between them and to detect a stall. pymavlink terminates the session when process_ftp_reply() times out, so any download longer than one slice was aborted at its first byte count, and reported as stalled at 0 bytes after 30 s: a 290 KB log over a serial link at 115200 baud, or a long log over a telemetry radio. The download is now driven in one call bounded by the budget, the idle detection of pymavlink detects a stall, and the heartbeats are sent from the progress callback.
Assisted-by: Claude:opus-5.5