Skip to content

Sporadic kills with cargo run on macOS 12 #10060

@ehuss

Description

@ehuss

Problem

Since recently updating to macOS 12.0.1 (Monterey), I have been experiencing sporadic issues with security failures causing the kernel to kill the process before it starts.

In the logs, I see the following messages:

default 11:54:02.325853-0800 kernel ASP: Security policy would not allow process: 33133, /Users/eric/Proj/rust/toml-rs/scratch/a/target/debug/a-337f91948997ff1e
default 11:54:02.325856-0800 kernel ASP: Could not find reference 20142, process must have died

It happens very randomly. Sometimes it will happen constantly, and sometimes it might not happen for several minutes of repeated runs.

I'm not sure what "Could not find reference" means. Is that perhaps the pid of cargo itself?

Steps

Run touch src/main.rs ; cargo run a few times on a smallish project, like something that depends on toml.

Possible Solution(s)

I haven't had a chance to investigate more. This doesn't happen on all projects (I haven't had a problem with building cargo for example). It doesn't seem to matter where I run cargo run from (editor, terminal, etc.).

Notes

No response

Version

cargo 1.58.0-nightly (6c1bc24b8 2021-10-24)
release: 1.58.0
commit-hash: 6c1bc24b8b49d4bc965f67d7037906dc199c72b7
commit-date: 2021-10-24
host: x86_64-apple-darwin
libgit2: 1.3.0 (sys:0.13.23 vendored)
libcurl: 7.77.0 (sys:0.4.49+curl-7.79.1 system ssl:(SecureTransport) LibreSSL/2.8.3)
os: Mac OS 12.0.1 [64-bit]

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions