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: aix-ppc64 failing with "fatal error: index out of range" as of CL 146719 #38929

Closed
bcmills opened this issue May 7, 2020 · 3 comments
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Milestone

Comments

@bcmills
Copy link
Contributor

bcmills commented May 7, 2020

2020-05-07T19:22:19-6f52790/aix-ppc64
2020-05-07T17:50:24-6ed4661/aix-ppc64

fatal error: index out of range

goroutine 4296 [running]:
runtime.throw(0x1003e8548, 0x12)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/panic.go:1116 +0x68 fp=0xa00010000e39838 sp=0xa00010000e397f8 pc=0x1000396e8
runtime.panicCheck1(0x100016fa8, 0x1003e8548, 0x12)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/panic.go:34 +0xd8 fp=0xa00010000e39878 sp=0xa00010000e39838 pc=0x100036e08
runtime.goPanicIndexU(0x3d80000044, 0x400000)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/panic.go:91 +0x40 fp=0xa00010000e398d0 sp=0xa00010000e39878 pc=0x100036f60
runtime.heapBitsForAddr(...)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/mbitmap.go:340
runtime.bulkBarrierPreWriteSrcOnly(0x110374e40, 0x0, 0x0)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/mbitmap.go:684 +0x228 fp=0xa00010000e39950 sp=0xa00010000e398d0 pc=0x100016fa8
runtime.makeslicecopy(0x110032b70, 0x0, 0x0, 0x0, 0xa00010000e185c0)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/slice.go:65 +0x174 fp=0xa00010000e399b0 sp=0xa00010000e39950 pc=0x100053124
net/http.http2cloneHeader(0xa000100006b8780, 0x240)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:6216 +0xfc fp=0xa00010000e39a80 sp=0xa00010000e399b0 pc=0x1002822fc
net/http.(*http2responseWriterState).writeHeader(0xa000100007f2500, 0xc8)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:6208 +0x8c fp=0xa00010000e39ae8 sp=0xa00010000e39a80 pc=0x10028213c
net/http.(*http2responseWriter).WriteHeader(...)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:6199
net/http.(*http2responseWriter).write(0xa0001000010e088, 0x10, 0x0, 0x0, 0x0, 0x1003e6594, 0x10, 0x110091f10, 0x100000110091f10, 0xa00000027113100)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:6246 +0x1b0 fp=0xa00010000e39b48 sp=0xa00010000e39ae8 pc=0x100282640
net/http.(*http2responseWriter).WriteString(0xa0001000010e088, 0x1003e6594, 0x10, 0xa00000027113100, 0xa0001000010e088, 0x100000000000040)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:6236 +0x4c fp=0xa00010000e39bb8 sp=0xa00010000e39b48 pc=0x10028245c
io.WriteString(0xa00000026ef6998, 0xa0001000010e088, 0x1003e6594, 0x10, 0xa0001000010e088, 0xa00010000cc46c0, 0x27)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/io/io.go:295 +0x80 fp=0xa00010000e39c28 sp=0xa00010000e39bb8 pc=0x10007c4b0
net/http_test.testServerNoHeader.func1(0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/serve_test.go:2834 +0xe0 fp=0xa00010000e39c90 sp=0xa00010000e39c28 pc=0x1003a4560
net/http.HandlerFunc.ServeHTTP(0xa00010000334000, 0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/server.go:2013 +0x54 fp=0xa00010000e39cc8 sp=0xa00010000e39c90 pc=0x1002a5764
net/http.serverHandler.ServeHTTP(0xa00010000cc0000, 0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/server.go:2814 +0xc8 fp=0xa00010000e39d18 sp=0xa00010000e39cc8 pc=0x1002a8a08
net/http.initALPNRequest.ServeHTTP(0x1100d91a0, 0xa000100004cc390, 0xa00010000d9e000, 0xa00010000cc0000, 0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/server.go:3386 +0x78 fp=0xa00010000e39ea0 sp=0xa00010000e39d18 pc=0x1002ab278
net/http.(*initALPNRequest).ServeHTTP(0xa00010000686120, 0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	<autogenerated>:1 +0x8c fp=0xa00010000e39ef8 sp=0xa00010000e39ea0 pc=0x1002f23cc
net/http.Handler.ServeHTTP-fm(0x1100d84a0, 0xa0001000010e088, 0xa00010000d36600)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/server.go:87 +0x5c fp=0xa00010000e39f38 sp=0xa00010000e39ef8 pc=0x1002f3a0c
net/http.(*http2serverConn).runHandler(0xa000100000c9200, 0xa0001000010e088, 0xa00010000d36600, 0xa000100006861c0)
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:5718 +0x94 fp=0xa00010000e39fa0 sp=0xa00010000e39f38 pc=0x100280124
runtime.goexit()
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/runtime/asm_ppc64x.s:884 +0x4 fp=0xa00010000e39fa0 sp=0xa00010000e39fa0 pc=0x100071ab4
created by net/http.(*http2serverConn).processHeaders
	/ramdisk8GB/workdir-host-aix-ppc64-osuosl/go/src/net/http/h2_bundle.go:5452 +0x4d8

This started as of CL 146719, which appears to be related.

CC @martisch @randall77

Marking as release-blocker since this is a 1.15 regression. (CC @andybons)

@bcmills bcmills added NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker labels May 7, 2020
@bcmills bcmills added this to the Go1.15 milestone May 7, 2020
@martisch
Copy link
Contributor

martisch commented May 7, 2020

That seems strange.

Its failing in heapBitsForAddr:

ha := mheap_.arenas[arena.l1()][arena.l2()]

which we get from bulkBarrierPreWriteSrcOnly:

h := heapBitsForAddr(dst)

which we get from makeslicecopy were we just alloced that dst memory area:

to = mallocgc(tomem, et, true)

@mknyszek

@martisch
Copy link
Contributor

martisch commented May 7, 2020

ah. tolen, fromlen are both 0. So its hitting the fastpath in mallocgc:

if size == 0 {

I check why it doesnt happen in copy and we need to catch the case of len=0 before calling writebarriers.

@gopherbot
Copy link

Change https://golang.org/cl/232800 mentions this issue: runtime: do not attempt bulkBarrierPreWrite when dst slice length is zero

@golang golang locked and limited conversation to collaborators May 7, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
FrozenDueToAge NeedsInvestigation Someone must examine and confirm this is a valid issue and not a duplicate of an existing one. release-blocker
Projects
None yet
Development

No branches or pull requests

3 participants