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

Epic: Support async signal handlers in Go static executables #842

Closed
iapaddler opened this issue Mar 14, 2022 · 1 comment
Closed

Epic: Support async signal handlers in Go static executables #842

iapaddler opened this issue Mar 14, 2022 · 1 comment
Assignees
Labels
Milestone

Comments

@iapaddler
Copy link
Contributor

Ref #508 and #667

@iapaddler iapaddler self-assigned this Mar 14, 2022
@ghost ghost added this to the Next Minor (1.1.0) milestone Mar 16, 2022
@iapaddler
Copy link
Contributor Author

Integrated with the internal libc. Latest on branch feat-internal-libc-dev.

  • Disabled fs register switch in go_switch_thread()
  • Ran terraform version 1.0.3 in a container (latest version is 1.17)
  • This version of terraform uses panicwrap, which has the side affect of changing the argv list. In order to test signals and not deal with the argv array issue, the command line handling was hardcoded to make the command ldscope terraform -help work.
  • Created a script that runs terraform help in a loop. This is the scenario where were able to see segfaults from async signal handlers previous to the use of an internal libc. Loop on this and check for errors in the return value:
    SCOPE_CRIBL_ENABLE=false ./ldscope terraform -help
  • Previously we would see segfaults within <=100 times in this loop. The loop ran >20,000 times.
  • Verified that this version of terraform uses Go 1.16 and we are getting events emitted.
  • Verified that this version of terraform uses panicwrap: nm /bin/terraform | grep -i panicwrap
    0000000000409a00 T runtime.panicwrap
    000000000090e740 T github.com/mitchellh/panicwrap.Wrap
  • FYI: the latest version of terraform uses Go 1.17 (likely 1.18 now). It appears from looking at source code that panicwrap is no longer used. We should test the argv list with Go 1.17+ support. Do we need to make changes to accommodate the argv list used here?

@iapaddler iapaddler changed the title Support async signal handlers in Go static executables Epic: Support async signal handlers in Go static executables Apr 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants