Bug Description
A Telegram Hermes gateway repeatedly crashes with SIGSEGV on Raspberry Pi aarch64.
This affects more than one Hermes profile on the same host. I have two separate profile gateways, each with its own Telegram bot token and systemd service. Both profiles have crashed with status=11/SEGV, so this appears to be in the shared gateway/runtime path rather than a profile-specific data issue.
The crash was reproduced both:
- under the systemd-managed Hermes gateway service
- in foreground mode using
hermes -p <profile> gateway run
During the foreground test, the last visible output before the process exited was repeated Telegram reconnect warnings:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
The foreground capture then ended with:
Script done on 2026-05-14 18:36:05+10:00 [COMMAND_EXIT_CODE="139"]
Exit code 139 is consistent with SIGSEGV.
The Pi itself appeared healthy during the crashes: no disk pressure, no RAM pressure, no swap use, normal temperature, and no throttle/undervoltage flags.
Steps to Reproduce
- Configure two separate Hermes profiles with Telegram gateway enabled.
- Run each profile as a system-level gateway service.
- Leave the gateways running while Telegram polling/reconnects occur.
- Observe intermittent gateway crashes in journald with:
Main process exited, code=killed, status=11/SEGV
- Stop one affected profile service and run that same profile in foreground mode:
sudo -u hermes -H bash -lc '
export PATH="/home/hermes/.local/bin:$PATH"
script -q -f /tmp/hermes-foreground-capture.log -c "hermes -p <profile> gateway run"
- Wait for Telegram reconnect warnings.
Observed foreground output before exit:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
- The foreground script capture ended with:
Expected Behavior
Telegram network errors such as httpx.ReadError should be handled by reconnect/retry logic without terminating the gateway process.
The gateway should either recover the Telegram polling connection or log a recoverable platform error while keeping the gateway process alive.
Actual Behavior
The gateway process intermittently exits with SIGSEGV.
Systemd examples from the current boot:
May 14 07:01:47 hermes-pi systemd[1]: hermes-gateway-<profile-b>.service: Main process exited, code=killed, status=11/SEGV
May 14 07:02:28 hermes-pi systemd[1]: hermes-gateway-<profile-a>.service: Main process exited, code=killed, status=11/SEGV
May 14 07:06:32 hermes-pi systemd[1]: hermes-gateway-<profile-b>.service: Main process exited, code=killed, status=11/SEGV
May 14 07:46:41 hermes-pi systemd[1]: hermes-gateway-<profile-a>.service: Main process exited, code=killed, status=11/SEGV
May 14 11:15:38 hermes-pi systemd[1]: hermes-gateway-<profile-a>.service: Main process exited, code=killed, status=11/SEGV
May 14 11:40:49 hermes-pi systemd[1]: hermes-gateway-<profile-a>.service: Main process exited, code=killed, status=11/SEGV
May 14 14:03:27 hermes-pi systemd[1]: hermes-gateway-<profile-a>.service: Main process exited, code=killed, status=11/SEGV
May 14 19:32:14 hermes-pi systemd[1]: hermes-gateway-<profile-b>.service: Main process exited, code=killed, status=11/SEGV
Foreground reproduction:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
Script done on 2026-05-14 18:36:05+10:00 [COMMAND_EXIT_CODE="139"]
No Python traceback was captured before the SIGSEGV.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Report https://paste.rs/VKOym
agent.log https://paste.rs/0ICjW
gateway.log https://paste.rs/H4V2g
Operating System
Raspberry Pi OS Lite 64-bit / Debian 13 trixie, Linux 6.12.75+rpt-rpi-v8 aarch64
Python Version
3.11.15
Hermes Version
Hermes Agent v0.13.0 (2026.5.7), commit dd0923b
Additional Logs / Traceback (optional)
Foreground capture from `script`:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error, scheduling reconnect: httpx.ReadError:
WARNING gateway.platforms.telegram: [Telegram] Telegram network error (attempt 1/10), reconnecting in 5s. Error: httpx.ReadError:
Script done on 2026-05-14 18:36:05+10:00 [COMMAND_EXIT_CODE="139"]
Service Python/runtime:
executable: /home/hermes/.hermes/hermes-agent/venv/bin/python
python: 3.11.15 (main, May 10 2026, 19:28:24) [Clang 22.1.3]
platform: Linux-6.12.75+rpt-rpi-v8-aarch64-with-glibc2.41
sqlite3: 3.50.4
numpy: 2.4.3
pydantic_core: 2.41.5
onnxruntime: 1.26.0
tokenizers: 0.23.1
No Python traceback was captured before the process exited.
Root Cause Analysis (optional)
Unknown.
Based on the evidence, this appears to be a native/runtime crash in the shared Telegram gateway path rather than a normal Python exception:
- no Python traceback appeared before the crashes
- systemd reported
status=11/SEGV
- foreground mode exited with
COMMAND_EXIT_CODE="139"
- repeated Telegram
httpx.ReadError reconnect warnings appeared immediately before the foreground exit
- more than one Hermes profile on the same host was affected
Possible areas to investigate:
- Telegram polling/reconnect handling
- python-telegram-bot / httpx reconnect path
- gateway background scheduler/cron interaction with Telegram reconnects
- native dependencies loaded in the gateway process
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?
Bug Description
A Telegram Hermes gateway repeatedly crashes with SIGSEGV on Raspberry Pi aarch64.
This affects more than one Hermes profile on the same host. I have two separate profile gateways, each with its own Telegram bot token and systemd service. Both profiles have crashed with
status=11/SEGV, so this appears to be in the shared gateway/runtime path rather than a profile-specific data issue.The crash was reproduced both:
hermes -p <profile> gateway runDuring the foreground test, the last visible output before the process exited was repeated Telegram reconnect warnings:
The foreground capture then ended with:
Exit code 139 is consistent with SIGSEGV.
The Pi itself appeared healthy during the crashes: no disk pressure, no RAM pressure, no swap use, normal temperature, and no throttle/undervoltage flags.
Steps to Reproduce
Observed foreground output before exit:
Expected Behavior
Telegram network errors such as
httpx.ReadErrorshould be handled by reconnect/retry logic without terminating the gateway process.The gateway should either recover the Telegram polling connection or log a recoverable platform error while keeping the gateway process alive.
Actual Behavior
The gateway process intermittently exits with SIGSEGV.
Systemd examples from the current boot:
Foreground reproduction:
No Python traceback was captured before the SIGSEGV.
Affected Component
Gateway (Telegram/Discord/Slack/WhatsApp)
Messaging Platform (if gateway-related)
Telegram
Debug Report
Operating System
Raspberry Pi OS Lite 64-bit / Debian 13 trixie, Linux 6.12.75+rpt-rpi-v8 aarch64
Python Version
3.11.15
Hermes Version
Hermes Agent v0.13.0 (2026.5.7), commit dd0923b
Additional Logs / Traceback (optional)
Root Cause Analysis (optional)
Unknown.
Based on the evidence, this appears to be a native/runtime crash in the shared Telegram gateway path rather than a normal Python exception:
status=11/SEGVCOMMAND_EXIT_CODE="139"httpx.ReadErrorreconnect warnings appeared immediately before the foreground exitPossible areas to investigate:
Proposed Fix (optional)
No response
Are you willing to submit a PR for this?