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: allocated pages below zero on openbsd/riscv64 #63385

Closed
4a6f656c opened this issue Oct 5, 2023 · 274 comments
Closed

runtime: allocated pages below zero on openbsd/riscv64 #63385

4a6f656c opened this issue Oct 5, 2023 · 274 comments
Assignees
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Milestone

Comments

@4a6f656c
Copy link
Contributor

4a6f656c commented Oct 5, 2023

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"

The openbsd/riscv64 port is regularly failing with errors like:

runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

https://build.golang.org/log/bb95405e34149982611770caf632d58e9bc50ff4
https://build.golang.org/log/e5fb11bcae4d4dab31c13f7e271852e39ae5a6df

This seems particularly reproducible (although still intermittent) via the TestArenaCollision test:

$ ../bin/go tool dist test -run runtime:cpu124                                          
                                                                                                                  
##### Test execution environment.                                                                                 
# GOARCH: riscv64                                                                                                 
# CPU:                                                                                                            
# GOOS: openbsd                                                                                                   
# OS Version: OpenBSD 7.4 OpenBSD 7.4 (GENERIC.MP) #423: Tue Oct  3 07:33:24 MDT 2023     [email protected]:/usr/src/sys/arch/riscv64/compile/GENERIC.MP  riscv64
                                                                                                                  
##### GOMAXPROCS=2 runtime -cpu=1,2,4 -quick                                                                      
--- FAIL: TestArenaCollision (0.26s)                                                                              
    malloc_test.go:284: === RUN   TestArenaCollision                                                              
            malloc_test.go:301: reserved [0x60000000, 0x64000000)                                                 
            malloc_test.go:301: reserved [0x54000000, 0x58000000)                                                 
            malloc_test.go:301: reserved [0xa0000000, 0xa4000000)
            malloc_test.go:301: reserved [0x70000000, 0x74000000)                                                 
            malloc_test.go:301: reserved [0xc8000000, 0xcc000000)                                                 
        runtime: inUse=0 npages=1                                                                                 
        fatal error: allocated pages below zero?

inUse always appears to be zero, while npages is some small positive value.

It would seem that this is specific to openbsd/riscv64 and possibly even a kernel/mmap related problem.

/cc @mknyszek any pointers in tracking this down would be greatly appreciated.

@4a6f656c 4a6f656c self-assigned this Oct 5, 2023
@mknyszek
Copy link
Contributor

mknyszek commented Oct 5, 2023

Hm, unfortunately this doesn't seem like it would be a kernel/mmap problem. This is a check that's failing when one or more pages are freed back to the page heap. What's happening is that some of the bookkeeping maintained per 4 MiB aligned address range indicates that the region is totally free, so it doesn't make sense to try and free memory back to it. I think it implies some kind of corruption of the data structure, or a data race. It could also mean that when the check isn't firing, some pages are getting allocated twice (which could lead to other memory corruption symptoms).

It may just be reproducing in TestArenaCollision because it allocates a whole bunch of memory and likely triggers a GC (causing other memory to be freed, since all the memory it allocates stays live indefinitely).

If this is straightforward to reproduce, my first thought would be to pepper debuglog calls around the various allocs and frees to the page heap and make sure nothing is being allocated (and thus later possibly freed) twice.

If you haven't used debuglog before, it's a very handy low-overhead tool for identifying what actually happened in the runtime. Because it's low overhead, it maintains a low chance of perturbing bugs involving race conditions and tends to reproduce real thread orderings. You can enable it by passing -tags debuglog to go test or go build. You use it in the runtime by calling dlog().s("string example").u64(5).end() from almost anywhere in the runtime. It'll print the log when the program crashes. (If it's not doing so, find some reasonable place to call printDebugLog.) The only place you might run into trouble is trying to call it from signal handlers. It's safe, but you may run out of nosplit stack space. Don't forget to call .end()!

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-09-28 17:55 openbsd-riscv64-jsing sys@2964e1e4 go@3a69dcdc go/types [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91b6fa?, 0x0?})
	runtime/panic.go:1018 +0x44 fp=0x123f5f310 sp=0x123f5f2e8 pc=0x53b6c
runtime.(*scavChunkData).free(0x0?, 0x3, 0x45350?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x123f5f330 sp=0x123f5f310 pc=0x3daf0
runtime.(*scavengeIndex).free(0x10a8cc0, 0x146, 0xc7, 0x3)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x123f5f368 sp=0x123f5f330 pc=0x3d71c
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x510 fp=0x50041ef8 sp=0x50041d18 pc=0x33050
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x50041f48 sp=0x50041ef8 pc=0x32a0c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0x50041fd8 sp=0x50041f48 pc=0x33d84
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x50041fd8 sp=0x50041fd8 pc=0x89ea4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-09-28 17:55 openbsd-riscv64-jsing sys@2964e1e4 go@68a12a80 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x440009c0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xb64d82f8 sp=0xb64d82d0 pc=0x5318c
runtime.(*scavChunkData).free(0x74838?, 0x4, 0xb64d8360?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xb64d8318 sp=0xb64d82f8 pc=0x3d288
runtime.(*scavengeIndex).free(...)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:3812 +0x68 fp=0xb64d86d0 sp=0xb64d8698 pc=0x5dca0
runtime.newstack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/stack.go:1071 +0x2b0 fp=0xb64d88b8 sp=0xb64d86d0 pc=0x6e968
runtime.morestack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:204 +0x58 fp=0xb64d88c0 sp=0xb64d88b8 pc=0x87698

goroutine 175 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-04 10:08 openbsd-riscv64-jsing go@0074125c encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2d9c?, 0x64821cfb?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0x4cbaaad8 sp=0x4cbaaab0 pc=0x46ddc
runtime.(*scavChunkData).free(0x320048?, 0x1, 0x5eca0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x4cbaaaf8 sp=0x4cbaaad8 pc=0x34218
runtime.(*scavengeIndex).free(0x346760, 0x1df, 0x87, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x4cbaab30 sp=0x4cbaaaf8 pc=0x33e44
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1234 +0xfc fp=0xd3a1ddf8 sp=0xd3a1dd20 pc=0x130d6c
encoding/gob.(*Decoder).DecodeValue(0x70074000, {0x17d480?, 0x70119800?, 0x70114a00?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0xd3a1de70 sp=0xd3a1ddf8 pc=0x131d70
encoding/gob.(*Decoder).Decode(0x70074000, {0x17d480?, 0x70119800?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x144 fp=0xd3a1dec0 sp=0xd3a1de70 pc=0x131b94
encoding/gob.testEncodeDecode(0x7022d6c0, {0x17d480, 0x701197e8}, {0x17d480, 0x70119800})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0xd3a1df30 sp=0xd3a1dec0 pc=0x14a358
encoding/gob.TestLargeSlice.func1(0x0?)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0xd3a1df78 sp=0xd3a1df30 pc=0x1604bc
testing.tRunner(0x7022d6c0, 0x1cd0f8)
2023-10-04 15:11 openbsd-riscv64-jsing go@a9036396 runtime.TestFakeTime (log)
--- FAIL: TestFakeTime (16.20s)
    crash_test.go:152: running /home/gopher/build/go/bin/go build -o /home/gopher/build/tmp/go-build1023398732/testfaketime_-tags=faketime.exe -tags=faketime
    time_test.go:31: building testfaketime [-tags=faketime]: exit status 1
        # runtime
        runtime: inUse=0 npages=5
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x91b6fa?, 0x74df4?})
        	runtime/panic.go:1018 +0x44 fp=0x649e2470 sp=0x649e2448 pc=0x53b6c
...
        	runtime/mgc.go:203 +0x2c fp=0xe40417d8 sp=0xe40417c8 pc=0x319f4
        runtime.goexit({})
        	runtime/asm_riscv64.s:521 +0x4 fp=0xe40417d8 sp=0xe40417d8 pc=0x89ea4
        created by runtime.gcenable in goroutine 1
        	runtime/mgc.go:203 +0x70

        goroutine 16 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:1237 +0x2c
2023-10-04 16:05 openbsd-riscv64-jsing go@0c64ebce cmd/link.TestMachOBuildVersion (log)
--- FAIL: TestMachOBuildVersion (15.45s)
    link_test.go:377: [/home/gopher/build/go/bin/go build -ldflags=-linkmode=internal -o /home/gopher/build/tmp/TestMachOBuildVersion1940749510/001/main /home/gopher/build/tmp/TestMachOBuildVersion1940749510/001/main.go]: exit status 1:
        # runtime
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x91b6fa?, 0x106bba0?})
        	runtime/panic.go:1018 +0x44 fp=0x36af2bf0a8 sp=0x36af2bf080 pc=0x53b6c
        runtime.(*scavChunkData).free(0x750c0?, 0x4, 0xaf2bf110?)
...
        runtime.gcMarkTermination()
        	runtime/mgc.go:1101 +0x510 fp=0x6003c6f8 sp=0x6003c518 pc=0x33050
        runtime.gcMarkDone()
        	runtime/mgc.go:941 +0x25c fp=0x6003c748 sp=0x6003c6f8 pc=0x32a0c
        runtime.gcBgMarkWorker()
        	runtime/mgc.go:1445 +0x374 fp=0x6003c7d8 sp=0x6003c748 pc=0x33d84
        runtime.goexit({})
        	runtime/asm_riscv64.s:521 +0x4 fp=0x6003c7d8 sp=0x6003c7d8 pc=0x89ea4
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:1237 +0x2c
2023-10-04 16:50 openbsd-riscv64-jsing go@3a69dcdc cmd/go.TestGoListExport (log)
vcs-test.golang.org rerouted to http:https://127.0.0.1:19379
https://vcs-test.golang.org rerouted to https://127.0.0.1:36129
go test proxy running at GOPROXY=http:https://127.0.0.1:24112/mod
--- FAIL: TestGoListExport (17.46s)
    go_test.go:1227: running testgo [list -f {{.Export}} strings]
    go_test.go:1231: running testgo [list -export -f {{.Export}} strings]
    go_test.go:1231: standard error:
    go_test.go:1231: # runtime
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?
...
        traceback: unexpected SPWRITE function runtime.morestack
        runtime.morestack()
        	runtime/asm_riscv64.s:204 +0x58 fp=0x6a921c60 sp=0x6a921c58 pc=0x87d30

        goroutine 179 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:1237 +0x2c

    go_test.go:1231: go [list -export -f {{.Export}} strings] failed unexpectedly in /home/gopher/build/go/src/cmd/go: exit status 1
2023-10-04 22:08 openbsd-riscv64-jsing net@5d5a036a go@bc150700 runtime [build] (log)
runtime: inUse=0 npages=5
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72caf7?, 0x6a14c?})
	../../go/src/runtime/panic.go:837 +0x44 fp=0x11c941ad0 sp=0x11c941aa8 pc=0x4a744
runtime.(*scavChunkData).free(0x0?, 0x5, 0x4f1ec?)
	../../go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x11c941af0 sp=0x11c941ad0 pc=0x376d0
runtime.(*scavengeIndex).free(0xd46ca0, 0x1c2, 0x8, 0x5)
	../../go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x11c941b28 sp=0x11c941af0 pc=0x371fc
...
runtime.sweepone()
	../../go/src/runtime/mgcsweep.go:393 +0x140 fp=0x70045780 sp=0x70045728 pc=0x38590
runtime.bgsweep(0x0?)
	../../go/src/runtime/mgcsweep.go:301 +0x14c fp=0x700457c8 sp=0x70045780 pc=0x382ec
runtime.gcenable.func1()
	../../go/src/runtime/mgc.go:203 +0x2c fp=0x700457d8 sp=0x700457c8 pc=0x2c7dc
runtime.goexit()
	../../go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x700457d8 sp=0x700457d8 pc=0x7e434
created by runtime.gcenable in goroutine 1
	../../go/src/runtime/mgc.go:203 +0x70

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-04 22:08 openbsd-riscv64-jsing net@5d5a036a go@008dabcd cmd/link/internal/ld [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91b723?, 0x400000?})
	runtime/panic.go:1018 +0x44 fp=0x3901bba360 sp=0x3901bba338 pc=0x53b6c
runtime.(*scavChunkData).free(0x13afb5b00?, 0x4, 0x45350?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x3901bba380 sp=0x3901bba360 pc=0x3daf0
runtime.(*scavengeIndex).free(0x10a8ce0, 0x1ea, 0x7, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x3901bba3b8 sp=0x3901bba380 pc=0x3d71c
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x510 fp=0x78041ef8 sp=0x78041d18 pc=0x33050
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x78041f48 sp=0x78041ef8 pc=0x32a0c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0x78041fd8 sp=0x78041f48 pc=0x33d84
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x78041fd8 sp=0x78041fd8 pc=0x89ea4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 19:45 openbsd-riscv64-jsing go@10da3b64 cmd/link/internal/ld [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x8cb7f1?, 0x63?})
	runtime/panic.go:1018 +0x44 fp=0x8fb5c550 sp=0x8fb5c528 pc=0x4b024
runtime.(*scavChunkData).free(0x48?, 0x4, 0x310?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x8fb5c570 sp=0x8fb5c550 pc=0x37df0
runtime.(*scavengeIndex).free(0x1038ce0, 0x1fc, 0x1c9, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x8fb5c5a8 sp=0x8fb5c570 pc=0x37a1c
...
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x8fb5cb08 sp=0x8fb5c968 pc=0x655d8
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x8fb5cb10 sp=0x8fb5cb08 pc=0x7c808

goroutine 38 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-06 15:42 openbsd-riscv64-jsing go@28f4ea16 cmd/compile/internal/ssagen [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91b9cf?, 0x0?})
	runtime/panic.go:1018 +0x44 fp=0x17492fd20 sp=0x17492fcf8 pc=0x53c34
runtime.(*scavChunkData).free(0x0?, 0x1, 0x45428?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x17492fd40 sp=0x17492fd20 pc=0x3dbc8
runtime.(*scavengeIndex).free(0x10a8e20, 0x140, 0x8f, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x17492fd78 sp=0x17492fd40 pc=0x3d7f4
...
runtime.park_m(0x518c5a00?)
	runtime/proc.go:3752 +0x1ac fp=0x1749302a0 sp=0x174930248 pc=0x5e0dc
traceback: unexpected SPWRITE function runtime.mcall
runtime.mcall()
	runtime/asm_riscv64.s:291 +0x40 fp=0x1749302b0 sp=0x1749302a0 pc=0x87ef0

goroutine 360 [running]:
	goroutine running on other thread; stack unavailable
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 14
	cmd/compile/internal/gc/compile.go:163 +0x204

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@10da3b64 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72caf7?, 0x32?})
	../../go/src/runtime/panic.go:837 +0x44 fp=0x323b62bb20 sp=0x323b62baf8 pc=0x4a744
runtime.(*scavChunkData).free(0x1aa0?, 0x1, 0x354?)
	../../go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x323b62bb40 sp=0x323b62bb20 pc=0x376d0
runtime.(*scavengeIndex).free(0xd46cc0, 0x1c7, 0xaf, 0x1)
	../../go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x323b62bb78 sp=0x323b62bb40 pc=0x371fc
...
runtime.sweepone()
	../../go/src/runtime/mgcsweep.go:393 +0x140 fp=0x70047780 sp=0x70047728 pc=0x38590
runtime.bgsweep(0x0?)
	../../go/src/runtime/mgcsweep.go:301 +0x14c fp=0x700477c8 sp=0x70047780 pc=0x382ec
runtime.gcenable.func1()
	../../go/src/runtime/mgc.go:203 +0x2c fp=0x700477d8 sp=0x700477c8 pc=0x2c7dc
runtime.goexit()
	../../go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x700477d8 sp=0x700477d8 pc=0x7e434
created by runtime.gcenable in goroutine 1
	../../go/src/runtime/mgc.go:203 +0x70
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@008dabcd runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x8cb7f1?, 0xca214370?})
	runtime/panic.go:1018 +0x44 fp=0x33e2bf3a70 sp=0x33e2bf3a48 pc=0x4b024
runtime.(*scavChunkData).free(0x29018?, 0x4, 0x656e6c18?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x33e2bf3a90 sp=0x33e2bf3a70 pc=0x37df0
runtime.(*scavengeIndex).free(0x1038ce0, 0x1ce, 0x1f1, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x33e2bf3ac8 sp=0x33e2bf3a90 pc=0x37a1c
...
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x33e2bf4028 sp=0x33e2bf3e88 pc=0x655d8
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x33e2bf4030 sp=0x33e2bf4028 pc=0x7c808

goroutine 172 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-09-28 17:55 openbsd-riscv64-jsing sys@2964e1e4 go@10da3b64 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91b723?, 0x480841a0?})
	runtime/panic.go:1018 +0x44 fp=0xe9983c88 sp=0xe9983c60 pc=0x53b6c
runtime.(*scavChunkData).free(0x750c0?, 0x4, 0xe9983cf0?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xe9983ca8 sp=0xe9983c88 pc=0x3daf0
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x510 fp=0x480466f8 sp=0x48046518 pc=0x33050
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x48046748 sp=0x480466f8 pc=0x32a0c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0x480467d8 sp=0x48046748 pc=0x33d84
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x480467d8 sp=0x480467d8 pc=0x89ea4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 21:01 openbsd-riscv64-jsing go@be3d5fb6 runtime [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x12653de28 sp=0x12653de00 pc=0x5318c
runtime.(*scavChunkData).free(0x0?, 0x2, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x12653de48 sp=0x12653de28 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x1f7, 0x106, 0x2)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x12653de80 sp=0x12653de48 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x7c03def8 sp=0x7c03dd18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x7c03df48 sp=0x7c03def8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x7c03dfd8 sp=0x7c03df48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x7c03dfd8 sp=0x7c03dfd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 20:57 openbsd-riscv64-jsing go@b72bbaeb cmd/go.TestScript (log)
vcs-test.golang.org rerouted to http:https://127.0.0.1:37962
https://vcs-test.golang.org rerouted to https://127.0.0.1:15767
go test proxy running at GOPROXY=http:https://127.0.0.1:33421/mod
2023/10/07 15:18:31 http: TLS handshake error from 127.0.0.1:22669: EOF
2023/10/07 15:18:31 http: TLS handshake error from 127.0.0.1:6836: read tcp 127.0.0.1:15767->127.0.0.1:6836: read: connection reset by peer
--- FAIL: TestScript (0.55s)
    --- FAIL: TestScript/clean_cache_n (36.50s)
        script_test.go:132: 2023-10-07T04:16:21Z
        script_test.go:134: $WORK=/home/gopher/build/tmp/cmd-go-test-3516719434/tmpdir1256145971/clean_cache_n1824977704
        script_test.go:156: 
...
            fatal error: allocated pages below zero?

            runtime stack:
            runtime.throw({0x94b72b?, 0x800?})
            	runtime/panic.go:1018 +0x44 fp=0x8c7d2e90 sp=0x8c7d2e68 pc=0x53cac
            runtime.(*scavChunkData).free(0x40160?, 0x5, 0x45440?)
            	runtime/mgcscavenge.go:1341 +0xd8 fp=0x8c7d2eb0 sp=0x8c7d2e90 pc=0x3dbe0
            runtime.(*scavengeIndex).free(0x1109200, 0x21c, 0x1d, 0x5)
            	runtime/mgcscavenge.go:1154 +0xa4 fp=0x8c7d2ee8 sp=0x8c7d2eb0 pc=0x3d80c
            runtime.(*pageAlloc).free(...)
...
            runtime.gcMarkTermination()
            	runtime/mgc.go:1127 +0x538 fp=0x84e8c6f8 sp=0x84e8c518 pc=0x33168
            runtime.gcMarkDone()
            	runtime/mgc.go:941 +0x25c fp=0x84e8c748 sp=0x84e8c6f8 pc=0x32afc
            runtime.gcBgMarkWorker()
            	runtime/mgc.go:1445 +0x374 fp=0x84e8c7d8 sp=0x84e8c748 pc=0x33e74
            runtime.goexit({})
            	runtime/asm_riscv64.s:521 +0x4 fp=0x84e8c7d8 sp=0x84e8c7d8 pc=0x89fbc
            created by runtime.gcBgMarkStartWorkers in goroutine 1
            	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@8b6e0e6e runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x94ba2d?, 0x440841a0?})
	runtime/panic.go:1018 +0x44 fp=0x6eb1b438 sp=0x6eb1b410 pc=0x53c94
runtime.(*scavChunkData).free(0x751e8?, 0x4, 0x6eb1b4a0?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x6eb1b458 sp=0x6eb1b438 pc=0x3dbe0
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x510 fp=0x4441cef8 sp=0x4441cd18 pc=0x33140
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x4441cf48 sp=0x4441cef8 pc=0x32afc
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0x4441cfd8 sp=0x4441cf48 pc=0x33e74
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x4441cfd8 sp=0x4441cfd8 pc=0x89fcc
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 20:48 openbsd-riscv64-jsing go@ad76a98d cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=58
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x310bd6?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0x8d419ba0 sp=0x8d419b78 pc=0x45294
runtime.(*scavChunkData).free(0x0?, 0x3a, 0x1d8?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x8d419bc0 sp=0x8d419ba0 pc=0x341d0
runtime.(*scavengeIndex).free(0x57af40, 0x30f, 0xcd, 0x3a)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x8d419bf8 sp=0x8d419bc0 pc=0x33dfc
...
	cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go:405 +0x34 fp=0x7be79fd8 sp=0x7be79fc8 pc=0x23d80c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x7be79fd8 sp=0x7be79fd8 pc=0x74894
created by cmd/vendor/golang.org/x/tools/go/analysis/unitchecker.run.func3 in goroutine 14
	cmd/vendor/golang.org/x/tools/go/analysis/unitchecker/unitchecker.go:402 +0x6c

goroutine 17 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@b01cb72e net/http [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x94ba2d?, 0x9?})
	runtime/panic.go:1018 +0x44 fp=0x175b4da30 sp=0x175b4da08 pc=0x53c94
runtime.(*scavChunkData).free(0xb6b20b00?, 0x4, 0x45440?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x175b4da50 sp=0x175b4da30 pc=0x3dbe0
runtime.(*scavengeIndex).free(0x1109200, 0x1bf, 0x54, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x175b4da88 sp=0x175b4da50 pc=0x3d80c
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x510 fp=0x6c382ef8 sp=0x6c382d18 pc=0x33140
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x6c382f48 sp=0x6c382ef8 pc=0x32afc
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0x6c382fd8 sp=0x6c382f48 pc=0x33e74
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x6c382fd8 sp=0x6c382fd8 pc=0x89fcc
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 17:02 openbsd-riscv64-jsing go@b455e239 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.15s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x48000000, 0x4c000000)
            malloc_test.go:301: reserved [0x11c000000, 0x120000000)
            malloc_test.go:301: reserved [0x78000000, 0x7c000000)
        runtime: inUse=3 npages=4
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x422a44?, 0x899c8?})
...
        runtime.bgsweep(0x0?)
        	/home/gopher/build/go/src/runtime/mgcsweep.go:308 +0x1c4 fp=0x4403efc8 sp=0x4403ef80 pc=0x38d04
        runtime.gcenable.gowrap1()
        	/home/gopher/build/go/src/runtime/mgc.go:203 +0x2c fp=0x4403efd8 sp=0x4403efc8 pc=0x2ce74
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x4403efd8 sp=0x4403efd8 pc=0x87b8c
        created by runtime.gcenable in goroutine 1
        	/home/gopher/build/go/src/runtime/mgc.go:203 +0x70

        (exit status exit status 2)
2023-10-06 17:02 openbsd-riscv64-jsing go@b455e239 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.26s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x50000000, 0x54000000)
            malloc_test.go:301: reserved [0xbc000000, 0xc0000000)
            malloc_test.go:301: reserved [0xb0000000, 0xb4000000)
            malloc_test.go:301: reserved [0x164000000, 0x168000000)
            malloc_test.go:301: reserved [0x16c000000, 0x170000000)
        --- PASS: TestArenaCollision (0.06s)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?
...
        traceback: unexpected SPWRITE function runtime.morestack
        runtime.morestack()
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:204 +0x58 fp=0x55018530 sp=0x55018528 pc=0x85a18

        goroutine 19 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 18
        	/home/gopher/build/go/src/runtime/mgc.go:1237 +0x2c

        (exit status exit status 2)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@561bf045 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x94b88b?, 0x0?})
	runtime/panic.go:1018 +0x44 fp=0xc83b1250 sp=0xc83b1228 pc=0x53c2c
runtime.(*scavChunkData).free(0x0?, 0x4, 0x453e8?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xc83b1270 sp=0xc83b1250 pc=0x3dbb0
runtime.(*scavengeIndex).free(0x1109300, 0x3ed, 0xc0, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xc83b12a8 sp=0xc83b1270 pc=0x3d7dc
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x50c fp=0xf8046ef8 sp=0xf8046d18 pc=0x33124
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0xf8046f48 sp=0xf8046ef8 pc=0x32ae4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x374 fp=0xf8046fd8 sp=0xf8046f48 pc=0x33e54
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0xf8046fd8 sp=0xf8046fd8 pc=0x89ebc
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@f711892a runtime [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x8fb94f?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0x848ab528 sp=0x848ab500 pc=0x4b53c
runtime.(*scavChunkData).free(0x0?, 0x2, 0x421?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x848ab548 sp=0x848ab528 pc=0x38398
runtime.(*scavengeIndex).free(0x1089000, 0x19e, 0x125, 0x2)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x848ab580 sp=0x848ab548 pc=0x37fc4
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x518 fp=0x4c398ef8 sp=0x4c398d18 pc=0x2eba0
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x4c398f48 sp=0x4c398ef8 pc=0x2e554
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x4c398fd8 sp=0x4c398f48 pc=0x2f8bc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x4c398fd8 sp=0x4c398fd8 pc=0x7ec3c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@6e8caefc runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x94b88b?, 0x440009c0?})
	runtime/panic.go:1018 +0x44 fp=0x8c7bd7f0 sp=0x8c7bd7c8 pc=0x53cac
runtime.(*scavChunkData).free(0x751e0?, 0x4, 0x8c7bd858?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x8c7bd810 sp=0x8c7bd7f0 pc=0x3dbe0
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x8c7bdda8 sp=0x8c7bdbc0 pc=0x6f350
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x8c7bddb0 sp=0x8c7bdda8 pc=0x87e48

goroutine 93 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-07 12:31 openbsd-riscv64-jsing go@f711892a runtime [build] (log)
runtime: inUse=0 npages=5
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x94b881?, 0x432b8?})
	runtime/panic.go:1018 +0x44 fp=0x3bc1e5ddc0 sp=0x3bc1e5dd98 pc=0x53a7c
runtime.(*scavChunkData).free(0x1eae4?, 0x5, 0x452a8?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x3bc1e5dde0 sp=0x3bc1e5ddc0 pc=0x3dab0
runtime.(*scavengeIndex).free(0x1109280, 0x392, 0x87, 0x5)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x3bc1e5de18 sp=0x3bc1e5dde0 pc=0x3d6dc
...
runtime.sweepone(...)
	runtime/mgcsweep.go:393
runtime.bgsweep(0xe4066000)
	runtime/mgcsweep.go:301 +0x1bc fp=0xe40457c8 sp=0xe4045748 pc=0x3ea34
runtime.gcenable.gowrap1()
	runtime/mgc.go:203 +0x2c fp=0xe40457d8 sp=0xe40457c8 pc=0x31a14
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0xe40457d8 sp=0xe40457d8 pc=0x89b6c
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:203 +0x70
2023-10-08 23:15 openbsd-riscv64-jsing go@2744155d runtime [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x8fb94f?, 0x11?})
	runtime/panic.go:1018 +0x44 fp=0xee801a40 sp=0xee801a18 pc=0x4b53c
runtime.(*scavChunkData).free(0xf40?, 0x2, 0x1e8?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xee801a60 sp=0xee801a40 pc=0x38398
runtime.(*scavengeIndex).free(0x1089000, 0x3ef, 0xca, 0x2)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xee801a98 sp=0xee801a60 pc=0x37fc4
...
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0xee802138 sp=0xee801f98 pc=0x659b8
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0xee802140 sp=0xee802138 pc=0x7cac8

goroutine 181 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot gopherbot added the compiler/runtime Issues related to the Go compiler and/or runtime. label Oct 9, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@262b8050 go/types [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0xe26db1f0 sp=0xe26db1c8 pc=0x53a24
runtime.(*scavChunkData).free(0xe26db2b0?, 0x2, 0x45250?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xe26db210 sp=0xe26db1f0 pc=0x3da58
runtime.(*scavengeIndex).free(0x11465a0, 0x173, 0x65, 0x2)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xe26db248 sp=0xe26db210 pc=0x3d684
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x50c fp=0x5c4006f8 sp=0x5c400518 pc=0x33014
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x5c400748 sp=0x5c4006f8 pc=0x329d4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x5c4007d8 sp=0x5c400748 pc=0x33d3c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x5c4007d8 sp=0x5c4007d8 pc=0x89b14
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@b201cf4a (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72eec3?, 0x5c?})
	/home/gopher/build/go/src/runtime/panic.go:837 +0x44 fp=0x5b39e480 sp=0x5b39e458 pc=0x4a744
runtime.(*scavChunkData).free(0x17c0?, 0x1, 0x2f8?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x5b39e4a0 sp=0x5b39e480 pc=0x376d0
runtime.(*scavengeIndex).free(0xd56f80, 0x11c, 0x18e, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x5b39e4d8 sp=0x5b39e4a0 pc=0x371fc
...
runtime.bgsweep(0x0?)
	/home/gopher/build/go/src/runtime/mgcsweep.go:301 +0x14c fp=0x440437c8 sp=0x44043780 pc=0x382ec
runtime.gcenable.func1()
	/home/gopher/build/go/src/runtime/mgc.go:203 +0x2c fp=0x440437d8 sp=0x440437c8 pc=0x2c7dc
runtime.goexit()
	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x440437d8 sp=0x440437d8 pc=0x7e434
created by runtime.gcenable in goroutine 1
	/home/gopher/build/go/src/runtime/mgc.go:203 +0x70

go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/compile -std -pack -o /home/gopher/build/tmp/go-tool-dist-3577500057/runtime/_go_.a -p runtime -importcfg /home/gopher/build/tmp/go-tool-dist-3577500057/runtime/importcfg -asmhdr /home/gopher/build/tmp/go-tool-dist-3577500057/runtime/go_asm.h -symabis /home/gopher/build/tmp/go-tool-dist-3577500057/runtime/symabis /home/gopher/build/go/src/runtime/alg.go /home/gopher/build/go/src/runtime/arena.go /home/gopher/build/go/src/runtime/asan0.go /home/gopher/build/go/src/runtime/atomic_pointer.go /home/gopher/build/go/src/runtime/auxv_none.go /home/gopher/build/go/src/runtime/cgo.go /home/gopher/build/go/src/runtime/cgocall.go /home/gopher/build/go/src/runtime/cgocallback.go /home/gopher/build/go/src/runtime/cgocheck.go /home/gopher/build/go/src/runtime/chan.go /home/gopher/build/go/src/runtime/checkptr.go /home/gopher/build/go/src/runtime/compiler.go /home/gopher/build/go/src/runtime/complex.go /home/gopher/build/go/src/runtime/covercounter.go /home/gopher/build/go/src/runtime/covermeta.go /home/gopher/build/go/src/runtime/cpuflags.go /home/gopher/build/go/src/runtime/cpuprof.go /home/gopher/build/go/src/runtime/cputicks.go /home/gopher/build/go/src/runtime/create_file_unix.go /home/gopher/build/go/src/runtime/debug.go /home/gopher/build/go/src/runtime/debuglog.go /home/gopher/build/go/src/runtime/debuglog_off.go /home/gopher/build/go/src/runtime/defs_openbsd_riscv64.go /home/gopher/build/go/src/runtime/env_posix.go /home/gopher/build/go/src/runtime/error.go /home/gopher/build/go/src/runtime/exithook.go /home/gopher/build/go/src/runtime/extern.go /home/gopher/build/go/src/runtime/fastlog2.go /home/gopher/build/go/src/runtime/fastlog2table.go /home/gopher/build/go/src/runtime/fds_unix.go /home/gopher/build/go/src/runtime/float.go /home/gopher/build/go/src/runtime/hash64.go /home/gopher/build/go/src/runtime/heapdump.go /home/gopher/build/go/src/runtime/histogram.go /home/gopher/build/go/src/runtime/iface.go /home/gopher/build/go/src/runtime/lfstack.go /home/gopher/build/go/src/runtime/lock_sema.go /home/gopher/build/go/src/runtime/lockrank.go /home/gopher/build/go/src/runtime/lockrank_off.go /home/gopher/build/go/src/runtime/malloc.go /home/gopher/build/go/src/runtime/map.go /home/gopher/build/go/src/runtime/map_fast32.go /home/gopher/build/go/src/runtime/map_fast64.go /home/gopher/build/go/src/runtime/map_faststr.go /home/gopher/build/go/src/runtime/mbarrier.go /home/gopher/build/go/src/runtime/mbitmap.go /home/gopher/build/go/src/runtime/mcache.go /home/gopher/build/go/src/runtime/mcentral.go /home/gopher/build/go/src/runtime/mcheckmark.go /home/gopher/build/go/src/runtime/mem.go /home/gopher/build/go/src/runtime/mem_bsd.go /home/gopher/build/go/src/runtime/metrics.go /home/gopher/build/go/src/runtime/mfinal.go /home/gopher/build/go/src/runtime/mfixalloc.go /home/gopher/build/go/src/runtime/mgc.go /home/gopher/build/go/src/runtime/mgclimit.go /home/gopher/build/go/src/runtime/mgcmark.go /home/gopher/build/go/src/runtime/mgcpacer.go /home/gopher/build/go/src/runtime/mgcscavenge.go /home/gopher/build/go/src/runtime/mgcstack.go /home/gopher/build/go/src/runtime/mgcsweep.go /home/gopher/build/go/src/runtime/mgcwork.go /home/gopher/build/go/src/runtime/mheap.go /home/gopher/build/go/src/runtime/minmax.go /home/gopher/build/go/src/runtime/mpagealloc.go /home/gopher/build/go/src/runtime/mpagealloc_64bit.go /home/gopher/build/go/src/runtime/mpagecache.go /home/gopher/build/go/src/runtime/mpallocbits.go /home/gopher/build/go/src/runtime/mprof.go /home/gopher/build/go/src/runtime/mranges.go /home/gopher/build/go/src/runtime/msan0.go /home/gopher/build/go/src/runtime/msize.go /home/gopher/build/go/src/runtime/mspanset.go /home/gopher/build/go/src/runtime/mstats.go /home/gopher/build/go/src/runtime/mwbbuf.go /home/gopher/build/go/src/runtime/nbpipe_pipe2.go /home/gopher/build/go/src/runtime/netpoll.go /home/gopher/build/go/src/runtime/netpoll_kqueue.go /home/gopher/build/go/src/runtime/nonwindows_stub.go /home/gopher/build/go/src/runtime/os2_openbsd.go /home/gopher/build/go/src/runtime/os_openbsd.go /home/gopher/build/go/src/runtime/os_openbsd_libc.go /home/gopher/build/go/src/runtime/os_unix.go /home/gopher/build/go/src/runtime/os_unix_nonlinux.go /home/gopher/build/go/src/runtime/pagetrace_off.go /home/gopher/build/go/src/runtime/panic.go /home/gopher/build/go/src/runtime/pinner.go /home/gopher/build/go/src/runtime/plugin.go /home/gopher/build/go/src/runtime/preempt.go /home/gopher/build/go/src/runtime/preempt_nonwindows.go /home/gopher/build/go/src/runtime/print.go /home/gopher/build/go/src/runtime/proc.go /home/gopher/build/go/src/runtime/profbuf.go /home/gopher/build/go/src/runtime/proflabel.go /home/gopher/build/go/src/runtime/race0.go /home/gopher/build/go/src/runtime/rdebug.go /home/gopher/build/go/src/runtime/retry.go /home/gopher/build/go/src/runtime/runtime.go /home/gopher/build/go/src/runtime/runtime1.go /home/gopher/build/go/src/runtime/runtime2.go /home/gopher/build/go/src/runtime/runtime_boring.go /home/gopher/build/go/src/runtime/rwmutex.go /home/gopher/build/go/src/runtime/security_issetugid.go /home/gopher/build/go/src/runtime/security_unix.go /home/gopher/build/go/src/runtime/select.go /home/gopher/build/go/src/runtime/sema.go /home/gopher/build/go/src/runtime/signal_openbsd.go /home/gopher/build/go/src/runtime/signal_openbsd_riscv64.go /home/gopher/build/go/src/runtime/signal_riscv64.go /home/gopher/build/go/src/runtime/signal_unix.go /home/gopher/build/go/src/runtime/sigqueue.go /home/gopher/build/go/src/runtime/sigqueue_note.go /home/gopher/build/go/src/runtime/sizeclasses.go /home/gopher/build/go/src/runtime/slice.go /home/gopher/build/go/src/runtime/softfloat64.go /home/gopher/build/go/src/runtime/stack.go /home/gopher/build/go/src/runtime/stkframe.go /home/gopher/build/go/src/runtime/string.go /home/gopher/build/go/src/runtime/stubs.go /home/gopher/build/go/src/runtime/stubs_nonlinux.go /home/gopher/build/go/src/runtime/stubs_riscv64.go /home/gopher/build/go/src/runtime/symtab.go /home/gopher/build/go/src/runtime/symtabinl.go /home/gopher/build/go/src/runtime/sys_libc.go /home/gopher/build/go/src/runtime/sys_nonppc64x.go /home/gopher/build/go/src/runtime/sys_openbsd.go /home/gopher/build/go/src/runtime/sys_openbsd1.go /home/gopher/build/go/src/runtime/sys_openbsd2.go /home/gopher/build/go/src/runtime/sys_openbsd3.go /home/gopher/build/go/src/runtime/sys_riscv64.go /home/gopher/build/go/src/runtime/tagptr.go /home/gopher/build/go/src/runtime/tagptr_64bit.go /home/gopher/build/go/src/runtime/test_stubs.go /home/gopher/build/go/src/runtime/time.go /home/gopher/build/go/src/runtime/time_nofake.go /home/gopher/build/go/src/runtime/timestub.go /home/gopher/build/go/src/runtime/tls_stub.go /home/gopher/build/go/src/runtime/trace.go /home/gopher/build/go/src/runtime/traceback.go /home/gopher/build/go/src/runtime/type.go /home/gopher/build/go/src/runtime/typekind.go /home/gopher/build/go/src/runtime/unsafe.go /home/gopher/build/go/src/runtime/utf8.go /home/gopher/build/go/src/runtime/vdso_in_none.go /home/gopher/build/go/src/runtime/write_err.go: exit status 2

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-05 16:33 openbsd-riscv64-jsing net@88194ad8 go@5955a03e runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72eec3?, 0x1?})
	../../go/src/runtime/panic.go:837 +0x44 fp=0x92778c08 sp=0x92778be0 pc=0x4a744
runtime.(*scavChunkData).free(0x24c0?, 0x1, 0x498?)
	../../go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x92778c28 sp=0x92778c08 pc=0x376d0
runtime.(*scavengeIndex).free(0xd56f80, 0x38e, 0x2c, 0x1)
	../../go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x92778c60 sp=0x92778c28 pc=0x371fc
...
runtime.gcMarkTermination()
	../../go/src/runtime/mgc.go:1101 +0x51c fp=0xe0041ef8 sp=0xe0041d18 pc=0x2dcfc
runtime.gcMarkDone()
	../../go/src/runtime/mgc.go:941 +0x25c fp=0xe0041f48 sp=0xe0041ef8 pc=0x2d6ac
runtime.gcBgMarkWorker()
	../../go/src/runtime/mgc.go:1445 +0x378 fp=0xe0041fd8 sp=0xe0041f48 pc=0x2ea28
runtime.goexit()
	../../go/src/runtime/asm_riscv64.s:521 +0x4 fp=0xe0041fd8 sp=0xe0041fd8 pc=0x7e434
created by runtime.gcBgMarkStartWorkers in goroutine 1
	../../go/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-10 17:14 openbsd-riscv64-jsing go@7e1713e9 encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0xffffffff?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0xd65f3f98 sp=0xd65f3f70 pc=0x4583c
runtime.(*scavChunkData).free(0x1c2fc?, 0x1, 0x40000?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0xd65f3fb8 sp=0xd65f3f98 pc=0x33438
runtime.(*scavengeIndex).free(0x326ca0, 0x1e5, 0x16e, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0xd65f3ff0 sp=0xd65f3fb8 pc=0x33074
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1247 +0x1fc fp=0xb6759e00 sp=0xb6759d28 pc=0x12d5cc
encoding/gob.(*Decoder).DecodeValue(0x78118000, {0x17d4a0?, 0x7968e0d8?, 0x796c80a0?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0xb6759e78 sp=0xb6759e00 pc=0x12e4d8
encoding/gob.(*Decoder).Decode(0x78118000, {0x17d4a0?, 0x7968e0d8?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x148 fp=0xb6759ec8 sp=0xb6759e78 pc=0x12e310
encoding/gob.testEncodeDecode(0x78186d00, {0x17d4a0, 0x7968e0c0}, {0x17d4a0, 0x7968e0d8})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0xb6759f38 sp=0xb6759ec8 pc=0x1468c0
encoding/gob.TestLargeSlice.func1(0x78186d00)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0xb6759f78 sp=0xb6759f38 pc=0x15ca04
testing.tRunner(0x78186d00, 0x1cd260)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-10 15:45 openbsd-riscv64-jsing net@b225e7ca go@e7015c93 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95bdef?, 0xb23ac340?})
	runtime/panic.go:1018 +0x44 fp=0xee26a6d8 sp=0xee26a6b0 pc=0x51f14
runtime.(*scavChunkData).free(0x72990?, 0x4, 0xee26a740?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xee26a6f8 sp=0xee26a6d8 pc=0x3c5f8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x50c fp=0x5c043ef8 sp=0x5c043d18 pc=0x32174
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x5c043f48 sp=0x5c043ef8 pc=0x31b84
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x5c043fd8 sp=0x5c043f48 pc=0x32dbc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x5c043fd8 sp=0x5c043fd8 pc=0x872b4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c

watchflakes

@mknyszek mknyszek added this to the Backlog milestone Oct 11, 2023
@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@e0948d82 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72eec3?, 0x1?})
	../../go/src/runtime/panic.go:837 +0x44 fp=0x421dd5d8 sp=0x421dd5b0 pc=0x4a744
runtime.(*scavChunkData).free(0x2f88?, 0x1, 0x5f1?)
	../../go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x421dd5f8 sp=0x421dd5d8 pc=0x376d0
runtime.(*scavengeIndex).free(0xd56f80, 0x3f7, 0x177, 0x1)
	../../go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x421dd630 sp=0x421dd5f8 pc=0x371fc
...
runtime.gcMarkTermination()
	../../go/src/runtime/mgc.go:1101 +0x51c fp=0xf40436f8 sp=0xf4043518 pc=0x2dcfc
runtime.gcMarkDone()
	../../go/src/runtime/mgc.go:941 +0x25c fp=0xf4043748 sp=0xf40436f8 pc=0x2d6ac
runtime.gcBgMarkWorker()
	../../go/src/runtime/mgc.go:1445 +0x378 fp=0xf40437d8 sp=0xf4043748 pc=0x2ea28
runtime.goexit()
	../../go/src/runtime/asm_riscv64.s:521 +0x4 fp=0xf40437d8 sp=0xf40437d8 pc=0x7e434
created by runtime.gcBgMarkStartWorkers in goroutine 75
	../../go/src/runtime/mgc.go:1237 +0x2c
2023-10-06 20:50 openbsd-riscv64-jsing sys@8ccaaf02 go@778880b0 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdcf?, 0x5c0009c0?})
	runtime/panic.go:1018 +0x44 fp=0xeafe88c8 sp=0xeafe88a0 pc=0x53a24
runtime.(*scavChunkData).free(0x74e20?, 0x4, 0xeafe8930?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xeafe88e8 sp=0xeafe88c8 pc=0x3da58
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x50c fp=0x5c03cef8 sp=0x5c03cd18 pc=0x33014
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x5c03cf48 sp=0x5c03cef8 pc=0x329d4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x5c03cfd8 sp=0x5c03cf48 pc=0x33d3c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x5c03cfd8 sp=0x5c03cfd8 pc=0x89b14
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-09 16:00 openbsd-riscv64-jsing go@7fcc626b cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x310d36?, 0x53ef5780?})
	runtime/panic.go:1018 +0x44 fp=0xddf26b18 sp=0xddf26af0 pc=0x45094
runtime.(*scavChunkData).free(0xa20?, 0x1, 0x144?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xddf26b38 sp=0xddf26b18 pc=0x34090
runtime.(*scavengeIndex).free(0x57af40, 0x288, 0x1c3, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xddf26b70 sp=0xddf26b38 pc=0x33cbc
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x518 fp=0xb80306f8 sp=0xb8030518 pc=0x2a930
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0xb8030748 sp=0xb80306f8 pc=0x2a2e4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0xb80307d8 sp=0xb8030748 pc=0x2b65c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0xb80307d8 sp=0xb80307d8 pc=0x7448c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-09 17:48 openbsd-riscv64-jsing go@e6990b76 encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0x47271c80 sp=0x47271c58 pc=0x4731c
runtime.(*scavChunkData).free(0x0?, 0x4, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x47271ca0 sp=0x47271c80 pc=0x347e8
runtime.(*scavengeIndex).free(0x346ca0, 0x1e0, 0x10a, 0x4)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x47271cd8 sp=0x47271ca0 pc=0x34414
...
	/home/gopher/build/go/src/encoding/gob/encoder.go:82 +0x168 fp=0x7809add8 sp=0x7809ad58 pc=0x138d30
encoding/gob.(*Encoder).EncodeValue(0x780a0d20, {0x17d4a0?, 0x7817a618?, 0x78101740?})
	/home/gopher/build/go/src/encoding/gob/encoder.go:253 +0x3fc fp=0x7809ae90 sp=0x7809add8 pc=0x139ac4
encoding/gob.(*Encoder).Encode(0x78188d00?, {0x17d4a0?, 0x7817a618?})
	/home/gopher/build/go/src/encoding/gob/encoder.go:176 +0x9c fp=0x7809aec8 sp=0x7809ae90 pc=0x139554
encoding/gob.testEncodeDecode(0x78188d00, {0x17d4a0, 0x7817a618}, {0x17d4a0, 0x7817a630})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1555 +0x21c fp=0x7809af38 sp=0x7809aec8 pc=0x14ae14
encoding/gob.TestLargeSlice.func1(0x78188d00)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0x7809af78 sp=0x7809af38 pc=0x161014
testing.tRunner(0x78188d00, 0x1cd260)
2023-10-10 00:36 openbsd-riscv64-jsing sys@1d9f0b6d go@a5943e9d runtime [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x7b548?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xed0e8588 sp=0xed0e8560 pc=0x5318c
runtime.(*scavChunkData).free(0x6de94?, 0x3, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xed0e85a8 sp=0xed0e8588 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x179, 0x182, 0x3)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xed0e85e0 sp=0xed0e85a8 pc=0x3cdb4
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:3812 +0x68 fp=0xed0e8b80 sp=0xed0e8b48 pc=0x5dca0
runtime.newstack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/stack.go:1071 +0x2b0 fp=0xed0e8d68 sp=0xed0e8b80 pc=0x6e968
runtime.morestack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:204 +0x58 fp=0xed0e8d70 sp=0xed0e8d68 pc=0x87698

goroutine 79 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-10 00:36 openbsd-riscv64-jsing sys@1d9f0b6d go@e12bdc80 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x512d0?})
	runtime/panic.go:1018 +0x44 fp=0x122776ec0 sp=0x122776e98 pc=0x53a24
runtime.(*scavChunkData).free(0x1ea8c?, 0x1, 0x45250?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x122776ee0 sp=0x122776ec0 pc=0x3da58
runtime.(*scavengeIndex).free(0x11465a0, 0x384, 0x37, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x122776f18 sp=0x122776ee0 pc=0x3d684
...
runtime.sweepone(...)
	runtime/mgcsweep.go:393
runtime.bgsweep(0xe0060000)
	runtime/mgcsweep.go:301 +0x1bc fp=0xe00477c8 sp=0xe0047748 pc=0x3e9dc
runtime.gcenable.gowrap1()
	runtime/mgc.go:203 +0x2c fp=0xe00477d8 sp=0xe00477c8 pc=0x319bc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0xe00477d8 sp=0xe00477d8 pc=0x89b14
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:203 +0x70
2023-10-10 15:45 openbsd-riscv64-jsing net@b225e7ca go@f34964a5 go/types [build] (log)
runtime: inUse=0 npages=6
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x0?})
	runtime/panic.go:1018 +0x44 fp=0x11ee61e80 sp=0x11ee61e58 pc=0x53a24
runtime.(*scavChunkData).free(0x0?, 0x6, 0x45250?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x11ee61ea0 sp=0x11ee61e80 pc=0x3da58
runtime.(*scavengeIndex).free(0x11465a0, 0x1f7, 0x1aa, 0x6)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x11ee61ed8 sp=0x11ee61ea0 pc=0x3d684
...
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x11ee62648 sp=0x11ee62460 pc=0x6ef90
traceback: unexpected SPWRITE function runtime.morestack
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x11ee62650 sp=0x11ee62648 pc=0x879a0

goroutine 62 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1237 +0x2c
2023-10-10 16:32 openbsd-riscv64-jsing go@f34964a5 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x800?})
	runtime/panic.go:1018 +0x44 fp=0x9f17e760 sp=0x9f17e738 pc=0x53a24
runtime.(*scavChunkData).free(0x3ffa0?, 0x1, 0x45250?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x9f17e780 sp=0x9f17e760 pc=0x3da58
runtime.(*scavengeIndex).free(0x11465a0, 0x1f1, 0x1a4, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x9f17e7b8 sp=0x9f17e780 pc=0x3d684
...
runtime.gcMarkTermination()
	runtime/mgc.go:1127 +0x534 fp=0x7c0486f8 sp=0x7c048518 pc=0x3303c
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x7c048748 sp=0x7c0486f8 pc=0x329d4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x7c0487d8 sp=0x7c048748 pc=0x33d3c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x7c0487d8 sp=0x7c0487d8 pc=0x89b14
created by runtime.gcBgMarkStartWorkers in goroutine 58
	runtime/mgc.go:1237 +0x2c
2023-10-10 20:47 openbsd-riscv64-jsing go@7c446bab runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x540821a0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x44c84790 sp=0x44c84768 pc=0x5318c
runtime.(*scavChunkData).free(0x74838?, 0x4, 0x44c847f8?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x44c847b0 sp=0x44c84790 pc=0x3d288
runtime.(*scavengeIndex).free(...)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x54040ef8 sp=0x54040d18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x54040f48 sp=0x54040ef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x54040fd8 sp=0x54040f48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x54040fd8 sp=0x54040fd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-10 22:48 openbsd-riscv64-jsing go@dacf1f1e cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0xce610510 sp=0xce6104e8 pc=0x53a24
runtime.(*scavChunkData).free(0xce6105d0?, 0x1, 0x45250?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xce610530 sp=0xce610510 pc=0x3da58
runtime.(*scavengeIndex).free(0x11465a0, 0x12f, 0x1f8, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xce610568 sp=0xce610530 pc=0x3d684
...
runtime.gcMarkTermination()
	runtime/mgc.go:1101 +0x50c fp=0x4443c6f8 sp=0x4443c518 pc=0x33014
runtime.gcMarkDone()
	runtime/mgc.go:941 +0x25c fp=0x4443c748 sp=0x4443c6f8 pc=0x329d4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1445 +0x36c fp=0x4443c7d8 sp=0x4443c748 pc=0x33d3c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x4443c7d8 sp=0x4443c7d8 pc=0x89b14
created by runtime.gcBgMarkStartWorkers in goroutine 46
	runtime/mgc.go:1237 +0x2c
2023-10-11 12:48 openbsd-riscv64-jsing go@e12bdc80 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x310b76?, 0x87?})
	runtime/panic.go:1018 +0x44 fp=0xcd598ea0 sp=0xcd598e78 pc=0x4503c
runtime.(*scavChunkData).free(0x2198?, 0x1, 0x433?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xcd598ec0 sp=0xcd598ea0 pc=0x34038
runtime.(*scavengeIndex).free(0x57d460, 0x167, 0x11f, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xcd598ef8 sp=0xcd598ec0 pc=0x33c64
...
runtime.sweepone()
	runtime/mgcsweep.go:393 +0x140 fp=0x58035788 sp=0x58035730 pc=0x34ed0
runtime.bgsweep(0x5804e000)
	runtime/mgcsweep.go:301 +0x14c fp=0x580357c8 sp=0x58035788 pc=0x34c2c
runtime.gcenable.gowrap1()
	runtime/mgc.go:203 +0x2c fp=0x580357d8 sp=0x580357c8 pc=0x296bc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x580357d8 sp=0x580357d8 pc=0x74434
created by runtime.gcenable in goroutine 1
	runtime/mgc.go:203 +0x70
2023-10-11 16:52 openbsd-riscv64-jsing net@92728b3b go@655155d0 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bdef?, 0x600841a0?})
	runtime/panic.go:1018 +0x44 fp=0xaab35468 sp=0xaab35440 pc=0x53824
runtime.(*scavChunkData).free(0x74c20?, 0x4, 0xaab354d0?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xaab35488 sp=0xaab35468 pc=0x3d888
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1117 +0x524 fp=0x60fceef8 sp=0x60fced18 pc=0x32e74
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x60fcef48 sp=0x60fceef8 pc=0x3281c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x60fcefd8 sp=0x60fcef48 pc=0x33b74
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x60fcefd8 sp=0x60fcefd8 pc=0x89914
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-11 16:55 openbsd-riscv64-jsing go@47a71d1e runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.26s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x9c000000, 0xa0000000)
            malloc_test.go:301: reserved [0x17c000000, 0x180000000)
            malloc_test.go:301: reserved [0x74000000, 0x78000000)
            malloc_test.go:301: reserved [0x184000000, 0x188000000)
            malloc_test.go:301: reserved [0xbc000000, 0xc0000000)
        --- PASS: TestArenaCollision (0.06s)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?
...
        traceback: unexpected SPWRITE function runtime.morestack
        runtime.morestack()
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:204 +0x58 fp=0x5350f2e0 sp=0x5350f2d8 pc=0x85850

        goroutine 7 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 6
        	/home/gopher/build/go/src/runtime/mgc.go:1233 +0x2c

        (exit status exit status 2)
2023-10-11 20:20 openbsd-riscv64-jsing go@09aada24 encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0xe0f2ef10 sp=0xe0f2eee8 pc=0x4729c
runtime.(*scavChunkData).free(0x3490d0?, 0x4, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0xe0f2ef30 sp=0xe0f2ef10 pc=0x34790
runtime.(*scavengeIndex).free(0x346c80, 0x1fc, 0x6e, 0x4)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0xe0f2ef68 sp=0xe0f2ef30 pc=0x343bc
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1247 +0x1fc fp=0xb8d67e00 sp=0xb8d67d28 pc=0x13184c
encoding/gob.(*Decoder).DecodeValue(0x7c0e0100, {0x17d4e0?, 0x7c00a240?, 0x7c0663c0?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0xb8d67e78 sp=0xb8d67e00 pc=0x132788
encoding/gob.(*Decoder).Decode(0x7c0e0100, {0x17d4e0?, 0x7c00a240?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x148 fp=0xb8d67ec8 sp=0xb8d67e78 pc=0x1325b0
encoding/gob.testEncodeDecode(0x7c1cbba0, {0x17d4e0, 0x7c00a228}, {0x17d4e0, 0x7c00a240})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0xb8d67f38 sp=0xb8d67ec8 pc=0x14ae00
encoding/gob.TestLargeSlice.func2(0x7c1cbba0)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1591 +0xcc fp=0xb8d67f78 sp=0xb8d67f38 pc=0x16106c
testing.tRunner(0x7c1cbba0, 0x1cd268)
2023-10-11 21:54 openbsd-riscv64-jsing sys@1bfbee0e go@3de6033d runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x72ef4e?, 0xd46ec0?})
	../../go/src/runtime/panic.go:837 +0x44 fp=0xfb530168 sp=0xfb530140 pc=0x4a744
runtime.(*scavChunkData).free(0xfb530238?, 0x4, 0x0?)
	../../go/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xfb530188 sp=0xfb530168 pc=0x376d0
runtime.(*scavengeIndex).free(0xd56f80, 0x121, 0xc0, 0x4)
	../../go/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xfb5301c0 sp=0xfb530188 pc=0x371fc
...
runtime.gcMarkTermination()
	../../go/src/runtime/mgc.go:1101 +0x51c fp=0x483f1ef8 sp=0x483f1d18 pc=0x2dcfc
runtime.gcMarkDone()
	../../go/src/runtime/mgc.go:941 +0x25c fp=0x483f1f48 sp=0x483f1ef8 pc=0x2d6ac
runtime.gcBgMarkWorker()
	../../go/src/runtime/mgc.go:1445 +0x378 fp=0x483f1fd8 sp=0x483f1f48 pc=0x2ea28
runtime.goexit()
	../../go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x483f1fd8 sp=0x483f1fd8 pc=0x7e434
created by runtime.gcBgMarkStartWorkers in goroutine 1
	../../go/src/runtime/mgc.go:1237 +0x2c
2023-10-11 21:58 openbsd-riscv64-jsing net@d23d9bc5 go@c729dc18 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b7ba?, 0x0?})
	runtime/panic.go:1016 +0x44 fp=0xd3a8c288 sp=0xd3a8c260 pc=0x528e4
runtime.(*scavChunkData).free(0x0?, 0x1, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xd3a8c2a8 sp=0xd3a8c288 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x1096600, 0x129, 0x1bb, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xd3a8c2e0 sp=0xd3a8c2a8 pc=0x3c124
...
	runtime/proc.go:3799 +0x68 fp=0xd3a8c880 sp=0xd3a8c850 pc=0x5cfd0
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0xd3a8ca68 sp=0xd3a8c880 pc=0x6da58
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0xd3a8ca70 sp=0xd3a8ca68 pc=0x863d0

goroutine 96 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 74
	runtime/mgc.go:1227 +0x2c
2023-10-12 14:39 openbsd-riscv64-jsing go@ade730a9 regexp/syntax (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x149a86?, 0x50?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0xe22e9930 sp=0xe22e9908 pc=0x4655c
runtime.(*scavChunkData).free(0x48?, 0x1, 0x27b?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0xe22e9950 sp=0xe22e9930 pc=0x33ae0
runtime.(*scavengeIndex).free(0x276dc0, 0x12d, 0x189, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0xe22e9988 sp=0xe22e9950 pc=0x3370c
...
	/home/gopher/build/go/src/runtime/mgc.go:203 +0x2c fp=0x480337d8 sp=0x480337c8 pc=0x28edc
runtime.goexit({})
	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x480337d8 sp=0x480337d8 pc=0x7778c
created by runtime.gcenable in goroutine 1
	/home/gopher/build/go/src/runtime/mgc.go:203 +0x70

goroutine 7 [running]:
	goroutine running on other thread; stack unavailable
created by testing.(*T).Run in goroutine 1
	/home/gopher/build/go/src/testing/testing.go:1646 +0x348
2023-10-12 18:09 openbsd-riscv64-jsing go@657c885f runtime/pprof.TestGoroutineCounts (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1bbc42?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0x8ec78340 sp=0x8ec78318 pc=0x468cc
runtime.(*scavChunkData).free(0x0?, 0x1, 0x31c9c34d?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x8ec78360 sp=0x8ec78340 pc=0x33e20
runtime.(*scavengeIndex).free(0x346820, 0x353, 0x39, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x8ec78398 sp=0x8ec78360 pc=0x33a4c
...
	/home/gopher/build/go/src/runtime/asm_riscv64.s:96 +0x8 fp=0xd40ecb98 sp=0xd40ecb90 pc=0x77548
runtime.startTheWorld()
	/home/gopher/build/go/src/runtime/proc.go:1284 +0x2c fp=0xd40ecbc0 sp=0xd40ecb98 pc=0x4b7fc
runtime.startTheWorldGC()
	/home/gopher/build/go/src/runtime/proc.go:1317 +0x20 fp=0xd40ecbe0 sp=0xd40ecbc0 pc=0x4b910
runtime.GOMAXPROCS(0x1)
	/home/gopher/build/go/src/runtime/debug.go:33 +0x98 fp=0xd40ecbf8 sp=0xd40ecbe0 pc=0x162c8
runtime/pprof.TestGoroutineCounts(0xd4362ea0)
	/home/gopher/build/go/src/runtime/pprof/pprof_test.go:1384 +0x3c fp=0xd40ecf78 sp=0xd40ecbf8 pc=0x158694
testing.tRunner(0xd4362ea0, 0x1c7710)
2023-10-14 21:46 openbsd-riscv64-jsing go@cc47df01 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.25s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x74000000, 0x78000000)
            malloc_test.go:301: reserved [0x11c000000, 0x120000000)
            malloc_test.go:301: reserved [0x17c000000, 0x180000000)
            malloc_test.go:301: reserved [0xa4000000, 0xa8000000)
            malloc_test.go:301: reserved [0x7c000000, 0x80000000)
        runtime: inUse=2 npages=4
        fatal error: allocated pages below zero?

...
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x7003efd8 sp=0x7003efd8 pc=0x855b4
        created by runtime.gcenable in goroutine 1
        	/home/gopher/build/go/src/runtime/mgc.go:203 +0x70

        goroutine 18 [running]:
        	goroutine running on other thread; stack unavailable
        created by testing.(*T).Run in goroutine 1
        	/home/gopher/build/go/src/testing/testing.go:1646 +0x348

        (exit status exit status 2)
2023-10-14 22:30 openbsd-riscv64-jsing go@bc9dc8d4 net/http [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b57a?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0x3ee8c65538 sp=0x3ee8c65510 pc=0x52904
runtime.(*scavChunkData).free(0x0?, 0x4, 0x9?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x3ee8c65558 sp=0x3ee8c65538 pc=0x3c4e8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
	runtime/proc.go:3799 +0x68 fp=0x3ee8c65970 sp=0x3ee8c65940 pc=0x5cff0
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x3ee8c65b58 sp=0x3ee8c65970 pc=0x6da78
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x3ee8c65b60 sp=0x3ee8c65b58 pc=0x863f0

goroutine 5 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-17 15:06 openbsd-riscv64-jsing go@aa05674b runtime [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x20022fe93?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x34ed9b3228 sp=0x34ed9b3200 pc=0x5318c
runtime.(*scavChunkData).free(0xc550b79?, 0x3, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x34ed9b3248 sp=0x34ed9b3228 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x186, 0x10e, 0x3)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x34ed9b3280 sp=0x34ed9b3248 pc=0x3cdb4
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:5358 +0xac fp=0x34ed9b3628 sp=0x34ed9b35b8 pc=0x619c4
runtime.exitsyscall0(0x600001a0)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:4371 +0x180 fp=0x34ed9b3650 sp=0x34ed9b3628 pc=0x5f020
runtime.mcall()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:291 +0x40 fp=0x34ed9b3660 sp=0x34ed9b3650 pc=0x87790

goroutine 140 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-17 18:43 openbsd-riscv64-jsing go@860c2557 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b57a?, 0x1?})
	runtime/panic.go:1018 +0x44 fp=0x1084d2ba8 sp=0x1084d2b80 pc=0x52904
runtime.(*scavChunkData).free(0x0?, 0x4, 0x13?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x1084d2bc8 sp=0x1084d2ba8 pc=0x3c4e8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
	runtime/proc.go:3799 +0x68 fp=0x1084d2fe0 sp=0x1084d2fb0 pc=0x5cff0
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0x1084d31c8 sp=0x1084d2fe0 pc=0x6da78
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0x1084d31d0 sp=0x1084d31c8 pc=0x863f0

goroutine 180 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-17 20:32 openbsd-riscv64-jsing go@a30967f4 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.24s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x78000000, 0x7c000000)
            malloc_test.go:301: reserved [0x108000000, 0x10c000000)
            malloc_test.go:301: reserved [0x80000000, 0x84000000)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x412de8?, 0x0?})
...
        	/home/gopher/build/go/src/runtime/proc.go:3752 +0x124 fp=0x10c3ff470 sp=0x10c3ff438 pc=0x548cc
        runtime.mcall()
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:291 +0x40 fp=0x10c3ff480 sp=0x10c3ff470 pc=0x83578

        goroutine 17 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 6
        	/home/gopher/build/go/src/runtime/mgc.go:1227 +0x2c

        (exit status exit status 2)
2023-10-17 20:36 openbsd-riscv64-jsing go@ab2e3ce7 cmd/compile/internal/types2 [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b57a?, 0x6eb4c?})
	runtime/panic.go:1018 +0x44 fp=0xc7f23ad0 sp=0xc7f23aa8 pc=0x52904
runtime.(*scavChunkData).free(0x49befb3f00848050?, 0x3, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xc7f23af0 sp=0xc7f23ad0 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x10a6600, 0x155, 0x17b, 0x3)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xc7f23b28 sp=0xc7f23af0 pc=0x3c124
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x54438ef8 sp=0x54438d18 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x54438f48 sp=0x54438ef8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x54438fd8 sp=0x54438f48 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x54438fd8 sp=0x54438fd8 pc=0x884f4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-18 00:24 openbsd-riscv64-jsing go@416bc85f cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b57a?, 0x72190?})
	runtime/panic.go:1018 +0x44 fp=0x4ef2e0d0 sp=0x4ef2e0a8 pc=0x52904
runtime.(*scavChunkData).free(0xab60224300000000?, 0x1, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x4ef2e0f0 sp=0x4ef2e0d0 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x10a6600, 0x120, 0x50, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x4ef2e128 sp=0x4ef2e0f0 pc=0x3c124
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x48044ef8 sp=0x48044d18 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x48044f48 sp=0x48044ef8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x48044fd8 sp=0x48044f48 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x48044fd8 sp=0x48044fd8 pc=0x884f4
created by runtime.gcBgMarkStartWorkers in goroutine 62
	runtime/mgc.go:1227 +0x2c
2023-10-18 14:06 openbsd-riscv64-jsing go@045ce51b net/http [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b57a?, 0x6eb4c?})
	runtime/panic.go:1018 +0x44 fp=0xff594f00 sp=0xff594ed8 pc=0x52904
runtime.(*scavChunkData).free(0xfc42d61c006496d4?, 0x1, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xff594f20 sp=0xff594f00 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x10a6600, 0x151, 0x16e, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xff594f58 sp=0xff594f20 pc=0x3c124
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x5403d6f8 sp=0x5403d518 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x5403d748 sp=0x5403d6f8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x5403d7d8 sp=0x5403d748 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x5403d7d8 sp=0x5403d7d8 pc=0x884f4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-18 14:46 openbsd-riscv64-jsing go@ce25ad60 encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0x1c3c4?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0x9ec526a8 sp=0x9ec52680 pc=0x457bc
runtime.(*scavChunkData).free(0xde6ac?, 0x1, 0x40000?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x9ec526c8 sp=0x9ec526a8 pc=0x333e0
runtime.(*scavengeIndex).free(0x326c80, 0x3d0, 0xd8, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x9ec52700 sp=0x9ec526c8 pc=0x3301c
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1247 +0x1fc fp=0x1074d7e00 sp=0x1074d7d28 pc=0x12d52c
encoding/gob.(*Decoder).DecodeValue(0xf4148000, {0x17d4a0?, 0xf41aa018?, 0xf4066320?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0x1074d7e78 sp=0x1074d7e00 pc=0x12e438
encoding/gob.(*Decoder).Decode(0xf4148000, {0x17d4a0?, 0xf41aa018?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x148 fp=0x1074d7ec8 sp=0x1074d7e78 pc=0x12e270
encoding/gob.testEncodeDecode(0xf41a5ba0, {0x17d4a0, 0xf41aa000}, {0x17d4a0, 0xf41aa018})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0x1074d7f38 sp=0x1074d7ec8 pc=0x146820
encoding/gob.TestLargeSlice.func1(0xf41a5ba0)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0x1074d7f78 sp=0x1074d7f38 pc=0x15c964
testing.tRunner(0xf41a5ba0, 0x1cd260)
2023-10-18 14:46 openbsd-riscv64-jsing go@66287d55 net/http.TestOmitHTTP2Vet (log)
--- FAIL: TestOmitHTTP2Vet (21.39s)
    http_test.go:105: go vet failed: exit status 1, # net/http [net/http.test]
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x96b57a?, 0x10ac978?})
        	runtime/panic.go:1018 +0x44 fp=0x4a3e7568 sp=0x4a3e7540 pc=0x52904
        runtime.(*scavChunkData).free(0x100003adc82a6?, 0x4, 0x0?)
        	runtime/mgcscavenge.go:1341 +0xd8 fp=0x4a3e7588 sp=0x4a3e7568 pc=0x3c4e8
...
        runtime.gcMarkTermination()
        	runtime/mgc.go:1091 +0x508 fp=0x6003f6f8 sp=0x6003f518 pc=0x324b0
        runtime.gcMarkDone()
        	runtime/mgc.go:935 +0x25c fp=0x6003f748 sp=0x6003f6f8 pc=0x31ec4
        runtime.gcBgMarkWorker()
        	runtime/mgc.go:1435 +0x36c fp=0x6003f7d8 sp=0x6003f748 pc=0x330fc
        runtime.goexit({})
        	runtime/asm_riscv64.s:521 +0x4 fp=0x6003f7d8 sp=0x6003f7d8 pc=0x884f4
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:1227 +0x2c
2023-10-18 15:03 openbsd-riscv64-jsing go@144252d2 regexp.TestMatch (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x16ca75?, 0x2b05e8?})
	/home/gopher/build/go/src/runtime/panic.go:1018 +0x44 fp=0x6224e300 sp=0x6224e2d8 pc=0x44cf4
runtime.(*scavChunkData).free(0x2b05e0?, 0x4, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x6224e320 sp=0x6224e300 pc=0x329b8
runtime.(*scavengeIndex).free(0x2a9e80, 0x1d0, 0x91, 0x4)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x6224e358 sp=0x6224e320 pc=0x325f4
...
	/home/gopher/build/go/src/regexp/regexp.go:180 +0x84 fp=0x74155d40 sp=0x74155cc0 pc=0xf9b6c
regexp.Compile(...)
	/home/gopher/build/go/src/regexp/regexp.go:135
regexp.compileTest(0x741044e0, {0x16624c, 0x5}, {0x0, 0x0})
	/home/gopher/build/go/src/regexp/all_test.go:56 +0x74 fp=0x74155e60 sp=0x74155d40 pc=0xfea3c
regexp.matchTest(0x741044e0, 0x7412d540)
	/home/gopher/build/go/src/regexp/all_test.go:81 +0x50 fp=0x74155f08 sp=0x74155e60 pc=0xfedd8
regexp.TestMatch(0x741044e0)
	/home/gopher/build/go/src/regexp/all_test.go:98 +0x54 fp=0x74155f78 sp=0x74155f08 pc=0xfefdc
testing.tRunner(0x741044e0, 0x174f78)
2023-10-18 17:56 openbsd-riscv64-jsing go@91bb19a5 runtime [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x11c415658 sp=0x11c415630 pc=0x5318c
runtime.(*scavChunkData).free(0x0?, 0x3, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x11c415678 sp=0x11c415658 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x159, 0x166, 0x3)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x11c4156b0 sp=0x11c415678 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x54040ef8 sp=0x54040d18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x54040f48 sp=0x54040ef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x54040fd8 sp=0x54040f48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x54040fd8 sp=0x54040fd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-18 18:04 openbsd-riscv64-jsing go@3550a848 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.15s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x64000000, 0x68000000)
            malloc_test.go:301: reserved [0xac000000, 0xb0000000)
            malloc_test.go:301: reserved [0x58000000, 0x5c000000)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x412de8?, 0x60044580?})
...
        testing.tRunner(0x600a6820, 0x42e518)
        	/home/gopher/build/go/src/testing/testing.go:1593 +0x104 fp=0x60054fc0 sp=0x60054f78 pc=0x107eac
        testing.(*T).Run.gowrap1()
        	/home/gopher/build/go/src/testing/testing.go:1646 +0x30 fp=0x60054fd8 sp=0x60054fc0 pc=0x108b80
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x60054fd8 sp=0x60054fd8 pc=0x85594
        created by testing.(*T).Run in goroutine 1
        	/home/gopher/build/go/src/testing/testing.go:1646 +0x348

        (exit status exit status 2)
2023-10-18 18:04 openbsd-riscv64-jsing go@061d77cb runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.26s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x48000000, 0x4c000000)
            malloc_test.go:301: reserved [0xa0000000, 0xa4000000)
            malloc_test.go:301: reserved [0x17c000000, 0x180000000)
            malloc_test.go:301: reserved [0x6c000000, 0x70000000)
            malloc_test.go:301: reserved [0x184000000, 0x188000000)
        --- PASS: TestArenaCollision (0.06s)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?
...
        	/home/gopher/build/go/src/runtime/stack.go:1070 +0x2b0 fp=0x99708e38 sp=0x99708c98 pc=0x661d0
        runtime.morestack()
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:204 +0x58 fp=0x99708e40 sp=0x99708e38 pc=0x83490

        goroutine 17 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 6
        	/home/gopher/build/go/src/runtime/mgc.go:1227 +0x2c

        (exit status exit status 2)
2023-10-18 19:30 openbsd-riscv64-jsing go@b78aa6c2 go/types [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b57a?, 0x6eb2c?})
	runtime/panic.go:1016 +0x44 fp=0xd981c080 sp=0xd981c058 pc=0x528e4
runtime.(*scavChunkData).free(0xd134b3c000884d0?, 0x2, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xd981c0a0 sp=0xd981c080 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x1096600, 0x159, 0xd1, 0x2)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0xd981c0d8 sp=0xd981c0a0 pc=0x3c124
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x5403fef8 sp=0x5403fd18 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x5403ff48 sp=0x5403fef8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x5403ffd8 sp=0x5403ff48 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x5403ffd8 sp=0x5403ffd8 pc=0x884d4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-18 19:36 openbsd-riscv64-jsing go@5d0a277f net/http [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b57a?, 0x6eb2c?})
	runtime/panic.go:1016 +0x44 fp=0x39c5446230 sp=0x39c5446208 pc=0x528e4
runtime.(*scavChunkData).free(0x6832709008474b0?, 0x3, 0x43d08?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x39c5446250 sp=0x39c5446230 pc=0x3c4e8
runtime.(*scavengeIndex).free(0x1096600, 0x1ab, 0x166, 0x3)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x39c5446288 sp=0x39c5446250 pc=0x3c124
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x6843f6f8 sp=0x6843f518 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x6843f748 sp=0x6843f6f8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x6843f7d8 sp=0x6843f748 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x6843f7d8 sp=0x6843f7d8 pc=0x884d4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-18 19:37 openbsd-riscv64-jsing go@16606351 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x90bd68?, 0x0?})
	runtime/panic.go:1016 +0x44 fp=0x350740c218 sp=0x350740c1f0 pc=0x49904
runtime.(*scavChunkData).free(0x0?, 0x4, 0x0?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x350740c238 sp=0x350740c218 pc=0x36ec8
runtime.(*scavengeIndex).free(0x1016180, 0x1a1, 0x4f, 0x4)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x350740c270 sp=0x350740c238 pc=0x36b04
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x64043ef8 sp=0x64043d18 pc=0x2dc68
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x64043f48 sp=0x64043ef8 pc=0x2d67c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x64043fd8 sp=0x64043f48 pc=0x2e8b4
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x64043fd8 sp=0x64043fd8 pc=0x7c294
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-18 20:00 openbsd-riscv64-jsing go@1d400cdf encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1016 +0x44 fp=0xf5d659a8 sp=0xf5d65980 pc=0x4579c
runtime.(*scavChunkData).free(0x0?, 0x1, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0xf5d659c8 sp=0xf5d659a8 pc=0x333e0
runtime.(*scavengeIndex).free(0x326c80, 0x1c0, 0x9a, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0xf5d65a00 sp=0xf5d659c8 pc=0x3301c
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1247 +0x1fc fp=0x77457e00 sp=0x77457d28 pc=0x12d50c
encoding/gob.(*Decoder).DecodeValue(0x70148000, {0x17d4a0?, 0x70090030?, 0x76e10000?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0x77457e78 sp=0x77457e00 pc=0x12e418
encoding/gob.(*Decoder).Decode(0x70148000, {0x17d4a0?, 0x70090030?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x148 fp=0x77457ec8 sp=0x77457e78 pc=0x12e250
encoding/gob.testEncodeDecode(0x701a5ba0, {0x17d4a0, 0x70090018}, {0x17d4a0, 0x70090030})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0x77457f38 sp=0x77457ec8 pc=0x146800
encoding/gob.TestLargeSlice.func1(0x701a5ba0)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0x77457f78 sp=0x77457f38 pc=0x15c944
testing.tRunner(0x701a5ba0, 0x1cd260)
2023-10-19 12:02 openbsd-riscv64-jsing go@28f1bf61 cmd/go.TestGoListExport (log)
vcs-test.golang.org rerouted to http:https://127.0.0.1:14004
https://vcs-test.golang.org rerouted to https://127.0.0.1:21705
go test proxy running at GOPROXY=http:https://127.0.0.1:15239/mod
--- FAIL: TestGoListExport (19.34s)
    go_test.go:1227: running testgo [list -f {{.Export}} strings]
    go_test.go:1231: running testgo [list -export -f {{.Export}} strings]
    go_test.go:1231: standard error:
    go_test.go:1231: # runtime
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?
...
        runtime.gcMarkDone()
        	runtime/mgc.go:935 +0x25c fp=0x6c418f48 sp=0x6c418ef8 pc=0x31ec4
        runtime.gcBgMarkWorker()
        	runtime/mgc.go:1435 +0x36c fp=0x6c418fd8 sp=0x6c418f48 pc=0x330fc
        runtime.goexit({})
        	runtime/asm_riscv64.s:521 +0x4 fp=0x6c418fd8 sp=0x6c418fd8 pc=0x884d4
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:1227 +0x2c

    go_test.go:1231: go [list -export -f {{.Export}} strings] failed unexpectedly in /home/gopher/build/go/src/cmd/go: exit status 1
2023-10-19 12:23 openbsd-riscv64-jsing go@ab5bd159 runtime.TestFakeTime (log)
--- FAIL: TestFakeTime (13.58s)
    crash_test.go:152: running /home/gopher/build/go/bin/go build -o /home/gopher/build/tmp/go-build1293275857/testfaketime_-tags=faketime.exe -tags=faketime
    time_test.go:31: building testfaketime [-tags=faketime]: exit status 1
        # runtime
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x95b7ba?, 0x0?})
        	runtime/panic.go:1016 +0x44 fp=0x9b98e350 sp=0x9b98e328 pc=0x528e4
...
        runtime.gcMarkTermination()
        	runtime/mgc.go:1091 +0x508 fp=0x54042ef8 sp=0x54042d18 pc=0x324b0
        runtime.gcMarkDone()
        	runtime/mgc.go:935 +0x25c fp=0x54042f48 sp=0x54042ef8 pc=0x31ec4
        runtime.gcBgMarkWorker()
        	runtime/mgc.go:1435 +0x36c fp=0x54042fd8 sp=0x54042f48 pc=0x330fc
        runtime.goexit({})
        	runtime/asm_riscv64.s:521 +0x4 fp=0x54042fd8 sp=0x54042fd8 pc=0x884d4
        created by runtime.gcBgMarkStartWorkers in goroutine 1
        	runtime/mgc.go:12
(... long comment truncated ...)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-24 20:28 openbsd-riscv64-jsing go@b5f87b54 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.18s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x5c000000, 0x60000000)
            malloc_test.go:301: reserved [0x50000000, 0x54000000)
            malloc_test.go:301: reserved [0xec000000, 0xf0000000)
            malloc_test.go:301: reserved [0x74000000, 0x78000000)
            malloc_test.go:301: reserved [0x118000000, 0x11c000000)
        runtime: inUse=3 npages=4
        fatal error: allocated pages below zero?

...
        runtime.bgsweep(0x58064000)
        	/home/gopher/build/go/src/runtime/mgcsweep.go:303 +0x1b0 fp=0x58040fc8 sp=0x58040f88 pc=0x37ba8
        runtime.gcenable.gowrap1()
        	/home/gopher/build/go/src/runtime/mgc.go:203 +0x2c fp=0x58040fd8 sp=0x58040fc8 pc=0x2c504
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:521 +0x4 fp=0x58040fd8 sp=0x58040fd8 pc=0x8559c
        created by runtime.gcenable in goroutine 1
        	/home/gopher/build/go/src/runtime/mgc.go:203 +0x70

        (exit status exit status 2)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-23 09:04 openbsd-riscv64-jsing go@6ba6e72e encoding/json.TestUnmarshalMaxDepth (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x3aca9a?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1016 +0x44 fp=0xc0b77748 sp=0xc0b77720 pc=0x45ed4
runtime.(*scavChunkData).free(0x0?, 0x1, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0xc0b77768 sp=0xc0b77748 pc=0x33718
runtime.(*scavengeIndex).free(0x686540, 0x14c, 0x1be, 0x1)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0xc0b777a0 sp=0xc0b77768 pc=0x33354
...
	/home/gopher/build/go/src/runtime/proc.go:400 +0x108 fp=0x5006fa80 sp=0x5006fa68 pc=0x48be0
runtime.chanrecv(0x5005a000, 0x5006fb67, 0x80?)
	/home/gopher/build/go/src/runtime/chan.go:583 +0x420 fp=0x5006faf8 sp=0x5006fa80 pc=0x15630
runtime.chanrecv1(0x65ca00?, 0x31b560?)
	/home/gopher/build/go/src/runtime/chan.go:442 +0x14 fp=0x5006fb18 sp=0x5006faf8 pc=0x151dc
testing.(*T).Run(0x501ddba0, {0x500aa030?, 0x5?}, 0x501de090)
	/home/gopher/build/go/src/testing/testing.go:1647 +0x35c fp=0x5006fbd0 sp=0x5006fb18 pc=0xfe594
encoding/json.TestUnmarshalMaxDepth(0x501ddba0)
	/home/gopher/build/go/src/encoding/json/decode_test.go:2606 +0x638 fp=0x5006ff78 sp=0x5006fbd0 pc=0x2b0e70
testing.tRunner(0x501ddba0, 0x3c7880)
2023-10-23 09:05 openbsd-riscv64-jsing sys@1e638101 go@2d9e8ded runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96b606?, 0x72cd4?})
	runtime/panic.go:1016 +0x44 fp=0xf51c0b10 sp=0xf51c0ae8 pc=0x5346c
runtime.(*scavChunkData).free(0x72cf8?, 0x4, 0x181?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xf51c0b30 sp=0xf51c0b10 pc=0x3d068
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
runtime.(*pageAlloc).free(0x10a65a8, 0x5b2a8000, 0xfb17e0?)
	runtime/mpagealloc.go:955 +0x230 fp=0xf51c0c20 sp=0xf51c0b30 pc=0x48948
runtime.(*mheap).freeSpanLocked(...)
	runtime/mheap.go:1640
runtime.(*mheap).freeManual(0x10a65a0, 0x8aca58b8, 0x1)
	runtime/mheap.go:1588 +0x268 fp=0xf51c0c70 sp=0xf51c0c20 pc=0x44468
runtime.stackpoolfree(0x6d934?, 0x10?)
	runtime/stack.go:263 +0x170 fp=0xf51c0c98 sp=0xf51c0c70 pc=0x6c710
runtime.stackcacherelease(0xf51c0d50?, 0x2)
	runtime/stack.go:302 +0xac fp=0xf51c0cd8 sp=0xf51c0c98 pc=0x6ca3c
runtime.stackfree(...)
	runtime/stack.go:482
runtime.copystack(0x60024d00, 0x4000)
	runtime/stack.go:938 +0x8a4 fp=0xf51c0eb0 sp=0xf51c0cd8 pc=0x6ddec
runtime.newstack()
	runtime/stack.go:1112 +0x3e4 fp=0xf51c1098 sp=0xf51c0eb0 pc=0x6e714
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0xf51c10a0 sp=0xf51c1098 pc=0x86f58
2023-10-23 09:06 openbsd-riscv64-jsing go@bc2124da bootstrap/cmd/compile/internal/ssagen [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0xd9f3669438258bff?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x124a6f138 sp=0x124a6f110 pc=0x5318c
runtime.(*scavChunkData).free(0x4?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x124a6f158 sp=0x124a6f138 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x180, 0x61, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x124a6f190 sp=0x124a6f158 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x60046ef8 sp=0x60046d18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x60046f48 sp=0x60046ef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x60046fd8 sp=0x60046f48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x60046fd8 sp=0x60046fd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-10-23 19:41 openbsd-riscv64-jsing go@e46e8610 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b79a?, 0x45834a7500060640?})
	runtime/panic.go:1016 +0x44 fp=0x8dc0cae8 sp=0x8dc0cac0 pc=0x528ec
runtime.(*scavChunkData).free(0x0?, 0x4, 0x86528?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x8dc0cb08 sp=0x8dc0cae8 pc=0x3c4e8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1103 +0x520 fp=0x4c3dcef8 sp=0x4c3dcd18 pc=0x324c8
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x4c3dcf48 sp=0x4c3dcef8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x4c3dcfd8 sp=0x4c3dcf48 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x4c3dcfd8 sp=0x4c3dcfd8 pc=0x884dc
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-23 20:47 openbsd-riscv64-jsing go@f9c54f9c encoding/gob.TestLargeSlice (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c2f0a?, 0x640009c0?})
	/home/gopher/build/go/src/runtime/panic.go:1016 +0x44 fp=0x4efaada8 sp=0x4efaad80 pc=0x457a4
runtime.(*scavChunkData).free(0x327238?, 0x4, 0x2bf10?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1341 +0xd8 fp=0x4efaadc8 sp=0x4efaada8 pc=0x333e0
runtime.(*scavengeIndex).free(0x326c80, 0x19f, 0x6, 0x4)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1154 +0xa4 fp=0x4efaae00 sp=0x4efaadc8 pc=0x3301c
...
	/home/gopher/build/go/src/encoding/gob/decode.go:1247 +0x1fc fp=0xeee85e00 sp=0xeee85d28 pc=0x12d514
encoding/gob.(*Decoder).DecodeValue(0x64152000, {0x17d4a0?, 0x641c2270?, 0x64120a00?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:229 +0x1a0 fp=0xeee85e78 sp=0xeee85e00 pc=0x12e420
encoding/gob.(*Decoder).Decode(0x64152000, {0x17d4a0?, 0x641c2270?})
	/home/gopher/build/go/src/encoding/gob/decoder.go:204 +0x148 fp=0xeee85ec8 sp=0xeee85e78 pc=0x12e258
encoding/gob.testEncodeDecode(0x641bd380, {0x17d4a0, 0x641c2258}, {0x17d4a0, 0x641c2270})
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1559 +0x288 fp=0xeee85f38 sp=0xeee85ec8 pc=0x146808
encoding/gob.TestLargeSlice.func1(0x641bd380)
	/home/gopher/build/go/src/encoding/gob/codec_test.go:1579 +0xcc fp=0xeee85f78 sp=0xeee85f38 pc=0x15c94c
testing.tRunner(0x641bd380, 0x1cd260)
2023-10-23 22:24 openbsd-riscv64-jsing net@48a59773 go@25ad137c runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b79a?, 0x109c1f8?})
	runtime/panic.go:1016 +0x44 fp=0x12a45c2f8 sp=0x12a45c2d0 pc=0x528ec
runtime.(*scavChunkData).free(0x2e007800?, 0x4, 0x0?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x12a45c318 sp=0x12a45c2f8 pc=0x3c4e8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x48043ef8 sp=0x48043d18 pc=0x324b0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x48043f48 sp=0x48043ef8 pc=0x31ec4
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x48043fd8 sp=0x48043f48 pc=0x330fc
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x48043fd8 sp=0x48043fd8 pc=0x884dc
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-23 22:24 openbsd-riscv64-jsing net@48a59773 go@983d90e1 cmd/compile/internal/types2 [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x90bf88?, 0x1?})
	runtime/panic.go:1016 +0x44 fp=0x7ade1908 sp=0x7ade18e0 pc=0x4990c
runtime.(*scavChunkData).free(0x0?, 0x2, 0x2a6?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x7ade1928 sp=0x7ade1908 pc=0x36ec8
runtime.(*scavengeIndex).free(0x1016180, 0x182, 0x15b, 0x2)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x7ade1960 sp=0x7ade1928 pc=0x36b04
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x60042ef8 sp=0x60042d18 pc=0x2dc68
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x60042f48 sp=0x60042ef8 pc=0x2d67c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x60042fd8 sp=0x60042f48 pc=0x2e8b4
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x60042fd8 sp=0x60042fd8 pc=0x7c29c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-24 13:47 openbsd-riscv64-jsing go@6f87db50 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=6
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x300846?, 0x1?})
	runtime/panic.go:1016 +0x44 fp=0x3e4be237f8 sp=0x3e4be237d0 pc=0x4359c
runtime.(*scavChunkData).free(0x0?, 0x6, 0x2c6?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x3e4be23818 sp=0x3e4be237f8 pc=0x32c98
runtime.(*scavengeIndex).free(0x53d3c0, 0x14a, 0x100, 0x6)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x3e4be23850 sp=0x3e4be23818 pc=0x328d4
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x50035ef8 sp=0x50035d18 pc=0x29af0
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x50035f48 sp=0x50035ef8 pc=0x29504
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x50035fd8 sp=0x50035f48 pc=0x2a73c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x50035fd8 sp=0x50035fd8 pc=0x71c74
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-24 17:49 openbsd-riscv64-jsing go@25ad137c runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x90bf88?, 0x1?})
	runtime/panic.go:1016 +0x44 fp=0x38d896a6a8 sp=0x38d896a680 pc=0x4990c
runtime.(*scavChunkData).free(0x0?, 0x1, 0x2d3?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0x38d896a6c8 sp=0x38d896a6a8 pc=0x36ec8
runtime.(*scavengeIndex).free(0x1016180, 0x133, 0x9d, 0x1)
	runtime/mgcscavenge.go:1154 +0xa4 fp=0x38d896a700 sp=0x38d896a6c8 pc=0x36b04
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x4c4506f8 sp=0x4c450518 pc=0x2dc68
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x4c450748 sp=0x4c4506f8 pc=0x2d67c
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x4c4507d8 sp=0x4c450748 pc=0x2e8b4
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x4c4507d8 sp=0x4c4507d8 pc=0x7c29c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-24 18:12 openbsd-riscv64-jsing go@9162c4be runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x95b79a?, 0x1?})
	runtime/panic.go:1016 +0x44 fp=0xb90fdcc8 sp=0xb90fdca0 pc=0x528ec
runtime.(*scavChunkData).free(0x0?, 0x4, 0xf?)
	runtime/mgcscavenge.go:1341 +0xd8 fp=0xb90fdce8 sp=0xb90fdcc8 pc=0x3c4e8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1154
...
	runtime/proc.go:3799 +0x68 fp=0xb90fe100 sp=0xb90fe0d0 pc=0x5cfd8
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0xb90fe2e8 sp=0xb90fe100 pc=0x6da60
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0xb90fe2f0 sp=0xb90fe2e8 pc=0x863d8

goroutine 169 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c
2023-10-24 20:24 openbsd-riscv64-jsing go@2d9e8ded runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.26s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x180000000, 0x184000000)
            malloc_test.go:301: reserved [0x78000000, 0x7c000000)
            malloc_test.go:301: reserved [0x6c000000, 0x70000000)
            malloc_test.go:301: reserved [0x188000000, 0x18c000000)
            malloc_test.go:301: reserved [0x104000000, 0x108000000)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

...
        	/home/gopher/build/go/src/runtime/stack.go:1070 +0x2b0 fp=0xb1f6f398 sp=0xb1f6f1f8 pc=0x661d8
        runtime.morestack()
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:204 +0x58 fp=0xb1f6f3a0 sp=0xb1f6f398 pc=0x83498

        goroutine 19 [running]:
        	goroutine running on other thread; stack unavailable
        created by runtime.gcBgMarkStartWorkers in goroutine 18
        	/home/gopher/build/go/src/runtime/mgc.go:1227 +0x2c

        (exit status exit status 2)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-25 19:25 openbsd-riscv64-jsing go@57322b3c runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x12614b558 sp=0x12614b530 pc=0x5318c
runtime.(*scavChunkData).free(0x0?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x12614b578 sp=0x12614b558 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x1bc, 0x6f, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x12614b5b0 sp=0x12614b578 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x700416f8 sp=0x70041518 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x70041748 sp=0x700416f8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x700417d8 sp=0x70041748 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x700417d8 sp=0x700417d8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-25 18:07 openbsd-riscv64-jsing net@4c7a5b64 go@e7908ab9 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bf02?, 0x7?})
	runtime/panic.go:1016 +0x44 fp=0x3555880908 sp=0x35558808e0 pc=0x52f94
runtime.(*scavChunkData).free(0x5cab0?, 0x1, 0x44358?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x3555880928 sp=0x3555880908 pc=0x3cb38
runtime.(*scavengeIndex).free(0x10b6660, 0x1f9, 0x78, 0x1)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0x3555880960 sp=0x3555880928 pc=0x3c774
...
runtime.main()
	runtime/proc.go:269 +0x27c fp=0x12632bfd8 sp=0x12632bf68 pc=0x55814
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x12632bfd8 sp=0x12632bfd8 pc=0x88b84

goroutine 115 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 76
	runtime/mgc.go:1227 +0x2c
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install cmd: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-23 09:05 openbsd-riscv64-jsing sys@1e638101 go@55b8e16b cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x90c710?, 0x2f?})
	runtime/panic.go:1016 +0x44 fp=0xfb640178 sp=0xfb640150 pc=0x4a51c
runtime.(*scavChunkData).free(0xba0?, 0x1, 0x174?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0xfb640198 sp=0xfb640178 pc=0x37a80
runtime.(*scavengeIndex).free(0x10161e0, 0x1f2, 0x1eb, 0x1)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0xfb6401d0 sp=0xfb640198 pc=0x376bc
...
runtime.gcMarkTermination()
	runtime/mgc.go:1091 +0x508 fp=0x7cc126f8 sp=0x7cc12518 pc=0x2e820
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0x7cc12748 sp=0x7cc126f8 pc=0x2e234
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0x7cc127d8 sp=0x7cc12748 pc=0x2f46c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0x7cc127d8 sp=0x7cc127d8 pc=0x7ceac
created by runtime.gcBgMarkStartWorkers in goroutine 81
	runtime/mgc.go:1227 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-23 09:05 openbsd-riscv64-jsing sys@1e638101 go@9cdcb013 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x90c710?, 0x14?})
	runtime/panic.go:1016 +0x44 fp=0x1036c76a8 sp=0x1036c7680 pc=0x4a51c
runtime.(*scavChunkData).free(0x30?, 0x1, 0x4c3?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x1036c76c8 sp=0x1036c76a8 pc=0x37a80
runtime.(*scavengeIndex).free(0x10161e0, 0x311, 0x45, 0x1)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0x1036c7700 sp=0x1036c76c8 pc=0x376bc
...
runtime.gcMarkTermination()
	runtime/mgc.go:1117 +0x530 fp=0xc4044ef8 sp=0xc4044d18 pc=0x2e848
runtime.gcMarkDone()
	runtime/mgc.go:935 +0x25c fp=0xc4044f48 sp=0xc4044ef8 pc=0x2e234
runtime.gcBgMarkWorker()
	runtime/mgc.go:1435 +0x36c fp=0xc4044fd8 sp=0xc4044f48 pc=0x2f46c
runtime.goexit({})
	runtime/asm_riscv64.s:521 +0x4 fp=0xc4044fd8 sp=0xc4044fd8 pc=0x7ceac
created by runtime.gcBgMarkStartWorkers in goroutine 74
	runtime/mgc.go:1227 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-10-23 22:24 openbsd-riscv64-jsing net@48a59773 go@884c93a6 x/net/http2 [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96bf02?, 0x1?})
	runtime/panic.go:1016 +0x44 fp=0xc7aa1e28 sp=0xc7aa1e00 pc=0x52f3c
runtime.(*scavChunkData).free(0x0?, 0x4, 0xf?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0xc7aa1e48 sp=0xc7aa1e28 pc=0x3cb38
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
	runtime/proc.go:3799 +0x68 fp=0xc7aa2260 sp=0xc7aa2230 pc=0x5d628
runtime.newstack()
	runtime/stack.go:1070 +0x2b0 fp=0xc7aa2448 sp=0xc7aa2260 pc=0x6e0b0
runtime.morestack()
	runtime/asm_riscv64.s:204 +0x58 fp=0xc7aa2450 sp=0xc7aa2448 pc=0x86a28

goroutine 72 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1227 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-19 14:42 openbsd-riscv64-jsing go@52dbffea regexp (log)
runtime: inUse=0 npages=39
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x16eba8?, 0x293920?})
	/home/gopher/build/go/src/runtime/panic.go:1023 +0x44 fp=0x304892a640 sp=0x304892a618 pc=0x4693c
runtime.(*scavChunkData).free(0x304892a640?, 0x27, 0x293f20?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1338 +0xd8 fp=0x304892a660 sp=0x304892a640 pc=0x33a60
runtime.(*scavengeIndex).free(0x2abae0, 0x16c, 0x42, 0x27)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1151 +0xa4 fp=0x304892a698 sp=0x304892a660 pc=0x3369c
...

goroutine 19 gp=0x58082700 m=nil [GC worker (idle)]:
runtime.gopark(0x580377c0?, 0x58012a40?, 0x1a?, 0xa?, 0x0?)
	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0x58037748 sp=0x58037730 pc=0x49610
runtime.gcBgMarkWorker()
	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0x580377d8 sp=0x58037748 pc=0x2ae44
runtime.goexit({})
	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x580377d8 sp=0x580377d8 pc=0x7ba7c
created by runtime.gcBgMarkStartWorkers in goroutine 7
	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-18 23:29 openbsd-riscv64-jsing go@4106de90 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.18s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x64000000, 0x68000000)
            malloc_test.go:301: reserved [0x184000000, 0x188000000)
            malloc_test.go:301: reserved [0x7c000000, 0x80000000)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x44ad7c?, 0x0?})
...
        runtime.gopark(0x60044fc0?, 0x0?, 0x0?, 0x0?, 0x0?)
        	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0x60044f48 sp=0x60044f30 pc=0x52038
        runtime.gcBgMarkWorker()
        	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0x60044fd8 sp=0x60044f48 pc=0x31764
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x60044fd8 sp=0x60044fd8 pc=0x8e42c
        created by runtime.gcBgMarkStartWorkers in goroutine 6
        	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

        (exit status exit status 2)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-18 17:09 openbsd-riscv64-jsing net@2b416c3c go@4106de90 runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xf6f4a488 sp=0xf6f4a460 pc=0x5318c
runtime.(*scavChunkData).free(0x0?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xf6f4a4a8 sp=0xf6f4a488 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x139, 0x17d, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xf6f4a4e0 sp=0xf6f4a4a8 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x4c040ef8 sp=0x4c040d18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x4c040f48 sp=0x4c040ef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x4c040fd8 sp=0x4c040f48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x4c040fd8 sp=0x4c040fd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-19 21:36 openbsd-riscv64-jsing net@f12db26b go@adec22b9 runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x7b548?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x339787f468 sp=0x339787f440 pc=0x5318c
runtime.(*scavChunkData).free(0x6de94?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x339787f488 sp=0x339787f468 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x1bb, 0x11, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x339787f4c0 sp=0x339787f488 pc=0x3cdb4
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:3812 +0x68 fp=0x339787fa60 sp=0x339787fa28 pc=0x5dca0
runtime.newstack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/stack.go:1071 +0x2b0 fp=0x339787fc48 sp=0x339787fa60 pc=0x6e968
runtime.morestack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:204 +0x58 fp=0x339787fc50 sp=0x339787fc48 pc=0x87698

goroutine 146 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-18 21:28 openbsd-riscv64-jsing go@7058f09a encoding/gob (log)
runtime: inUse=0 npages=64
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c4fbd?, 0x7a9a0?})
	/home/gopher/build/go/src/runtime/panic.go:1023 +0x44 fp=0xa79b5fe0 sp=0xa79b5fb8 pc=0x473bc
runtime.(*scavChunkData).free(0x150?, 0x40, 0x66580?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1338 +0xd8 fp=0xa79b6000 sp=0xa79b5fe0 pc=0x34440
runtime.(*scavengeIndex).free(0x328900, 0x1fd, 0x1c0, 0x40)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1151 +0xa4 fp=0xa79b6038 sp=0xa79b6000 pc=0x3407c
...

goroutine 49 gp=0x7ea0a000 m=nil [GC worker (idle)]:
runtime.gopark(0x1cf9c8?, 0x7c092000?, 0x1a?, 0xa?, 0x0?)
	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0x7ea10748 sp=0x7ea10730 pc=0x4a090
runtime.gcBgMarkWorker()
	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0x7ea107d8 sp=0x7ea10748 pc=0x2b824
runtime.goexit({})
	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x7ea107d8 sp=0x7ea107d8 pc=0x7c954
created by runtime.gcBgMarkStartWorkers in goroutine 42
	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-20 18:38 openbsd-riscv64-jsing go@adec22b9 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.31s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x60000000, 0x64000000)
            malloc_test.go:301: reserved [0xc4000000, 0xc8000000)
            malloc_test.go:301: reserved [0x114000000, 0x118000000)
            malloc_test.go:301: reserved [0x68000000, 0x6c000000)
            malloc_test.go:301: reserved [0xcc000000, 0xd0000000)
        runtime: inUse=0 npages=1
        fatal error: allocated pages below zero?

...
        runtime.gcMarkDone()
        	/home/gopher/build/go/src/runtime/mgc.go:927 +0x2c4 fp=0x5c042748 sp=0x5c0426c0 pc=0x3056c
        runtime.gcBgMarkWorker()
        	/home/gopher/build/go/src/runtime/mgc.go:1446 +0x36c fp=0x5c0427d8 sp=0x5c042748 pc=0x319ec
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x5c0427d8 sp=0x5c0427d8 pc=0x8e42c
        created by runtime.gcBgMarkStartWorkers in goroutine 6
        	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

        (exit status exit status 2)
2023-12-21 00:15 openbsd-riscv64-jsing go@f6509cf5 runtime.TestArenaCollision (log)
--- FAIL: TestArenaCollision (0.20s)
    malloc_test.go:284: === RUN   TestArenaCollision
            malloc_test.go:301: reserved [0x50000000, 0x54000000)
            malloc_test.go:301: reserved [0xe8000000, 0xec000000)
            malloc_test.go:301: reserved [0x5c000000, 0x60000000)
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x44ad7c?, 0x71404?})
...
        runtime.gopark(0x4c049fc0?, 0x0?, 0x0?, 0x0?, 0x0?)
        	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0x4c049f48 sp=0x4c049f30 pc=0x52038
        runtime.gcBgMarkWorker()
        	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0x4c049fd8 sp=0x4c049f48 pc=0x31764
        runtime.goexit({})
        	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x4c049fd8 sp=0x4c049fd8 pc=0x8e42c
        created by runtime.gcBgMarkStartWorkers in goroutine 18
        	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

        (exit status exit status 2)

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-19 21:36 openbsd-riscv64-jsing net@f12db26b go@0b568040 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91fa8f?, 0x103d258?})
	runtime/panic.go:1023 +0x44 fp=0x3cb9498758 sp=0x3cb9498730 pc=0x4c30c
runtime.(*scavChunkData).free(0x103ec20?, 0x4, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x3cb9498778 sp=0x3cb9498758 pc=0x38d10
runtime.(*scavengeIndex).free(0x1038580, 0x13b, 0x59, 0x4)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0x3cb94987b0 sp=0x3cb9498778 pc=0x3894c
...
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x688e7f78 sp=0x688e7eb8 pc=0x61eabc
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x688e7fb0 sp=0x688e7f78 pc=0x803338
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x688e7fd8 sp=0x688e7fb0 pc=0x8036d0
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x688e7fd8 sp=0x688e7fd8 pc=0x8365c
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 176
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install -a cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-18 19:42 openbsd-riscv64-jsing go@08bec0db cmd/internal/obj/x86.TestVexEvexPCrelative (log)
--- FAIL: TestVexEvexPCrelative (25.68s)
    pcrelative_test.go:72: error exit status 1 output # runtime
        runtime: inUse=0 npages=4
        fatal error: allocated pages below zero?

        runtime stack:
        runtime.throw({0x96f427?, 0x0?})
        	runtime/panic.go:1023 +0x44 fp=0x354c8c5180 sp=0x354c8c5158 pc=0x5493c
        runtime.(*scavChunkData).free(0x13e8ae080?, 0x4, 0x0?)
        	runtime/mgcscavenge.go:1338 +0xd8 fp=0x354c8c51a0 sp=0x354c8c5180 pc=0x3e2d8
...
        cmd/compile/internal/ssagen.Compile(0x66166b40, 0x3)
        	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x13b23ff78 sp=0x13b23fea0 pc=0x6561b4
        cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
        	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x13b23ffb0 sp=0x13b23ff78 pc=0x855e00
        cmd/compile/internal/gc.compileFunctions.func3.1()
        	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x13b23ffd8 sp=0x13b23ffb0 pc=0x856198
        runtime.goexit({})
        	runtime/asm_riscv64.s:540 +0x4 fp=0x13b23ffd8 sp=0x13b23ffd8 pc=0x8e57c
        created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 159
        	cmd/compile/internal/gc/compile.go:163 +0x208

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-05 20:38 openbsd-riscv64-jsing net@c1b6eee3 go@5686b650 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96f0ed?, 0x1?})
	runtime/panic.go:1023 +0x44 fp=0x32fdb5a668 sp=0x32fdb5a640 pc=0x5495c
runtime.(*scavChunkData).free(0x0?, 0x4, 0xf?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x32fdb5a688 sp=0x32fdb5a668 pc=0x3e2d8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
cmd/compile/internal/ssagen.Compile(0x7dfd2d80, 0x2)
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x6caadf78 sp=0x6caadea0 pc=0x65631c
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x6caadfb0 sp=0x6caadf78 pc=0x8566d0
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x6caadfd8 sp=0x6caadfb0 pc=0x856a68
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x6caadfd8 sp=0x6caadfd8 pc=0x8e7d4
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 184
	cmd/compile/internal/gc/compile.go:163 +0x208

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-05 17:05 openbsd-riscv64-jsing go@16d3040a runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x7b548?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x3c25fc8c68 sp=0x3c25fc8c40 pc=0x5318c
runtime.(*scavChunkData).free(0x6de94?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x3c25fc8c88 sp=0x3c25fc8c68 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x1bb, 0xb4, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x3c25fc8cc0 sp=0x3c25fc8c88 pc=0x3cdb4
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:3812 +0x68 fp=0x3c25fc9260 sp=0x3c25fc9228 pc=0x5dca0
runtime.newstack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/stack.go:1071 +0x2b0 fp=0x3c25fc9448 sp=0x3c25fc9260 pc=0x6e968
runtime.morestack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:204 +0x58 fp=0x3c25fc9450 sp=0x3c25fc9448 pc=0x87698

goroutine 165 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c
2023-12-05 17:17 openbsd-riscv64-jsing go@285ef16b encoding/gob (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c4b58?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1023 +0x44 fp=0x12b7f51c8 sp=0x12b7f51a0 pc=0x46aec
runtime.(*scavChunkData).free(0x32af78?, 0x4, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1338 +0xd8 fp=0x12b7f51e8 sp=0x12b7f51c8 pc=0x33c00
runtime.(*scavengeIndex).free(0x328680, 0x332, 0xbc, 0x4)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1151 +0xa4 fp=0x12b7f5220 sp=0x12b7f51e8 pc=0x3383c
...

goroutine 56 gp=0xe424c000 m=nil [GC worker (idle)]:
runtime.gopark(0x36fd60?, 0x1?, 0x64?, 0x92?, 0x0?)
	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0xe41ecf48 sp=0xe41ecf30 pc=0x497c0
runtime.gcBgMarkWorker()
	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0xe41ecfd8 sp=0xe41ecf48 pc=0x2afe4
runtime.goexit({})
	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0xe41ecfd8 sp=0xe41ecfd8 pc=0x7bb7c
created by runtime.gcBgMarkStartWorkers in goroutine 54
	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c
2023-12-05 18:48 openbsd-riscv64-jsing go@3d2645f3 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x31276a?, 0x3?})
	runtime/panic.go:1023 +0x44 fp=0xdb404858 sp=0xdb404830 pc=0x44834
runtime.(*scavChunkData).free(0x4d?, 0x1, 0x268?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0xdb404878 sp=0xdb404858 pc=0x334b0
runtime.(*scavengeIndex).free(0x54ed00, 0x18a, 0xd, 0x1)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0xdb4048b0 sp=0xdb404878 pc=0x330ec
...
	runtime/mgc.go:1446 +0x36c fp=0x980377d8 sp=0x98037748 pc=0x2ab1c
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x980377d8 sp=0x980377d8 pc=0x75af4
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1234 +0x2c

goroutine 20 gp=0x980849c0 m=3 mp=0x98080008 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	runtime/mgc.go:1234 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-11-29 21:54 openbsd-riscv64-jsing net@f812076c go@3d2645f3 runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91f35e?, 0x1?})
	runtime/panic.go:1023 +0x44 fp=0xf41c2310 sp=0xf41c22e8 pc=0x4b97c
runtime.(*scavChunkData).free(0x23c8?, 0x1, 0x479?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0xf41c2330 sp=0xf41c2310 pc=0x38410
runtime.(*scavengeIndex).free(0x1038280, 0x126, 0x52, 0x1)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0xf41c2368 sp=0xf41c2330 pc=0x3804c
...
	cmd/compile/internal/ssagen/pgen.go:226 +0x23c fp=0x122d2df78 sp=0x122d2deb8 pc=0x61dd74
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x122d2dfb0 sp=0x122d2df78 pc=0x801bd0
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x122d2dfd8 sp=0x122d2dfb0 pc=0x801f68
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x122d2dfd8 sp=0x122d2dfd8 pc=0x82804
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 193
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install -a cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-11-29 21:54 openbsd-riscv64-jsing net@f812076c go@285ef16b runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96ecb6?, 0x1?})
	runtime/panic.go:1023 +0x44 fp=0x9e5bc530 sp=0x9e5bc508 pc=0x5452c
runtime.(*scavChunkData).free(0x0?, 0x4, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x9e5bc550 sp=0x9e5bc530 pc=0x3df58
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
cmd/compile/internal/ssagen.Compile(0x71ecb200, 0x2)
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0xbdc89f78 sp=0xbdc89ea0 pc=0x655a74
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0xbdc89fb0 sp=0xbdc89f78 pc=0x855e28
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0xbdc89fd8 sp=0xbdc89fb0 pc=0x8561c0
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0xbdc89fd8 sp=0xbdc89fd8 pc=0x8df84
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 136
	cmd/compile/internal/gc/compile.go:163 +0x208

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-13 16:20 openbsd-riscv64-jsing go@f2d243db runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91fa7f?, 0x103e888?})
	runtime/panic.go:1023 +0x44 fp=0x1725c9210 sp=0x1725c91e8 pc=0x4c30c
runtime.(*scavChunkData).free(0x103e880?, 0x4, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x1725c9230 sp=0x1725c9210 pc=0x38d10
runtime.(*scavengeIndex).free(0x10384e0, 0x1d8, 0x65, 0x4)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0x1725c9268 sp=0x1725c9230 pc=0x3894c
...
	cmd/compile/internal/ssagen/pgen.go:241 +0x464 fp=0xf3c8ff78 sp=0xf3c8feb8 pc=0x61ed1c
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0xf3c8ffb0 sp=0xf3c8ff78 pc=0x802ee8
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0xf3c8ffd8 sp=0xf3c8ffb0 pc=0x803280
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0xf3c8ffd8 sp=0xf3c8ffd8 pc=0x835ec
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 108
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install -a cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-01 17:42 openbsd-riscv64-jsing sys@5ff87d7b go@450f5d90 bootstrap/cmd/compile/internal/types2 [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0xcfbbf7d049e758a2?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xe9d1e448 sp=0xe9d1e420 pc=0x5318c
runtime.(*scavChunkData).free(0x1?, 0x4, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xe9d1e468 sp=0xe9d1e448 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x11e, 0x1d7, 0x4)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xe9d1e4a0 sp=0xe9d1e468 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x444486f8 sp=0x44448518 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x44448748 sp=0x444486f8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x444487d8 sp=0x44448748 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x444487d8 sp=0x444487d8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-08 16:07 openbsd-riscv64-jsing net@577e44a5 go@e70d3433 runtime [build] (log)
runtime: inUse=0 npages=4
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x7c0009c0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x9d5a4268 sp=0x9d5a4240 pc=0x5318c
runtime.(*scavChunkData).free(0x74838?, 0x4, 0x9d5a42d0?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x9d5a4288 sp=0x9d5a4268 pc=0x3d288
runtime.(*scavengeIndex).free(...)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1127 +0x538 fp=0x7c03eef8 sp=0x7c03ed18 pc=0x32670
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x7c03ef48 sp=0x7c03eef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x7c03efd8 sp=0x7c03ef48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x7c03efd8 sp=0x7c03efd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-08 16:07 openbsd-riscv64-jsing net@577e44a5 go@100651b6 runtime [build] (log)
runtime: inUse=0 npages=3
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96f2b5?, 0x20001fc00000000?})
	runtime/panic.go:1023 +0x44 fp=0x69bfc230 sp=0x69bfc208 pc=0x5493c
runtime.(*scavChunkData).free(0x1400e4b00?, 0x3, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x69bfc250 sp=0x69bfc230 pc=0x3e2d8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
	cmd/compile/internal/ssagen/pgen.go:241 +0x67c fp=0x58665f78 sp=0x58665ea0 pc=0x656624
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x58665fb0 sp=0x58665f78 pc=0x8566d8
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x58665fd8 sp=0x58665fb0 pc=0x856a70
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x58665fd8 sp=0x58665fd8 pc=0x8e50c
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 174
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install cmd: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-08 16:07 openbsd-riscv64-jsing net@577e44a5 go@59275e26 cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96f2b5?, 0x49630?})
	runtime/panic.go:1023 +0x44 fp=0x598e7718 sp=0x598e76f0 pc=0x5495c
runtime.(*scavChunkData).free(...)
	runtime/mgcscavenge.go:1338
runtime.(*scavengeIndex).free(0x1313fe280?, 0x188?, 0x7682c?, 0x1)
	runtime/mgcscavenge.go:1151 +0x1b4 fp=0x598e7740 sp=0x598e7718 pc=0x3dfcc
...
goroutine 80 gp=0xdfafc1c0 m=nil [GC worker (idle)]:
runtime.gopark(0xdc3987c0?, 0x3?, 0xc0?, 0xfe?, 0x0?)
	runtime/proc.go:402 +0x108 fp=0xdc398748 sp=0xdc398730 pc=0x57628
runtime.gcBgMarkWorker()
	runtime/mgc.go:1310 +0xe4 fp=0xdc3987d8 sp=0xdc398748 pc=0x34ddc
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0xdc3987d8 sp=0xdc3987d8 pc=0x8e52c
created by runtime.gcBgMarkStartWorkers in goroutine 60
	runtime/mgc.go:1234 +0x2c
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install cmd: exit status 1
2023-12-08 16:07 openbsd-riscv64-jsing net@577e44a5 go@20a03fc7 runtime [build] (log)
runtime: inUse=0 npages=5
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x91f97d?, 0x0?})
	runtime/panic.go:1023 +0x44 fp=0x30a817eee8 sp=0x30a817eec0 pc=0x4c30c
runtime.(*scavChunkData).free(0x0?, 0x5, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x30a817ef08 sp=0x30a817eee8 pc=0x38d10
runtime.(*scavengeIndex).free(0x1038480, 0x1e3, 0x153, 0x5)
	runtime/mgcscavenge.go:1151 +0xa4 fp=0x30a817ef40 sp=0x30a817ef08 pc=0x3894c
...
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x5d86ff78 sp=0x5d86feb8 pc=0x61e8fc
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x5d86ffb0 sp=0x5d86ff78 pc=0x802c78
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x5d86ffd8 sp=0x5d86ffb0 pc=0x803010
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x5d86ffd8 sp=0x5d86ffd8 pc=0x835ec
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 122
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install -a cmd/asm cmd/cgo cmd/compile cmd/link: exit status 1
2023-12-19 21:36 openbsd-riscv64-jsing net@f12db26b go@1dddd83c runtime [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96f3e7?, 0x20001ff00000000?})
	runtime/panic.go:1023 +0x44 fp=0x11b43f920 sp=0x11b43f8f8 pc=0x5493c
runtime.(*scavChunkData).free(0x131759200?, 0x2, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0x11b43f940 sp=0x11b43f920 pc=0x3e2d8
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
	cmd/compile/internal/ssagen/pgen.go:241 +0x67c fp=0x112c35f78 sp=0x112c35ea0 pc=0x6567e4
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x112c35fb0 sp=0x112c35f78 pc=0x855de8
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x112c35fd8 sp=0x112c35fb0 pc=0x856180
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x112c35fd8 sp=0x112c35fd8 pc=0x8e57c
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 112
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install std: exit status 1
2023-12-19 21:36 openbsd-riscv64-jsing net@f12db26b go@36a2463e runtime [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96f3e7?, 0x49790?})
	runtime/panic.go:1023 +0x44 fp=0x33b2d8fcf0 sp=0x33b2d8fcc8 pc=0x5493c
runtime.(*scavChunkData).free(...)
	runtime/mgcscavenge.go:1338
runtime.(*scavengeIndex).free(0x914ab000?, 0x225f0?, 0x0?, 0x1)
	runtime/mgcscavenge.go:1151 +0x1b4 fp=0x33b2d8fd18 sp=0x33b2d8fcf0 pc=0x3dfcc
...
cmd/compile/internal/ssagen.Compile(0x65f5e480, 0x1)
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x446dbf78 sp=0x446dbea0 pc=0x6561ac
cmd/compile/internal/gc.compileFunctions.func5.1(0x8e57c?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x446dbfb0 sp=0x446dbf78 pc=0x855de8
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x446dbfd8 sp=0x446dbfb0 pc=0x856180
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x446dbfd8 sp=0x446dbfd8 pc=0x8e57c
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 140
	cmd/compile/internal/gc/compile.go:163 +0x208

watchflakes

@gopherbot
Copy link
Contributor

Change https://go.dev/cl/553135 mentions this issue: runtime: correct scavengeIndex.sysGrow min index handling

@4a6f656c
Copy link
Contributor Author

@mknyszek many thanks for the pointers (especially re debuglog!) - I managed to find some time to investigate further and finally tracked the issue down to a bug that was introduced in 91f8630. In summary, the min index value is incorrectly updated, which results in an in-use part of the chunk backing store being remapped and zeroed. Thankfully building the runtime test and then running TestArenaCollision in a loop was sufficient to reproduce the problem.

The bug effectively boils down to an incorrect haveMin == 0 test when updating the minimum index - this is triggered when the base addresses for page allocations are low, then higher and then lower again:

[0.000000000 P -1] scavengeIndex.sysGrow base 2080374784 limit 2084569088
[0.000000000 P -1] scavengeIndex.sysGrow have base 5681364992 size 0 min 0 max 0 need base 5681364992 size 4096 min 0 max 512
--
[0.025940577 P 0] scavengeIndex.sysGrow base 2483027968 limit 2487222272
[0.025943577 P 0] scavengeIndex.sysGrow have base 5681364992 size 4096 min 0 max 512 need base 5681369088 size 4096 min 512 max 1024
--
[0.038413604 P 0] scavengeIndex.sysGrow base 1476395008 limit 1480589312
[0.038416354 P 0] scavengeIndex.sysGrow have base 5681369088 size 4096 min 512 max 1024 need base 5681364992 size 4096 min 0 max 512

During the second scavengeIndex.sysGrow min is incorrectly changed from 0 to 512, which then results in the third call believing that the [0, 512) range is not yet allocated. It then sysMaps that region zeroing all of the existing chunk data.

I'm still somewhat perplexed by the fact that this only ever seems to be hit on openbsd/riscv64 - it would make sense if it was all 64 bit OpenBSD architectures, since they randomise memory allocations, which could lead to this allocation pattern.

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-01 17:42 openbsd-riscv64-jsing sys@5ff87d7b go@34416d7f bootstrap/cmd/link/internal/ld [build] (log)
runtime: inUse=0 npages=2
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x0?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0x517634e0 sp=0x517634b8 pc=0x5318c
runtime.(*scavChunkData).free(0x1e144?, 0x2, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0x51763500 sp=0x517634e0 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x1ea, 0x190, 0x2)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0x51763538 sp=0x51763500 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1127 +0x538 fp=0x7803f6f8 sp=0x7803f518 pc=0x32670
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x7803f748 sp=0x7803f6f8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x7803f7d8 sp=0x7803f748 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x7803f7d8 sp=0x7803f7d8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-01 17:42 openbsd-riscv64-jsing sys@5ff87d7b go@af5d544b runtime [build] (log)
runtime: inUse=0 npages=6
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x96ecb6?, 0x20001ff00000000?})
	runtime/panic.go:1023 +0x44 fp=0xcf26b6e8 sp=0xcf26b6c0 pc=0x5452c
runtime.(*scavChunkData).free(0x13ebb1440?, 0x6, 0x0?)
	runtime/mgcscavenge.go:1338 +0xd8 fp=0xcf26b708 sp=0xcf26b6e8 pc=0x3df58
runtime.(*scavengeIndex).free(...)
	runtime/mgcscavenge.go:1151
...
	cmd/compile/internal/ssagen/pgen.go:216 +0x44 fp=0x78475f78 sp=0x78475ea0 pc=0x655a74
cmd/compile/internal/gc.compileFunctions.func5.1(0x0?)
	cmd/compile/internal/gc/compile.go:182 +0x48 fp=0x78475fb0 sp=0x78475f78 pc=0x855e28
cmd/compile/internal/gc.compileFunctions.func3.1()
	cmd/compile/internal/gc/compile.go:164 +0x40 fp=0x78475fd8 sp=0x78475fb0 pc=0x8561c0
runtime.goexit({})
	runtime/asm_riscv64.s:540 +0x4 fp=0x78475fd8 sp=0x78475fd8 pc=0x8df84
created by cmd/compile/internal/gc.compileFunctions.func3 in goroutine 184
	cmd/compile/internal/gc/compile.go:163 +0x208
go tool dist: FAILED: /home/gopher/build/go/pkg/tool/openbsd_riscv64/go_bootstrap install std: exit status 1

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-01 17:42 openbsd-riscv64-jsing sys@5ff87d7b go@285ef16b bootstrap/cmd/compile/internal/ssa [build] (log)
runtime: inUse=0 npages=1
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x8a2ad3892f94fcc2?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xea55f018 sp=0xea55eff0 pc=0x5318c
runtime.(*scavChunkData).free(0x1?, 0x1, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xea55f038 sp=0xea55f018 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x146, 0x1e6, 0x1)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xea55f070 sp=0xea55f038 pc=0x3cdb4
...
runtime.gcMarkTermination()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1101 +0x510 fp=0x50045ef8 sp=0x50045d18 pc=0x32648
runtime.gcMarkDone()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:941 +0x25c fp=0x50045f48 sp=0x50045ef8 pc=0x32004
runtime.gcBgMarkWorker()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1445 +0x378 fp=0x50045fd8 sp=0x50045f48 pc=0x33388
runtime.goexit()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:521 +0x4 fp=0x50045fd8 sp=0x50045fd8 pc=0x8980c
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-27 15:34 openbsd-riscv64-jsing go@988b718f encoding/gob (log)
runtime: inUse=0 npages=192
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x1c4fbd?, 0x0?})
	/home/gopher/build/go/src/runtime/panic.go:1023 +0x44 fp=0x13e46adc0 sp=0x13e46ad98 pc=0x473bc
runtime.(*scavChunkData).free(0x0?, 0xc0, 0x0?)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1338 +0xd8 fp=0x13e46ade0 sp=0x13e46adc0 pc=0x34440
runtime.(*scavengeIndex).free(0x328900, 0x22b, 0x140, 0xc0)
	/home/gopher/build/go/src/runtime/mgcscavenge.go:1151 +0xa4 fp=0x13e46ae18 sp=0x13e46ade0 pc=0x3407c
...

goroutine 7 gp=0x80001a40 m=nil [GC worker (idle)]:
runtime.gopark(0x8003d7c0?, 0x0?, 0x0?, 0x0?, 0x0?)
	/home/gopher/build/go/src/runtime/proc.go:402 +0x108 fp=0x8003d748 sp=0x8003d730 pc=0x4a090
runtime.gcBgMarkWorker()
	/home/gopher/build/go/src/runtime/mgc.go:1310 +0xe4 fp=0x8003d7d8 sp=0x8003d748 pc=0x2b824
runtime.goexit({})
	/home/gopher/build/go/src/runtime/asm_riscv64.s:540 +0x4 fp=0x8003d7d8 sp=0x8003d7d8 pc=0x7c954
created by runtime.gcBgMarkStartWorkers in goroutine 43
	/home/gopher/build/go/src/runtime/mgc.go:1234 +0x2c

watchflakes

@gopherbot
Copy link
Contributor

Found new dashboard test flakes for:

#!watchflakes
post <- log ~ `fatal error: allocated pages below zero` && goos == "openbsd" && goarch == "riscv64"
2023-12-01 17:42 openbsd-riscv64-jsing sys@5ff87d7b go@6d7b3c8c bootstrap/cmd/link/internal/ld [build] (log)
runtime: inUse=0 npages=5
fatal error: allocated pages below zero?

runtime stack:
runtime.throw({0x9169de?, 0x7b548?})
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/panic.go:837 +0x44 fp=0xfa967e18 sp=0xfa967df0 pc=0x5318c
runtime.(*scavChunkData).free(0x6de94?, 0x5, 0x44b20?)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1381 +0xd8 fp=0xfa967e38 sp=0xfa967e18 pc=0x3d288
runtime.(*scavengeIndex).free(0x10a64c0, 0x12d, 0x92, 0x5)
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgcscavenge.go:1159 +0xa4 fp=0xfa967e70 sp=0xfa967e38 pc=0x3cdb4
...
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/proc.go:3812 +0x68 fp=0xfa968410 sp=0xfa9683d8 pc=0x5dca0
runtime.newstack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/stack.go:1071 +0x2b0 fp=0xfa9685f8 sp=0xfa968410 pc=0x6e968
runtime.morestack()
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/asm_riscv64.s:204 +0x58 fp=0xfa968600 sp=0xfa9685f8 pc=0x87698

goroutine 69 [running]:
	goroutine running on other thread; stack unavailable
created by runtime.gcBgMarkStartWorkers in goroutine 1
	/home/joel/src/go-openbsd-riscv64-bootstrap/src/runtime/mgc.go:1237 +0x2c

watchflakes

ezz-no pushed a commit to ezz-no/go-ezzno that referenced this issue Feb 18, 2024
The backing store for the scavengeIndex chunks slice is allocated on demand
as page allocation occurs. When pageAlloc.grow is called, a range is
allocated from a reserved region, before scavengeIndex.grow is called
to ensure that the chunks needed to manage this new range have a valid
backing store. The valid region for chunks is recorded as the index min
and index max. Any changes need to take the existing valid range into
consideration and ensure that a contiguous valid range is maintained.

However, a bug in the min index handling can currently lead to an existing
part of the chunk slice backing store being zeroed via remapping. Initially,
there is no backing store allocated and both min and max are zero. As soon
as an allocation occurs max will be non-zero, however it is still valid for
min to be zero depending on the base addresses of the page allocations. A
sequence like the following will trigger the bug:

1. A page allocation occurs requiring chunks [0, 512) (after rounding) - a
   sysMap occurs for the backing store, min is set to 0 and max is set
   to 512.

2. A page allocation occurs requiring chunks [512, 1024) - another sysMap
   occurs for this part of the backing store, max is set to 1024, however
   min is incorrectly set to 512, since haveMin == 0 (validly).

3. Another page allocation occurs requiring chunks [0, 512) - since min is
   currently 512 a sysMap occurs for the already mapped and inuse part
   of the backing store from [0, 512), zeroing the chunk data.

Correct this by only updating min when either haveMax == 0 (the
uninitialised case) or when needMin < haveMin (the case where the new
backing store range is actually below the current allocation). Remove
the unnecessary haveMax == 0 check for updating max, as the existing
needMax > haveMax case already covers this.

Fixes golang#63385

Change-Id: I9deed74c4ffa187c98286fe7110e5d735e81f35f
Reviewed-on: https://go-review.googlesource.com/c/go/+/553135
Reviewed-by: Michael Knyszek <[email protected]>
TryBot-Result: Gopher Robot <[email protected]>
Reviewed-by: Michael Pratt <[email protected]>
Run-TryBot: Joel Sing <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compiler/runtime Issues related to the Go compiler and/or runtime.
Projects
Archived in project
Development

No branches or pull requests

4 participants