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: test/init1.go fails intermittently #11321

Closed
alexbrainman opened this issue Jun 22, 2015 · 6 comments
Closed

runtime: test/init1.go fails intermittently #11321

alexbrainman opened this issue Jun 22, 2015 · 6 comments
Milestone

Comments

@alexbrainman
Copy link
Member

From recent windows-amd64-gce build log http://build.golang.org/log/e0fb4cbcfe62e0846cdc4cb783c8aba4df738c32 and http://build.golang.org/log/3be209581d566e94ce852eec9ff7762e0521d7b8

##### ../test
# go run run.go -- init1.go
exit status 1
allocated 1000 chunks of 1048576 and used  1082630144 memory
numGC went 0 to 0
panic: init1

goroutine 1 [running]:
main.init.1()
    C:/workdir/go/test/init1.go:44 +0x3f9
main.init()
    C:/workdir/go/test/init1.go:53 +0x47
exit status 2

FAIL    init1.go    1.150s

Alex

@bradfitz
Copy link
Contributor

/cc @aclements for triage

@aclements
Copy link
Member

It's not impossible for this test to fail by chance. The concurrent GC should definitely have started when it checks the memstats, but whether or not it's finished depends on timing and the stats aren't updated until it finishes. My guess is we were right on the edge before and @RLH's change to add a second mark pass (90a1996) made the concurrent mark take a little too long for this test.

It's possible we should just add a sleep in test/init1.go if the GC hasn't finished yet. That would still accomplish the original intent of checking that GC can run during init, but would make the test less flaky.

@alexbrainman, do you know if you can reproduce this? Or is it just on the dashboard? If you can reproduce it, I'd love to see the output with GODEBUG=gctrace=1,gcpacertrace=1 (plus a sleep right before the panic so the GC has a chance to say something).

@alexbrainman
Copy link
Member Author

I have seen that test on dashboard. I have never seen it here. I cannot make that test fails here. Maybe you have some special instructions ...

Alex

@aclements aclements added this to the Go1.5Maybe milestone Jun 23, 2015
@aclements aclements changed the title test/init1.go: program panics runtime: test/init1.go fails intermittently Jun 24, 2015
@rsc
Copy link
Contributor

rsc commented Jun 29, 2015

Happened again on windows-386.
https://storage.googleapis.com/go-build-log/e4a40c28/windows-386-gce_91398547.log

Austin, it seems to me that no matter how bad the timing is, there are only a few MB of live data here. Mutator assists should keep the GC from bloating the allocated heap all the way to 1 GB, no? If not, I think we may have a real problem.

@rsc rsc modified the milestones: Go1.5, Go1.5Maybe Jun 29, 2015
@rsc
Copy link
Contributor

rsc commented Jul 21, 2015

Looks the same as #11677.

@rsc
Copy link
Contributor

rsc commented Jul 22, 2015

Dup of #11677

@rsc rsc closed this as completed Jul 22, 2015
@golang golang locked and limited conversation to collaborators Aug 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

5 participants