Skip to content

soak: bash 5.2 drops a trapped signal that arrives while it expands a $(…), so a TERM to a soak script can be lost #1418

Closed

Description

@bpalermo

bash 5.2.21 drops a trapped signal that arrives while it is expanding a command substitution. It prints trap: line 2: unexpected EOF while looking for matching ')', the handler does not run, and the script carries on. Seen 2 times in 1,680 timed TERMs, both in out()'s $(date …) in e2e/soak/restart-watch.sh; the process had no pending signal afterwards. It orphans nothing, but a single TERM can be ignored. Every trapping script in e2e/soak/ (churn.sh too) has the exposure.

Options: avoid $(…) in the hot path of trapping scripts (printf '%(…)T' for timestamps needs no subshell); or document that stopping a soak script means sending TERM until it exits. PR #1417's test sends its in-command TERMs from the fake kubectl to avoid the bug.

Reported by the soak harness work (PR #1417), not changed there.

🤖 Generated with Claude Code

https://claude.ai/code/session_01NArCRTfMPZkw4Y97U9Gdsr

Activity

  1. added
    bug
    minor
    soak
    on Oct 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugminorsoak

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions