Skip to content

runtime: slice bounds out of range in issue9321 #9714

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

Closed
RLH opened this issue Jan 28, 2015 · 5 comments
Closed

runtime: slice bounds out of range in issue9321 #9714

RLH opened this issue Jan 28, 2015 · 5 comments
Milestone

Comments

@RLH
Copy link
Contributor

RLH commented Jan 28, 2015

While continually running all.bash overnight I noticed that the mumble/go/test/fixedbugs/issue9321.go test failed after about 12 hours. I isolated the test and then started running the test using a simple loop
while ./issue9321; do true; done
This would reliably fail within about 10 minutes. This is on tip on an x64 Ubuntu 12 core Linux Google desktop machine.

panic: runtime error: slice bounds out of range

goroutine 9 [running]:
bytes.(*Buffer).grow(0xc208010070, 0x6c6, 0xc208166a20)
    /usr/local/google/home/rlh/work/go/src/bytes/buffer.go:105 +0x189
bytes.(*Buffer).Write(0xc208010070, 0xc2085b4000, 0x6c6, 0x100000, 0x6c6, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/bytes/buffer.go:127 +0x52
runtime/pprof.writeGoroutineStacks(0x7f06369fbf88, 0xc208010070, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:522 +0xf0
runtime/pprof.writeGoroutine(0x7f06369fbf88, 0xc208010070, 0x2, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:500 +0x4f
runtime/pprof.(*Profile).WriteTo(0x5aeb60, 0x7f06369fbf88, 0xc208010070, 0x2, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:229 +0xd5
main.func·001()
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:22 +0xce
created by main.test
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:28 +0xbc

goroutine 1 [semacquire]:
sync.runtime_Semacquire(0xc20800a2e0)
    /usr/local/google/home/rlh/work/go/src/runtime/sema.go:43 +0x2d
sync.(*WaitGroup).Wait(0xc208058020)
    /usr/local/google/home/rlh/work/go/src/sync/waitgroup.go:132 +0x169
main.test()
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:29 +0xca
main.main()
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:35 +0x39

goroutine 8 [runnable]:
runtime/pprof.writeGoroutineStacks(0x7f06369fbf88, 0xc2080400e0, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:509 +0x4e
runtime/pprof.writeGoroutine(0x7f06369fbf88, 0xc2080400e0, 0x2, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:500 +0x4f
runtime/pprof.(*Profile).WriteTo(0x5aeb60, 0x7f06369fbf88, 0xc2080400e0, 0x2, 0x0, 0x0)
    /usr/local/google/home/rlh/work/go/src/runtime/pprof/pprof.go:229 +0xd5
main.func·001()
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:22 +0xce
created by main.test
    /usr/local/google/home/rlh/work/go/test/fixedbugs/issue9321.go:27 +0xa5
@bradfitz
Copy link
Contributor

What's the race detector say?

@bradfitz bradfitz added this to the Go1.5 milestone Jan 28, 2015
@bradfitz bradfitz changed the title panic: runtime error: slice bounds out of range runtime: slice bounds out of range in issue9321 Jan 28, 2015
@bradfitz
Copy link
Contributor

Just tried it... the program looks race-free, and the race detector agrees.

@randall77
Copy link
Contributor

I ran all weekend and saw no failures.
Something must be different about our setup. GOMAXPROCS? Maybe it wasn't tip?

@aclements
Copy link
Member

I've run through 45,000+ iterations of this test on what I believe is the same hardware Rick used and haven't had any failures. I suspect whatever this was has been fixed in the intervening months. I also went through the cases in Buffer.grow and there does not appear to be any way to get an out-of-bounds in correctly executing code, suggesting this was a bug in the compiler or runtime.

@RLH, since you were able to reproduce it easily before, care to give it another quick test and reopen if it's still happening?

@RLH
Copy link
Contributor Author

RLH commented Jun 29, 2015

No problem. I'll reopen if I see a problem.

On Monday, June 29, 2015, Austin Clements notifications@github.com wrote:

I've run through 45,000+ iterations of this test on what I believe is the
same hardware Rick used and haven't had any failures. I suspect whatever
this was has been fixed in the intervening months. I also went through the
cases in Buffer.grow and there does not appear to be any way to get an
out-of-bounds in correctly executing code, suggesting this was a bug in the
compiler or runtime.

@RLH https://github.com/RLH, since you were able to reproduce it easily
before, care to give it another quick test and reopen if it's still
happening?


Reply to this email directly or view it on GitHub
#9714 (comment).

@golang golang locked and limited conversation to collaborators Jun 28, 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