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
plugin: json.Unmarshaler type assertion infinite loop from 1.8beta2 to 1.8rc1 #18676
Comments
Quite the bug. Do you get a stack trace if you send a SIGQUIT? (Ctrl+\ on a typical terminal.) |
|
Shot in the dark (I'm away from my linux machine until tomorrow), would you mind patching in https://golang.org/cl/35117? |
@crawshaw I've just applied the patch and it works. Can you please provide a little explanation because I've lost a lot of hours and the patch is so tiny :) |
Yay! Figuring out a test for CL 35117 was on my plate for tomorrow. You've just done 90% of the work for me... The explanation is that the itabs (pointers to which are the "type information" word of an interface) are put in linked lists in the runtime. If the same itab is inserted twice, it can lead to cycles in the linked lists. When a subsequent lookup operation happens on that linked list, it can run indefinitely. |
@randall77 Okkkk. Thx for the explanation, the bug was so tricky for me to spot. |
Yes, it will be in the next rc. |
@fsenart : Could you fill out a CLA so I can use your test code? |
Done ;) |
CL https://golang.org/cl/35117 mentions this issue. |
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go version go1.8rc1 linux/amd64
What operating system and processor architecture are you using (
go env
)?GOARCH="amd64"
GOBIN=""
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GOOS="linux"
GOPATH="/home/fsenart/exp"
GORACE=""
GOROOT="/home/fsenart/tools/exp"
GOTOOLDIR="/home/fsenart/tools/exp/pkg/tool/linux_amd64"
GCCGO="gccgo"
CC="gcc"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build256843014=/tmp/go-build -gno-record-gcc-switches"
CXX="g++"
CGO_ENABLED="1"
PKG_CONFIG="pkg-config"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
What did you do?
If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.
What did you expect to see?
The program should terminate.
What did you see instead?
The program goes into an infinite loop and does not terminate. If you see processor usage with
top
, you'll notice that the program uses 100% of one processor and never gives up.Observations
If you change anything the program will terminate !!!
dynamodbstreamsevt
by anything else, all goes well and the program terminates.Event
by anything else, all goes well and the program terminates.Event
has not at least one method likeDummy
, all goes well and the program terminates.encoding/json
is not imported in thedynamodbstreamsevt
package, all goes well and the program terminates.encoding/json
is not used inplugin.so
, all goes well and the program terminates.The text was updated successfully, but these errors were encountered: