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

runtime: Garbage Collector is falling into infinite loop #26441

Closed
bartsmykla opened this issue Jul 18, 2018 · 2 comments

Comments

Projects
None yet
3 participants
@bartsmykla
Copy link

commented Jul 18, 2018

Please answer these questions before submitting your issue. Thanks!

What version of Go are you using (go version)?

go1.10 darwin/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/bart.smykla/Library/Caches/go-build"
GOEXE=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOOS="darwin"
GOPATH="/Users/bart.smykla/go"
GORACE=""
GOROOT="/usr/local/Cellar/go/1.10/libexec"
GOTMPDIR=""
GOTOOLDIR="/usr/local/Cellar/go/1.10/libexec/pkg/tool/darwin_amd64"
GCCGO="gccgo"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/5p/3w59xw4n7h5b2r4841mbrfsc0000gn/T/go-build756935331=/tmp/go-build -gno-record-gcc-switches -fno-common"

What did you do?

Occasionally (few times a day) after our application doesn't succeed sending a message (simple HTTP request) Garbage Collector is falling into infinite loop.

If possible, provide a recipe for reproducing the error.
A complete runnable program is good.
A link on play.golang.org is best.

Unfortunately I can't reproduce it manually. It appears randomly.

What did you expect to see?

server_1              | {"caller":"/go/src/server/handler.go:30","component":"Handler","error":"dial tcp: lookup api on 127.0.0.11:53: no such host","function_name":"server/handler.(*Handler).ProcessMessage","level":8,"method":"ProcessMessage","msg":"dispatching msg","success":false,"timestamp":1531923332,"type":"ERROR", "reqMethod": "POST", "endpoint": "http://api:8080/attempts/v1"}

What did you see instead?

server_1              | {"caller":"/go/src/server/handler.go:30","component":"Handler","error":"dial tcp: lookup api on 127.0.0.11:53: no such host","function_name":"server/handler.(*Handler).ProcessMessage","level":8,"method":"ProcessMessage","msg":"dispatching msg","success":false,"timestamp":1531923332,"type":"ERROR", "reqMethod": "POST", "endpoint": "http://api:8080/attempts/v1"}
websdk-server_1       | gc 2 @8.492s 0%: 0.030+0.62+0.085 ms clock, 0.12+0.19/0.49/0.73+0.34 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 3 @8.510s 0%: 0.061+0.72+0.084 ms clock, 0.24+0.29/0.40/0.99+0.33 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 4 @8.529s 0%: 0.042+0.55+0.093 ms clock, 0.17+0.17/0.40/0.62+0.37 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 5 @8.548s 0%: 0.035+0.61+0.22 ms clock, 0.14+0.22/0.38/0.54+0.91 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 6 @8.568s 0%: 0.032+0.53+0.10 ms clock, 0.12+0.15/0.31/0.60+0.40 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 7 @8.585s 0%: 0.026+0.53+0.18 ms clock, 0.10+0.14/0.34/0.66+0.72 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 8 @8.602s 0%: 0.035+0.63+0.14 ms clock, 0.14+0.18/0.48/0.52+0.57 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 9 @8.618s 0%: 0.039+0.42+0.050 ms clock, 0.15+0.15/0.31/0.44+0.20 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 10 @8.635s 0%: 0.039+0.49+0.073 ms clock, 0.15+0.16/0.37/0.49+0.29 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 11 @8.653s 0%: 0.032+0.58+0.14 ms clock, 0.12+0.14/0.46/0.53+0.56 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 12 @8.670s 0%: 0.033+0.52+0.14 ms clock, 0.13+0.15/0.30/0.55+0.57 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 13 @8.686s 0%: 0.11+0.48+0.12 ms clock, 0.46+0.22/0.32/0.64+0.49 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 14 @8.703s 0%: 0.042+0.57+0.10 ms clock, 0.16+0.15/0.32/0.63+0.41 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 15 @8.721s 0%: 0.044+0.58+0.078 ms clock, 0.17+0.18/0.45/0.63+0.31 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 16 @8.738s 0%: 0.033+0.46+0.12 ms clock, 0.13+0.18/0.33/0.58+0.48 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 17 @8.754s 0%: 0.032+0.47+0.079 ms clock, 0.12+0.15/0.34/0.55+0.31 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 18 @8.771s 0%: 0.043+0.48+0.086 ms clock, 0.17+0.18/0.33/0.67+0.34 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 19 @8.787s 0%: 0.032+0.43+0.22 ms clock, 0.13+0.13/0.37/0.56+0.90 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 20 @8.806s 0%: 0.036+0.55+0.16 ms clock, 0.14+0.15/0.35/0.65+0.66 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 21 @8.823s 0%: 0.055+0.62+0.088 ms clock, 0.22+0.26/0.37/0.66+0.35 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 22 @8.840s 0%: 0.026+0.51+0.11 ms clock, 0.10+0.14/0.28/0.64+0.44 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 23 @8.855s 0%: 0.027+0.53+0.083 ms clock, 0.11+0.16/0.39/0.63+0.33 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 24 @8.873s 0%: 0.042+0.64+0.12 ms clock, 0.16+0.26/0.50/0.61+0.51 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 25 @8.889s 0%: 0.028+0.51+0.11 ms clock, 0.11+0.16/0.38/0.75+0.44 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 26 @8.906s 0%: 0.030+0.52+0.069 ms clock, 0.12+0.16/0.30/0.64+0.27 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 27 @8.922s 0%: 0.026+0.47+0.054 ms clock, 0.10+0.15/0.34/0.45+0.21 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 28 @8.938s 0%: 0.031+0.60+0.14 ms clock, 0.12+0.19/0.52/0.53+0.57 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 29 @8.954s 0%: 0.025+0.43+0.10 ms clock, 0.10+0.14/0.32/0.41+0.43 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
websdk-server_1       | gc 30 @8.972s 0%: 0.025+0.50+0.073 ms clock, 0.10+0.16/0.36/0.70+0.29 ms cpu, 4->4->0 MB, 5 MB goal, 4 P
...

@ianlancetaylor ianlancetaylor changed the title Garbage Collector is falling into infinite loop runtime: Garbage Collector is falling into infinite loop Jul 18, 2018

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Jul 18, 2018

It's fairly unlikely that the garbage collector is in an infinite loop. It's much more likely that your program has entered an infinite, or long-lasting, loop that is allocating memory.

Is there a way that we can reproduce the problem ourselves?

@gopherbot

This comment has been minimized.

Copy link

commented Aug 18, 2018

Timed out in state WaitingForInfo. Closing.

(I am just a bot, though. Please speak up if this is a mistake or you have the requested information.)

@gopherbot gopherbot closed this Aug 18, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.