-
Notifications
You must be signed in to change notification settings - Fork 259
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
Programs that succeed to execute with v1.6.0 sometimes hang indefinitely with v1.8.1 during instantiation. #2340
Comments
that's really useful, I wonder if that bug lies there entirely 🤔 stdin has a special treatment, especially in |
relevant to |
@evacchi here is an incomplete list of weird things which have made the program succeed.
However if I parse stdin using the yaml decoder from k8s and use that data it hangs. |
uhm, if you pipe into stdin then the fact it's stdin might be unrelated. In fact, you can try to run in interpreter mode and verify if that still occurs. If it does, then the problem might be WASI-related; otherwise it is likely an issue in the compiler. It would not be the first time Go's huge binaries make us spot an issue if you recall #2158 😬 |
I just ran it using the interpreter and it ran successfully in all versions that I am testing: 1.6.0, 1.7.3, and 1.8.1. Compiler it is? |
I also pushed a new branch to the repository called I modified the example program in what should be harmless ways... Just removing certain fields from the structs that I was going to json.Marshal, and this had the effect that both 1.6.0 and 1.7.3 worked as expected but 1.8.1 went from hanging to a segfault. I am unsure what about my code is cursed, but hopefully it helps find the issue? |
most likely another issue with big binaries :D and possibly again with jumps |
If it's a compiler issue, then testing Under the right configuration, just doing one of these should "just work" (Go is just great about it): GOARCH=amd64 go test ./...
GOARCH=arm64 go test ./...
GOARCH=amd64 go run main.go
GOARCH=arm64 go run main.go |
confirmed that's arm64-only 🙈 |
ok first of all, I had to disable caching because it might have been masking the underlying issue. In my first bisect the offending commit seemed to be d4a4903, and if I backed to 0b543f7 the issue disappeared; but really, if I disable the cache,
Notice that because I have --> This time the bisect points to ab0d27c and indeed if I back off to 48f702e the bug goes away. EDIT2: the panic above turns into a hard crash beginning with c6ffc9e (not a hang)
so essentially it seems to originate from the regalloc refactoring at ab0d27c, and then it "propagated" eventually turning into this hang. |
Describe the bug
Programs that succeed to execute with v1.6.0 sometimes hang indefinitely with v1.8.1 during instantiation.
The same program crashes with v1.7.x
To Reproduce
Clone the example repository:
git clone https://github.com/davidmdm/wzbug.git cd ./wzbug ./test.sh
Expected behavior
Program should behave the same as with the v1.6.0 runtime.
Environment (please complete the relevant information):
Additional context
Incredibly rare and difficult to reproduce. If I tweak the example program slightly, the bug disappears. If I don't use stdin the bug disappears. However I don't want to write programs fearing that the perfect storm will hang my execution.
The text was updated successfully, but these errors were encountered: