Bamboo agent systemd service should gracefully handle OOM events in child processes

XMLWordPrintable

    • Type: Suggestion
    • Resolution: Unresolved
    • None
    • Component/s: Agents
    • None

      Problem

      When a Bamboo remote agent is installed as a systemd service using the official installation guide, the generated service file includes KillMode=control-group by default. If a Script task or one of its child processes exhausts available memory and is OOM-killed by the kernel, the entire service cgroup is affected — including the Tanuki wrapper, the Bamboo agent Java process, and all running tasks.

      As a result:

      • The Bamboo agent process is terminated along with the offending child process.
      • The build does not complete cleanly and remains stuck until manually stopped.
      • The agent is unavailable until the service is manually restarted.

      Expected Behavior

      When a child process spawned by a Script task is OOM-killed:

      • Only the offending child process should be terminated.
      • The Bamboo agent process should remain running and unaffected.
      • Bamboo should observe the task failure, capture the return code, and mark the job as failed.
      • The agent should continue accepting new builds without requiring a service restart.

              Assignee:
              Unassigned
              Reporter:
              Venkata Sateesh Pentela
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated: