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: MemStats.GCCPUFraction > 1 on windows/386 #19319

Closed
aclements opened this issue Feb 28, 2017 · 8 comments

Comments

Projects
None yet
4 participants
@aclements
Copy link
Member

commented Feb 28, 2017

In the trybot run on https://go-review.googlesource.com/c/37519/1 I had added a test that GCCPUFraction was <= 0.99. It failed on windows/386 with a GCCPUFraction of 1.3042580612682633.

When this is fixed, we should re-add the GCCPUFraction <= 0.99 test to TestMemStats in runtime.

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Mar 3, 2017

Dr. @aclements, I took your CL for a spin on my windows/386 Windows XP, and I can see different failures:

C:\dev\go\src>git fetch https://go.googlesource.com/go refs/changes/19/37519/1 && git checkout FETCH_HEAD
From https://go.googlesource.com/go
 * branch            refs/changes/19/37519/1 -> FETCH_HEAD
Note: checking out 'FETCH_HEAD'.

You are in 'detached HEAD' state. You can look around, make experimental
changes and commit them, and you can discard any commits you make in this
state without impacting any branches by performing another checkout.

If you want to create a new branch to retain commits you create, you may
do so (now or later) by using -b with the checkout command again. Example:

  git checkout -b new_branch_name

HEAD is now at 45e678a... runtime: track forced GCs independent of gcMode

C:\dev\go\src>all
...
--- FAIL: TestGoexitDeadlock (0.03s)
        crash_test.go:106: testprog GoexitDeadlock exit status: exit status 2
        crash_test.go:232: output:
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124


                want output containing: no goroutines (main called runtime.Goexit) - deadlock!
--- FAIL: TestGoexitCrash (0.03s)
        crash_test.go:106: testprog GoexitExit exit status: exit status 2
        crash_test.go:268: output:
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124


                want output containing: no goroutines (main called runtime.Goexit) - deadlock!
--- FAIL: TestGoexitInPanic (0.05s)
        crash_test.go:106: testprog GoexitInPanic exit status: exit status 2
        crash_test.go:325: output does not start with "fatal error: no goroutines (main called runtime.Goexit) - deadlock!":
                fatal error: all goroutines are asleep - deadlock!

                goroutine 5 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10ca40c8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 6 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10ca40d0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124
--- FAIL: TestRecoveredPanicAfterGoexit (0.02s)
        crash_test.go:106: testprog RecoveredPanicAfterGoexit exit status: exit status 2
        crash_test.go:388: output does not start with "fatal error: no goroutines (main called runtime.Goexit) - deadlock!":
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x10cd40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124
--- FAIL: TestNumGoroutine (0.02s)
        proc_test.go:359: want "1\n", got "3\n"
FAIL
FAIL    runtime 33.148s
...

I am not sure if it helps you any, but I decided to report it.

Alex

@aclements

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2017

@alexbrainman, interesting. I had some bugs in the earlier version of that CL. Would you mind testing https://go-review.googlesource.com/c/37520?

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Mar 3, 2017

Would you mind testing https://go-review.googlesource.com/c/37520?

Looks similar:

C:\dev\go\src>git fetch https://go.googlesource.com/go refs/changes/20/37520/2 && git checkout FETCH_HEAD
remote: Counting objects: 7096, done
remote: Finding sources: 100% (71/71)
remote: Total 71 (delta 49), reused 62 (delta 49)
Unpacking objects: 100% (71/71), done.
From https://go.googlesource.com/go
 * branch            refs/changes/20/37520/2 -> FETCH_HEAD
Warning: you are leaving 7 commits behind, not connected to
any of your branches:

  45e678a runtime: track forced GCs independent of gcMode
  10168f2 runtime: make debug.FreeOSMemory call runtime.GC()
  752729a runtime: simplify forced GC triggering
  dcfb106 runtime: generalize GC trigger
 ... and 3 more.

If you want to keep them by creating a new branch, this may be a good time
to do so with:

 git branch new_branch_name 45e678a

HEAD is now at 42b2e42... runtime: make runtime.GC() trigger a concurrent GC

C:\dev\go\src>all
...
--- FAIL: TestGoexitDeadlock (0.02s)
        crash_test.go:106: testprog GoexitDeadlock exit status: exit status 2
        crash_test.go:232: output:
                fatal error: all goroutines are asleep - deadlock!

                goroutine 5 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110a40c8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 6 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110a40d0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124


                want output containing: no goroutines (main called runtime.Goexit) - deadlock!
--- FAIL: TestGoexitCrash (0.06s)
        crash_test.go:106: testprog GoexitExit exit status: exit status 2
        crash_test.go:268: output:
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124


                want output containing: no goroutines (main called runtime.Goexit) - deadlock!
--- FAIL: TestGoexitInPanic (0.03s)
        crash_test.go:106: testprog GoexitInPanic exit status: exit status 2
        crash_test.go:325: output does not start with "fatal error: no goroutines (main called runtime.Goexit) - deadlock!":
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124
--- FAIL: TestRecoveredPanicAfterGoexit (0.04s)
        crash_test.go:106: testprog RecoveredPanicAfterGoexit exit status: exit status 2
        crash_test.go:388: output does not start with "fatal error: no goroutines (main called runtime.Goexit) - deadlock!":
                fatal error: all goroutines are asleep - deadlock!

                goroutine 18 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40b8)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:243 +0xce

                goroutine 19 [chan receive, locked to thread]:
                internal/poll.(*ioSrv).ProcessRemoteIO(0x110d40c0)
                        C:/dev/go/src/internal/poll/fd_windows.go:143 +0xd7
                created by internal/poll.startServer
                        C:/dev/go/src/internal/poll/fd_windows.go:245 +0x124
--- FAIL: TestNumGoroutine (0.02s)
        proc_test.go:359: want "1\n", got "3\n"
FAIL
FAIL    runtime 32.160s

Alex

@aclements

This comment has been minimized.

Copy link
Member Author

commented Mar 3, 2017

@alexbrainman, would you mind bisecting the issue?

@alexbrainman

This comment has been minimized.

Copy link
Member

commented Mar 3, 2017

would you mind bisecting the issue?

Looks like it has nothing to do with your changes

c05b06a12d005f50e4776095a60d6bd9c2c91fac is the first bad commit
commit c05b06a12d005f50e4776095a60d6bd9c2c91fac
Author: Ian Lance Taylor <iant@golang.org>
Date:   Fri Feb 10 15:17:38 2017 -0800

(I hardly ever run all.bat on my windows/386 pc nowdays).
I have created #19390.
Sorry to waste your time.

Alex

@aclements

This comment has been minimized.

Copy link
Member Author

commented Mar 4, 2017

No worries. Glad you tracked down the source of the problem.

@bradfitz bradfitz added this to the Go1.9 milestone Mar 21, 2017

@aclements aclements self-assigned this Jun 6, 2017

@aclements

This comment has been minimized.

Copy link
Member Author

commented Jul 10, 2017

No luck reproducing this on the windows-386-gce gomote with stress -p 1 gomote run -path '$PATH;$WORKDIR\go\bin' $VM go/src/runtime/runtime.test.exe -test.short -test.cpu 1,2,4 after several hours and 250 runs. I'll queue up a patch to re-enable this test and put it in when 1.10 opens and we'll see if this still shows up.

@aclements aclements modified the milestones: Go1.10, Go1.9 Jul 10, 2017

@gopherbot

This comment has been minimized.

Copy link

commented Jul 10, 2017

CL https://golang.org/cl/47936 mentions this issue.

@gopherbot gopherbot closed this in 4c02eaf Sep 22, 2017

@golang golang locked and limited conversation to collaborators Sep 22, 2018

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