Skip to content

[Bug]: Gateway restart hangs indefinitely — D-Bus race with systemd user unit #29421

@Ieqzya

Description

@Ieqzya

Platform: Linux (Ubuntu 24.04, ARM64, systemd user unit)
Hermes version: 2026.5.16

Summary

hermes gateway restart (which calls systemctl --user restart hermes-gateway) hangs indefinitely due to a D-Bus race condition. The gateway process never restarts. The only reliable workaround is kill -9 <PID> and letting systemd's Restart=always bring it back.

Steps to reproduce

  1. Start gateway as systemd user service
  2. Change any config that requires restart
  3. Run systemctl --user restart hermes-gateway
  4. Command hangs forever, gateway does not restart

Workaround

kill -9 $(systemctl --user show -p MainPID hermes-gateway | cut -d= -f2)
# systemd auto-restarts via Restart=always after RestartSec

Logs after kill -9

Main process exited, code=killed, status=9/KILL
<new PID spawned after RestartSec>

Additional context

Occurs on Linuxbrew-installed Hermes. Unit file: ~/.config/systemd/user/hermes-gateway.service. Restart parameters: Restart=always, RestartSec=60, RestartMaxDelaySec=300, RestartSteps=20. The D-Bus session bus seems to lose the connection during the restart handoff, causing the systemctl command to block indefinitely.

Metadata

Metadata

Assignees

No one assigned

    Labels

    P2Medium — degraded but workaround existscomp/gatewayGateway runner, session dispatch, deliverytype/bugSomething isn't working

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions