Skip to content

Raspberry Pi4 100% cpu, RX backlog exceeded #162

Description

@craigerl

Hi guys, I just checked out the devel branch. Looking at 100% cpu and frame timing/lag issues during connections, and it looks like you have some neat flushing to catchup, but we're still not in sync.

Connecting to KO0OOO (sort of) here in the USA! we have MERCURY winlink servers online! GREAT work!

-craig
KM6LYW
digipi.org

VERSION_CODENAME=trixie
DEBIAN_VERSION_FULL=13.4

Raspberry Pi 4 Model B Rev 1.5

Linux digipi7 6.12.75+rpt-rpi-v8 #1 SMP PREEMPT Debian 1:6.12.75-1+rpt1 (2026-03-11) aarch64 GNU/Linux

  PID USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM      
 2876 pi        20   0  185108  17856   9512 S 101.3   0.5   0:55.27 mercury  

pi@digipi7:~/git/mercury $ ./mercury
Rhizomatica Mercury Version 1.9.11 (git bf7d546)
Loaded configuration from mercury.ini
18:05:29.385 [+0.000s] [INF] [main] Async logger initialized (min_level=INFO)
18:05:29.385 [+0.000s] [INF] [arq] ARQ no-progress timeout: 180s
18:05:29.385 [+0.000s] [INF] [arq] ARQ disconnect drain timeout: 30s
18:05:29.385 [+0.000s] [INF] [arq] Data retry slots: 10
18:05:29.385 [+0.000s] [INF] [arq] mode_hold_after_downgrade_s = 6
18:05:29.385 [+0.000s] [INF] [arq] ladder_up_successes = 2
18:05:29.385 [+0.000s] [INF] [arq] retry_downgrade_threshold = 2
18:05:29.385 [+0.000s] [INF] [arq] channel_guard_ms = 700
18:05:29.385 [+0.000s] [INF] [arq] iss_post_ack_guard_ms = 900
18:05:29.385 [+0.000s] [INF] [arq] keepalive_interval_s = 20
18:05:29.385 [+0.000s] [INF] [arq] keepalive_miss_limit = 5
18:05:29.385 [+0.000s] [INF] [arq] peer_payload_hold_s = 15
18:05:29.385 [+0.000s] [INF] [arq] startup_max_s = 10
18:05:29.385 [+0.000s] [INF] [engine] Logger initialised (min_level=INFO)
18:05:29.385 [+0.000s] [INF] [engine] Initialising audio I/O (subsystem=0)
18:05:29.388 [+0.003s] [INF] [radio-io] Initializing radio (type=3073, device=/dev/ttyUSB0, hamlib_log_level=0, serial_speed=19200)
18:05:29.388 [+0.004s] [INF] [radio-io] Serial speed overridden to 19200 baud
18:05:29.392 [+0.007s] [INF] [audio-play] I/O playback (plughw:0,0 'USB Audio CODEC USB Audio') int32 / 48000Hz / 2ch / 30ms buffer
18:05:29.395 [+0.010s] [INF] [audio-cap] I/O capture (plughw:0,0 'USB Audio CODEC USB Audio') int32 / 48000Hz / 2ch / 30ms buffer
18:05:29.696 [+0.311s] [INF] [radio-io] Radio control: HAMLIB (model 3073, device /dev/ttyUSB0)
18:05:29.696 [+0.311s] [INF] [radio-io] hamlib runtime: Hamlib 4.6.2 2025-02-09T21:03:50Z SHA=870364 32-bit
18:05:29.696 [+0.311s] [INF] [radio-io] rig reports post_ptt_delay=0 ms (informational -- mercury's keying wait is independent of it)
18:05:29.696 [+0.311s] [INF] [engine] Initialising modem (mode=12)
18:05:29.696 [+0.312s] [INF] [modem] Created data buffers for ARQ and BROADCAST datalink, tx/rx paths.
18:05:29.709 [+0.324s] [INF] [modem] Initialized persistent FreeDV mode pool (DATAC16/DATAC15/DATAC13/DATAC4/DATAC3/DATAC1/DATAC17/QAM16C2), frames per burst: 1
18:05:29.709 [+0.324s] [INF] [modem] Active FreeDV mode at startup: 12 (DATAC3), verbosity: 0
18:05:29.709 [+0.324s] [INF] [modem] Modem expects sample rate: 8000 Hz
18:05:29.709 [+0.324s] [INF] [modem] Modem payload bytes per frame: 126
18:05:29.709 [+0.324s] [INF] [modem] Split control/data mode switching: ENABLED
18:05:29.709 [+0.324s] [INF] [arq-bus] Initialized channel bus
18:05:29.709 [+0.325s] [INF] [arq] Event loop started
18:05:29.709 [+0.325s] [INF] [arq] ARQ initialized (frame=126 mode=12)
18:05:29.709 [+0.325s] [INF] [bcast] Starting broadcast system...
18:05:29.709 [+0.325s] [INF] [bcast] Broadcast frame alignment OK (FreeDV mode 12, hermes mode 1): 126 bytes.
18:05:29.709 [+0.325s] [INF] [engine] Initialising TCP interfaces (arq=8300, bc=8100)
18:05:29.710 [+0.325s] [INF] [tcp-bcast] Waiting for a client to connect...
18:05:29.710 [+0.325s] [INF] [engine] Initialising UI websocket (port=10000, tls=0, waterfall=1)
18:05:29.710 [+0.325s] [INF] [tcp-ctl] Listening on TCP port 8300
18:05:29.710 [+0.325s] [INF] [tcp-data] Listening on TCP port 8301
18:05:29.710 [+0.325s] [INF] [websocket] Initialized (url=ws://0.0.0.0:10000)
18:05:29.710 [+0.325s] [INF] [ui-comm] WebSocket server ready on port 10000
18:05:29.710 [+0.325s] [INF] [ui-comm] Publisher thread started
18:05:29.710 [+0.325s] [INF] [ui-comm] Spectrum publisher thread started
18:05:29.710 [+0.325s] [INF] [engine] Mercury engine initialised
18:05:29.710 [+0.325s] [INF] [websocket] Server listening on ws://0.0.0.0:10000
18:05:29.710 [+0.326s] [INF] [ui-comm] Publisher started - sending status every 500ms via WebSocket (port 10000)
18:05:29.710 [+0.326s] [INF] [ui-comm] Spectrum publisher started - sending spectrum every 50 ms via WebSocket
18:05:29.921 [+0.536s] [INF] [modem-rx] Spectrum FFT active: nin=512 sr=8000 dB[0]=-36.9
18:05:33.427 [+4.042s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:05:37.646 [+8.261s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:05:38.379 [+8.995s] [INF] [tcp-ctl] Control client connected
18:05:38.380 [+8.995s] [INF] [tcp-data] Data client connected
18:05:38.380 [+8.995s] [INF] [tcp-ctl] Command received: PUBLIC ON
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: CWID ON
18:05:38.380 [+8.996s] [WRN] [tcp-ctl] Unknown command: CWID ON
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: COMPRESSION TEXT
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: MYCALL KM6LYW
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: LISTEN OFF
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: VERSION
18:05:38.380 [+8.996s] [INF] [tcp-ctl] Command received: BW2300
18:05:38.381 [+8.996s] [INF] [tcp-ctl] Command received: BW2300
18:05:38.381 [+8.996s] [INF] [tcp-ctl] Command received: WINLINK SESSION
18:05:38.381 [+8.996s] [WRN] [tcp-ctl] Unknown command: WINLINK SESSION
18:05:38.381 [+8.996s] [INF] [tcp-ctl] Command received: CONNECT KM6LYW KO0OOO
18:05:38.381 [+8.996s] [INF] [arq] My callsign: KM6LYW
18:05:38.623 [+9.239s] [INF] [radio] TX enabled (PTT ON)
18:05:42.405 [+13.020s] [INF] [radio] TX disabled (PTT OFF)
18:05:46.599 [+17.215s] [INF] [radio] TX enabled (PTT ON)
18:05:50.381 [+20.996s] [INF] [radio] TX disabled (PTT OFF)
18:05:54.467 [+25.083s] [INF] [radio] TX enabled (PTT ON)
18:05:58.249 [+28.864s] [INF] [radio] TX disabled (PTT OFF)
18:06:02.580 [+33.195s] [INF] [radio] TX enabled (PTT ON)
18:06:06.362 [+36.977s] [INF] [radio] TX disabled (PTT OFF)
18:06:10.518 [+41.134s] [INF] [radio] TX enabled (PTT ON)
18:06:14.300 [+44.915s] [INF] [radio] TX disabled (PTT OFF)
18:06:18.381 [+48.997s] [INF] [arq] Disconnected
18:06:18.437 [+49.053s] [INF] [tcp-ctl] Command received: BW2300
18:06:18.653 [+49.269s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:06:22.584 [+53.199s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:06:26.840 [+57.455s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:06:31.089 [+61.705s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:06:35.373 [+65.989s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up
18:06:39.668 [+70.283s] [WRN] [modem-rx] RX backlog exceeded ~2 s cap; flushing stale audio to catch up

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions