go: runtime: process hangs after moving to Go 1.17 on Windows

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

$ go version
1.17.2

Does this issue reproduce with the latest release?

Yes with 1.17.6 Not tried with 1.18

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

Windows

go env Output
$ go env

What did you do?

We migrated our go version from go1.12 to go 1.17.2. After that we see that our process hangs sometimes on windows os. Most of the times it runs fine, but some times it hangs and it never comes out. Even it doesn’t return go profiles (we have pprof included in process). We get this issue in production, but not able to produce this in house, so dont have much details. I am attaching process dump that we have taken from explorer. I do see it doing force GC, but can’t actually figure out what is the issue.

One more thing: We have this runtime.ReadMemStats() happening every 30 sec. Not sure if that is related, but just noting down here.

What did you expect to see?

Process should continue and finish gracefully.

What did you see instead?

Process hangs

About this issue

  • Original URL
  • State: open
  • Created 2 years ago
  • Comments: 25 (13 by maintainers)

Most upvoted comments

What’s really suspicious is the extremely long wait times reported (52 years?)

Delve bug, please disregard.

Re-adding my 2 cents about the 1.17 question, which was:

Note: I have seen this happen with builds made using GoLang versions 1.16.6 and 1.18.3. I have not tried 19.1 yet

Problem: I can’t reproduce this on any of my own development systems. I can only reproduce it on a customer’s system, and I can’t waste a customer’s time hunting down an issue like this when I have a workaround. I believe the customer had anti-virus installed, and it’s possible that some driver-level bug specific to that anti-virus was causing it, but I really have no idea. If I ever manage to reproduce this on a development system, I will add more info.

On Mon, Apr 10, 2023 at 12:00 PM Michael Knyszek @.***> wrote:

@codablock https://github.com/codablock Sorry, somehow I totally missed your comment from back in November. That sounds like a different issue (this seems pretty Windows-specific; there’s Windows syscall callback functionality that doesn’t exist on other platforms and it seems to be implicated here, re-reading the thread).

Also, reading your linked comment, I’m not sure I follow the conclusion that it’s a bug in the Go runtime. It sounds like the process is getting stuck, but I don’t think the ways you tried to perturb it would really shift what the Go runtime is doing. My gut feeling is an OS issue, but I could be wrong.

@Jason7602 https://github.com/Jason7602 That also sounds like a different issue for the same reasons as above. In fact that’s… quite surprising. Please file a new issue. Can you reproduce with the latest version of Go? Go 1.17 is no longer supported.

— Reply to this email directly, view it on GitHub https://github.com/golang/go/issues/52178#issuecomment-1501989688, or unsubscribe https://github.com/notifications/unsubscribe-auth/AE7JSCXP3X34EJHWFNUBA6TXAQVAVANCNFSM5SVOEIRQ . You are receiving this because you commented.Message ID: @.***>