Skip to content

SIGINT throws bats into endless loop on Bash 5.2 (RC) #654

@gioele

Description

@gioele

Describe the bug

In versions 1.8.0, test "73 CTRL-C aborts and fails the current test" hangs when run on a recent Debian sid system.

Test 73 gets stuck without producing any output. Killing the test with CTRL-C makes the test suit starting the abort procedure, but then the test process gets stuck in Running state. Sending SIGKILL to the test process unblocks the test suite abort procedure.

ok 71 Parallel mode works on MacOS with over subscription (issue #433)
ok 72 Failure in free code (see #399)
[nothing shown on the terminal; the test process spins using 100% CPU until CTRL-C is pressed]
^Cnot ok 73 CTRL-C aborts and fails the current test
# (in test file test/bats.bats, line 767)
#   `wait $SUBPROCESS_PID && return 1' failed with status 130

# Received SIGINT, aborting ...

^C^C^C^C^C^C^C^C^C^C^C^C# bats warning: Executed 73 instead of expected 274 tests

To Reproduce

Steps to reproduce the behavior:

  1. docker run --rm -it -v /tmp/d debian:sid
  2. apt update && apt install git
  3. cd /tmp && git clone https://github.com/bats-core/bats-core && cd bats-core
  4. mkdir -p ~/.parallel && touch ~/.parallel/will-cite
  5. bin/bats --tap test

Expected behavior

Test 73 should run successfully.

Environment (please complete the following information):

  • Bats Version 1.8.0
  • OS: Debian sid
  • Bash version: 5.2.0(1)-rc2

Metadata

Metadata

Assignees

No one assigned

    Labels

    Component: Bash CodeEverything regarding the bash codePriority: HighBroken behavior in specific environments like in parallel mode or only on some operating systemsStatus: ConfirmedThe reproducer worked as describedType: Bug

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions