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

reflect: reflect test causes builders to oom #6023

Closed
davecheney opened this issue Aug 3, 2013 · 3 comments
Closed

reflect: reflect test causes builders to oom #6023

davecheney opened this issue Aug 3, 2013 · 3 comments
Milestone

Comments

@davecheney
Copy link
Contributor

What steps will reproduce the problem?

https://code.google.com/p/go/source/detail?r=a5eb738ff6490af23ebf7906dd2af0f4bbc19a3e
introduced a test which allocates 1Gb of stack memory. This pretty much blows up all the
arm builders and some of the 32bit intel builders.

http://build.golang.org/log/fcb3d9da8fa74014cd27db0f49ea74136b79e5c3
http://build.golang.org/log/8ce4b73a1975cdd602d3f1dd5b78f751e1ddcca9
http://build.golang.org/log/ca8603999873e70b8b90ee3e4b7c790d777686ad

Could the test be rewritten to consume less memory ?

Please use labels and text to provide additional information.
@davecheney
Copy link
Contributor Author

Comment 1:

On investigation, it is not the test case that is causing the OOM, is is the compiler.
For example, this is 8g
        Command being timed: "/home/dfc/go/pkg/tool/linux_386/8g -o /tmp/go-build178694897/reflect/_test/_go_.8 -p reflect_test -complete -D _/home/dfc/go/src/pkg/reflect -I /tmp/go-build178694897/reflect/_test -I /tmp/go-build178694897 ./all_test.go ./example_test.go ./set_test.go ./tostring_test.go"
        User time (seconds): 7.81
        System time (seconds): 2.01
        Percent of CPU this job got: 99%
        Elapsed (wall clock) time (h:mm:ss or m:ss): 0:09.84
        Average shared text size (kbytes): 0
        Average unshared data size (kbytes): 0
        Average stack size (kbytes): 0
        Average total size (kbytes): 0
        Maximum resident set size (kbytes): 3436544
        Average resident set size (kbytes): 0
        Major (requiring I/O) page faults: 0
        Minor (reclaiming a frame) page faults: 219387
        Voluntary context switches: 21
        Involuntary context switches: 52
        Swaps: 0
        File system inputs: 0
        File system outputs: 282184
        Socket messages sent: 0
        Socket messages received: 0
        Signals delivered: 0
        Page size (bytes): 4096
        Exit status: 0

@remyoudompheng
Copy link
Contributor

Comment 2:

It's not only a memory issue. The resulting binary is 21MB large for no reason and the
object file is 73MB large which is ridiculous for such small source code.
There is a deeper issue and fixing it will require changes to both compiler and linker.

@randall77
Copy link
Contributor

Comment 3:

This issue was closed by revision f791012.

Status changed to Fixed.

@rsc rsc added this to the Go1.2 milestone Apr 14, 2015
@rsc rsc removed the go1.2 label Apr 14, 2015
@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
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