Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cargo test --no-run sometimes gets SIGKILL out of thin air on MacOS #10476

Open
matklad opened this issue Mar 13, 2022 · 3 comments
Open

cargo test --no-run sometimes gets SIGKILL out of thin air on MacOS #10476

matklad opened this issue Mar 13, 2022 · 3 comments
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.

Comments

@matklad
Copy link
Member

matklad commented Mar 13, 2022

Problem

In xshell, my macos builds fail fairly frequently with

command was terminated by a signal `cargo test --workspace --no-run`: 9

See, eg

https://github.com/matklad/xshell/runs/5529460783?check_suite_focus=true#step:4:22

What specifically happens here is that GitHub actions invokes cargo run --example ci, and that example recursively invokes cargo test --run, which then gets killed.

It seems like this is something we saw previously in #7821 and #10060.

Opening this issue to signal that this doesn't seem to be entirely fixed!

Steps

No response

Possible Solution(s)

No response

Notes

No response

Version

1.59.0
@matklad matklad added the C-bug Category: bug label Mar 13, 2022
matklad added a commit to matklad/xshell that referenced this issue Mar 13, 2022
Apparently CI failures are unrelated:
  <rust-lang/cargo#10476>
matklad added a commit to matklad/xshell that referenced this issue Mar 13, 2022
Apparently CI failures are unrelated:
  <rust-lang/cargo#10476>
@ehuss
Copy link
Contributor

ehuss commented Mar 13, 2022

Can you get the system logs? I don't know offhand how to get those from GitHub Actions. Normally I record them locally using console.app.

I see sh.remove_path("./target")?; in your script. One possibility is that the provenance for the executable is lost (for the temporary signatures). Perhaps consider using a separate target directory instead?

@jjant
Copy link

jjant commented Jan 18, 2023

This also happens to me, cargo t (I don't use --no-run) randomly dies:

failures:

---- src/lib.rs - (line 44) stdout ----
Test executable failed (signal: 9 (SIGKILL)).


failures:
    src/lib.rs - (line 44)

test result: FAILED. 4 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 1.45s

@nine9ths
Copy link

I was also able to intermittently reproduce this when using cargo test --doc from this minimal example:

//! ```
//! use crate::this;
//! let foo = this::add(1,2);
//! assert_eq!(3, foo);
//! ```

pub fn add(left: usize, right: usize) -> usize {
    left + right
}

However, without anything changing on my system to my knowledge (i.e. the same session). It started succeeding without fail. Notably this was after I started trying to capture the system logs via Console.app.

M1 Pro, macOS Sonoma 14.5 (23F79)

@epage epage added the S-triage Status: This issue is waiting on initial triage. label Nov 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug S-triage Status: This issue is waiting on initial triage.
Projects
None yet
Development

No branches or pull requests

5 participants