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

Gomplate v3.11.x Go 1.21 panic: go4.org/unsafe/assume-no-moving-gc #1872

Closed
erharb opened this issue Oct 6, 2023 · 8 comments
Closed

Gomplate v3.11.x Go 1.21 panic: go4.org/unsafe/assume-no-moving-gc #1872

erharb opened this issue Oct 6, 2023 · 8 comments
Assignees

Comments

@erharb
Copy link

erharb commented Oct 6, 2023

Same as PR #1796 except that was only addressed in v4. Since v4 is not yet a stable release I think it should be ported back to the 3.11.x branch as well.

go: downloading github.com/hairyhenderson/gomplate/v3 v3.11.5
...
panic: Something in this program imports go4.org/unsafe/assume-no-moving-gc to declare that it assumes a non-moving garbage collector, but your version of go4.org/unsafe/assume-no-moving-gc hasn't been updated to assert that it's safe against the go1.21 runtime. If you want to risk it, run with environment variable ASSUME_NO_MOVING_GC_UNSAFE_RISK_IT_WITH="go1.21" set. Notably, if go1.21 adds a moving garbage collector, this program is unsafe to use.

The solution should be to update the module to the version indicated in the PR. I may have to first seek approval to contribute from my org, so if someone beats me to it so be it!

go get go4.org/unsafe/assume-no-moving-gc@e7c30c7
go mod tidy
@hairyhenderson
Copy link
Owner

@erharb are you building gomplate yourself? If so, why not build v4? Or why not use a pre-built binary?

@erharb
Copy link
Author

erharb commented Oct 10, 2023

Company security controls mostly, we have our own goproxy for scanning and handling go mods/installs. Usually it's just more paperwork to bring in pre-compiled binaries built from the internet, as opposed to just building it in-house where possible for our internal usage.

I wanted to start with a "stable" released version first since we're evaluating using gomplate for use with GitHub Template repositories, though I'll definitely give v4 a shot soon!

@evanfreed
Copy link

Confirmed using v4 similar to here is a sufficient workaround.

@giorgiga
Copy link
Contributor

giorgiga commented Oct 30, 2023

@hairyhenderson I maintain the gomplate package for nixos and this same issue currently breaks it. I'd love to upgrade to v4 but the latest released version is v3.11.5... will v4 be released soon? (I'd rather not go to the hoops necessary to build from git if possible, mainly because I'd have to investigate what those hoops are exactly).

@hairyhenderson
Copy link
Owner

Company security controls mostly [...]
😬 sorry to hear that @erharb - v3.11.5 should be more "stable", though I think v4 is stable enough (just not complete at this point).

I maintain the gomplate package for nixos and this same issue currently breaks it.
Thanks for that detail @giorgiga (and thanks for maintaining that package!).

I have some vacation time coming up next week, so I'll try to get a "clean" 3.11.6 released then.

v4 is still a ways out - I just haven't had the free time to dedicate to it for a while 😞

@hairyhenderson hairyhenderson self-assigned this Nov 10, 2023
@giorgiga
Copy link
Contributor

Thanks @hairyhenderson - for the moment I've updated the package to force using go 1.20.

Unfortunately I'm not much of a go programmer, so I can't be of much help on the actual issue :(

@hairyhenderson
Copy link
Owner

Fixed by #1910 - I'll release 3.11.6 soon...

@giorgiga
Copy link
Contributor

That's great - thanks @hairyhenderson !!

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

No branches or pull requests

4 participants