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

Unset DYLD_INSERT_BINARIES when unneeded #2428

Closed
wants to merge 2 commits into from

Conversation

angelapwen
Copy link
Contributor

@angelapwen angelapwen commented Aug 14, 2024

Previously, the tracer environment variables were set for the
current process, and for future steps, in the init action. In
certain scenarios (such as on MacOS ARM runners with System
Integrity Protection disabled), these environment variables are
not unset by the system. In particular, the DYLD_INSERT_BINARIES
variable interferes with later system calls.

This change unsets the DYLD_INSERT_BINARIES variable for the
current process in init. It also unsets the variables either at the
beginning of autobuild, or analyze, if autobuild has not run.

Merge / deployment checklist

  • Confirm this change is backwards compatible with existing workflows.
  • Confirm the readme has been updated if necessary.
  • Confirm the changelog has been updated if necessary.

@angelapwen angelapwen force-pushed the angelapwen/unset-tracer-env-vars branch 4 times, most recently from 4fa88f5 to 2491c18 Compare August 14, 2024 21:53
@angelapwen angelapwen marked this pull request as ready for review August 14, 2024 22:05
@angelapwen angelapwen requested a review from a team as a code owner August 14, 2024 22:05
src/init-action.ts Outdated Show resolved Hide resolved
src/tracer-config.ts Outdated Show resolved Hide resolved
src/tracer-config.ts Outdated Show resolved Hide resolved
@angelapwen
Copy link
Contributor Author

Getting some unbound variable errors from the autobuilders. I'll test out only unsetting the variable that we need to fix this issue.

@angelapwen angelapwen marked this pull request as draft August 14, 2024 22:53
@angelapwen angelapwen force-pushed the angelapwen/unset-tracer-env-vars branch from 360bbc2 to 426ccd5 Compare August 14, 2024 22:58
Previously, the tracer environment variables were set for the
current process, and for future steps, in the init action. In
certain scenarios (such as on MacOS ARM runners with System
Integrity Protection disabled), these environment variables are
not unset by the system. In particular, the `DYLD_INSERT_BINARIES`
variable interferes with later system calls.

This change unsets the `DYLD_INSERT_BINARIES` variable for the
current process in init. It also unsets the variables either at the
beginning of autobuild, or analyze, if autobuild has not run.
@angelapwen angelapwen force-pushed the angelapwen/unset-tracer-env-vars branch from 426ccd5 to 954566e Compare August 15, 2024 00:30
@angelapwen angelapwen changed the title Unset tracer environment variables when unneeded Unset DYLD_INSERT_BINARIES when unneeded Aug 15, 2024
@angelapwen angelapwen marked this pull request as ready for review August 15, 2024 00:46
@angelapwen
Copy link
Contributor Author

Hrm... hang on, still getting warnings related to the insertion when running on macos-latest so moving back to draft.

@angelapwen angelapwen marked this pull request as draft August 15, 2024 00:49
@angelapwen
Copy link
Contributor Author

Closing as unsetting this variable doesn't seem to have done what we'd hoped. We will stop running the system binary instead for now: #2434

@angelapwen angelapwen closed this Aug 20, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants