golang/go

runtime with `-race`: fatal error: checkptr: converted pointer straddles multiple allocations

Closed this issue · 5 comments

What version of Go are you using (go version)?

go version go1.19 

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
```
FROM golang:1.19-alpine as builder
RUN apk add git g++ fuse
RUN mkdir -p /go/src/github.com/chrislusf/
RUN git clone https://github.com/seaweedfs/seaweedfs /go/src/github.com/seaweedfs/seaweedfs
ARG BRANCH=${BRANCH:-master}
ARG TAGS
RUN cd /go/src/github.com/seaweedfs/seaweedfs && git checkout $BRANCH
RUN cd /go/src/github.com/seaweedfs/seaweedfs/weed \
  && export LDFLAGS="-X github.com/seaweedfs/seaweedfs/weed/util.COMMIT=$(git rev-parse --short HEAD)" \
  && go env && CGO_ENABLED=1 go install -race -tags "$TAGS" -ldflags "-extldflags -static ${LDFLAGS}"
```
or 
```
GO111MODULE="on"
GOARCH="amd64"
GOBIN=""
GOCACHE="/Users/tochka/Library/Caches/go-build"
GOENV="/Users/tochka/Library/Application Support/go/env"
GOEXE=""
GOEXPERIMENT=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="darwin"
GOINSECURE=""
GOMODCACHE="/Users/tochka/go/pkg/mod"
GONOPROXY=""
GONOSUMDB=""
GOOS="darwin"
GOPATH="/Users/tochka/go"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/darwin_amd64"
GOVCS=""
GOVERSION="go1.19"
GCCGO="gccgo"
GOAMD64="v1"
AR="ar"
CC="clang"
CXX="clang++"
CGO_ENABLED="1"
GOMOD="/Users/tochka/GolandProjects/seaweedfs/go.mod"
GOWORK=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -arch x86_64 -m64 -pthread -fno-caret-diagnostics -Qunused-arguments -fmessage-length=0 -fdebug-prefix-map=/var/folders/zv/tqq_jjhx3sb04kjw8565qmf00000gn/T/go-build761382070=/tmp/go-build -gno-record-gcc-switches -fno-common"
```

What did you do?

  1. git clone https://github.com/seaweedfs/seaweedfs.git
  2. cd seaweedfs/weed
  3. go run -race . master -raftHashicorp

What did you expect to see?

go run . master -raftHashicorp

I0826 14:42:28.751253 file_util.go:23 Folder /var/folders/zv/tqq_jjhx3sb04kjw8565qmf00000gn/T/ Permission: -rwx------
I0826 14:42:28.752325 master.go:260 current: 192.168.1.85:9333 peers:
I0826 14:42:28.752544 master_server.go:127 Volume Size Limit is 30000 MB
I0826 14:42:28.753292 master.go:148 Start Seaweed Master 30GB 3.23  at 192.168.1.85:9333
I0826 14:42:29.035895 raft_hashicorp.go:158 Bootstrapping idx: 0 sleep: 0s new cluster: {Servers:[{Suffrage:Voter ID:192.168.1.85:9333 Address:192.168.1.85:19333}]}

What did you see instead?

go run -race . master -raftHashicorp
I0826 14:40:24.446130 file_util.go:23 Folder /var/folders/zv/tqq_jjhx3sb04kjw8565qmf00000gn/T/ Permission: -rwx------
I0826 14:40:24.447025 master.go:260 current: 192.168.1.85:9333 peers:
I0826 14:40:24.447353 master_server.go:127 Volume Size Limit is 30000 MB
I0826 14:40:24.448094 master.go:148 Start Seaweed Master 30GB 3.23  at 192.168.1.85:9333
fatal error: checkptr: converted pointer straddles multiple allocations

goroutine 1 [running]:
runtime.throw({0x6f733f2?, 0x62ba701?})
        /usr/local/go/src/runtime/panic.go:1047 +0x5d fp=0xc0009d4f88 sp=0xc0009d4f58 pc=0x403b69d
runtime.checkptrAlignment(0x4074199?, 0x404d625?, 0x94841a4?)
        /usr/local/go/src/runtime/checkptr.go:26 +0x6c fp=0xc0009d4fa8 sp=0xc0009d4f88 pc=0x400878c
github.com/boltdb/bolt.(*Bucket).write(0xc0009d5140)
        /Users/tochka/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:626 +0x211 fp=0xc0009d5038 sp=0xc0009d4fa8 pc=0x62be751
github.com/boltdb/bolt.(*Bucket).CreateBucket(0xc0001f0398, {0x94841a4, 0x4, 0x4})
        /Users/tochka/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:188 +0x3e9 fp=0xc0009d5228 sp=0xc0009d5038 pc=0x62ba769
github.com/boltdb/bolt.(*Bucket).CreateBucketIfNotExists(0x0?, {0x94841a4, 0x4, 0x4})
        /Users/tochka/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:206 +0x4f fp=0xc0009d5278 sp=0xc0009d5228 pc=0x62baa2f
github.com/boltdb/bolt.(*Tx).CreateBucketIfNotExists(...)
        /Users/tochka/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/tx.go:115
github.com/hashicorp/raft-boltdb.(*BoltStore).initialize(0xc0000128b8)
        /Users/tochka/go/pkg/mod/github.com/hashicorp/raft-boltdb@v0.0.0-20220329195025-15018e9b97e0/bolt_store.go:100 +0xeb fp=0xc0009d5320 sp=0xc0009d5278 pc=0x62dc7cb
github.com/hashicorp/raft-boltdb.New({{0xc00036ee00, 0x3f}, 0x0, 0x0})
        /Users/tochka/go/pkg/mod/github.com/hashicorp/raft-boltdb@v0.0.0-20220329195025-15018e9b97e0/bolt_store.go:83 +0x19c fp=0xc0009d53a8 sp=0xc0009d5320 pc=0x62dc61c
github.com/hashicorp/raft-boltdb.NewBoltStore(...)
        /Users/tochka/go/pkg/mod/github.com/hashicorp/raft-boltdb@v0.0.0-20220329195025-15018e9b97e0/bolt_store.go:62
github.com/seaweedfs/seaweedfs/weed/server.NewHashicorpRaftServer(0xc0009d5bf0)
        /Users/tochka/GolandProjects/seaweedfs/weed/server/raft_hashicorp.go:131 +0x8b8 fp=0xc0009d57f8 sp=0xc0009d53a8 pc=0x6385f98
github.com/seaweedfs/seaweedfs/weed/command.startMaster({0xc000358938, 0xc000358968, 0xc000295bd0, 0xc000295bf0, 0xc000295c00, 0xc000295c20, 0xc000358dc8, 0xc000358e0f, 0xc000295c30, 0xc000358e28, ...}, ...)
        /Users/tochka/GolandProjects/seaweedfs/weed/command/master.go:170 +0x999 fp=0xc0009d5c60 sp=0xc0009d57f8 pc=0x6885339
github.com/seaweedfs/seaweedfs/weed/command.runMaster(0x953ffd8?, {0xc00011c1a0?, 0x1?, 0x1?})
        /Users/tochka/GolandProjects/seaweedfs/weed/command/master.go:122 +0x4b0 fp=0xc0009d5e40 sp=0xc0009d5c60 pc=0x68848f0
main.main()
        /Users/tochka/GolandProjects/seaweedfs/weed/weed.go:81 +0x944 fp=0xc0009d5f80 sp=0xc0009d5e40 pc=0x68a6a84
runtime.main()
        /usr/local/go/src/runtime/proc.go:250 +0x212 fp=0xc0009d5fe0 sp=0xc0009d5f80 pc=0x403deb2
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0009d5fe8 sp=0xc0009d5fe0 pc=0x4072a01

goroutine 2 [force gc (idle)]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000088fb0 sp=0xc000088f90 pc=0x403e276
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.forcegchelper()
        /usr/local/go/src/runtime/proc.go:302 +0xad fp=0xc000088fe0 sp=0xc000088fb0 pc=0x403e10d
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000088fe8 sp=0xc000088fe0 pc=0x4072a01
created by runtime.init.6
        /usr/local/go/src/runtime/proc.go:290 +0x25

goroutine 3 [GC sweep wait]:
runtime.gopark(0x1?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000089790 sp=0xc000089770 pc=0x403e276
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.bgsweep(0x0?)
        /usr/local/go/src/runtime/mgcsweep.go:297 +0xd7 fp=0xc0000897c8 sp=0xc000089790 pc=0x4028b77
runtime.gcenable.func1()
        /usr/local/go/src/runtime/mgc.go:178 +0x26 fp=0xc0000897e0 sp=0xc0000897c8 pc=0x401d7e6
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000897e8 sp=0xc0000897e0 pc=0x4072a01
created by runtime.gcenable
        /usr/local/go/src/runtime/mgc.go:178 +0x6b

goroutine 4 [GC scavenge wait]:
runtime.gopark(0xc000060070?, 0x82de080?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000089f70 sp=0xc000089f50 pc=0x403e276
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.(*scavengerState).park(0x9562fe0)
        /usr/local/go/src/runtime/mgcscavenge.go:389 +0x53 fp=0xc000089fa0 sp=0xc000089f70 pc=0x4026bf3
runtime.bgscavenge(0x0?)
        /usr/local/go/src/runtime/mgcscavenge.go:622 +0x65 fp=0xc000089fc8 sp=0xc000089fa0 pc=0x40271c5
runtime.gcenable.func2()
        /usr/local/go/src/runtime/mgc.go:179 +0x26 fp=0xc000089fe0 sp=0xc000089fc8 pc=0x401d786
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000089fe8 sp=0xc000089fe0 pc=0x4072a01
created by runtime.gcenable
        /usr/local/go/src/runtime/mgc.go:179 +0xaa

goroutine 18 [finalizer wait]:
runtime.gopark(0xc0001024e0?, 0x0?, 0x0?, 0xc1?, 0xc000088770?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000088628 sp=0xc000088608 pc=0x403e276
runtime.goparkunlock(...)
        /usr/local/go/src/runtime/proc.go:369
runtime.runfinq()
        /usr/local/go/src/runtime/mfinal.go:180 +0x145 fp=0xc0000887e0 sp=0xc000088628 pc=0x401c905
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000887e8 sp=0xc0000887e0 pc=0x4072a01
created by runtime.createfing
        /usr/local/go/src/runtime/mfinal.go:157 +0x45

goroutine 19 [chan receive]:
runtime.gopark(0xc000068000?, 0xc0000bc058?, 0x4e?, 0x80?, 0xc00008cd80?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc0000846b8 sp=0xc000084698 pc=0x403e276
runtime.chanrecv(0xc0000b2060, 0xc000084798, 0x1)
        /usr/local/go/src/runtime/chan.go:583 +0x42c fp=0xc000084748 sp=0xc0000846b8 pc=0x4007f6c
runtime.chanrecv2(0x6fc23ac00?, 0x0?)
        /usr/local/go/src/runtime/chan.go:447 +0x18 fp=0xc000084770 sp=0xc000084748 pc=0x4007b18
github.com/seaweedfs/seaweedfs/weed/glog.(*loggingT).flushDaemon(0x0?)
        /Users/tochka/GolandProjects/seaweedfs/weed/glog/glog.go:882 +0x8b fp=0xc0000847c0 sp=0xc000084770 pc=0x484272b
github.com/seaweedfs/seaweedfs/weed/glog.init.0.func1()
        /Users/tochka/GolandProjects/seaweedfs/weed/glog/glog.go:410 +0x3a fp=0xc0000847e0 sp=0xc0000847c0 pc=0x483f79a
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000847e8 sp=0xc0000847e0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/glog.init.0
        /Users/tochka/GolandProjects/seaweedfs/weed/glog/glog.go:410 +0x265

goroutine 40 [GC worker (idle)]:
runtime.gopark(0x501b9933aa73?, 0x3?, 0x6e?, 0x2?, 0x16?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000084f50 sp=0xc000084f30 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc000084fe0 sp=0xc000084f50 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000084fe8 sp=0xc000084fe0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 29 [GC worker (idle)]:
runtime.gopark(0x501b9933bfda?, 0x3?, 0x94?, 0x13?, 0x4075825?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc00008a750 sp=0xc00008a730 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc00008a7e0 sp=0xc00008a750 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00008a7e8 sp=0xc00008a7e0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 39 [GC worker (idle)]:
runtime.gopark(0x501b99344def?, 0x3?, 0x36?, 0x15?, 0x4075825?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc00008af50 sp=0xc00008af30 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc00008afe0 sp=0xc00008af50 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00008afe8 sp=0xc00008afe0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 15 [GC worker (idle)]:
runtime.gopark(0x4a09038?, 0x4007620?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc00008b750 sp=0xc00008b730 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc00008b7e0 sp=0xc00008b750 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00008b7e8 sp=0xc00008b7e0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 30 [GC worker (idle)]:
runtime.gopark(0x501b99347b79?, 0x1?, 0x7c?, 0xa7?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000085750 sp=0xc000085730 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc0000857e0 sp=0xc000085750 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0000857e8 sp=0xc0000857e0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 41 [GC worker (idle)]:
runtime.gopark(0x501b99339d8e?, 0x1?, 0xbe?, 0xe8?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000326750 sp=0xc000326730 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc0003267e0 sp=0xc000326750 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0003267e8 sp=0xc0003267e0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 16 [GC worker (idle)]:
runtime.gopark(0x501b993453a0?, 0x3?, 0xad?, 0x9d?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc00008bf50 sp=0xc00008bf30 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc00008bfe0 sp=0xc00008bf50 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc00008bfe8 sp=0xc00008bfe0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 31 [GC worker (idle)]:
runtime.gopark(0x501b9933aa70?, 0x3?, 0x49?, 0x3c?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000085f50 sp=0xc000085f30 pc=0x403e276
runtime.gcBgMarkWorker()
        /usr/local/go/src/runtime/mgc.go:1235 +0xf1 fp=0xc000085fe0 sp=0xc000085f50 pc=0x401f931
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000085fe8 sp=0xc000085fe0 pc=0x4072a01
created by runtime.gcBgMarkStartWorkers
        /usr/local/go/src/runtime/mgc.go:1159 +0x25

goroutine 50 [select, locked to thread]:
runtime.gopark(0xc0003287a8?, 0x2?, 0x9c?, 0x87?, 0xc0003287a4?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000328600 sp=0xc0003285e0 pc=0x403e276
runtime.selectgo(0xc0003287a8, 0xc0003287a0, 0x0?, 0x0, 0x0?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x8bc fp=0xc000328760 sp=0xc000328600 pc=0x404f65c
runtime.ensureSigM.func1()
        /usr/local/go/src/runtime/signal_unix.go:991 +0x187 fp=0xc0003287e0 sp=0xc000328760 pc=0x4053ec7
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0003287e8 sp=0xc0003287e0 pc=0x4072a01
created by runtime.ensureSigM
        /usr/local/go/src/runtime/signal_unix.go:974 +0xbd

goroutine 51 [syscall]:
runtime.sigNoteSleep(0x40757f7)
        /usr/local/go/src/runtime/os_darwin.go:123 +0x1e fp=0xc000328fa0 sp=0xc000328f68 pc=0x40383fe
os/signal.signal_recv()
        /usr/local/go/src/runtime/sigqueue.go:149 +0x28 fp=0xc000328fc0 sp=0xc000328fa0 pc=0x406e488
os/signal.loop()
        /usr/local/go/src/os/signal/signal_unix.go:23 +0x25 fp=0xc000328fe0 sp=0xc000328fc0 pc=0x4b9fba5
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000328fe8 sp=0xc000328fe0 pc=0x4072a01
created by os/signal.Notify.func1.1
        /usr/local/go/src/os/signal/signal.go:151 +0x51

goroutine 52 [chan receive]:
runtime.gopark(0x0?, 0x0?, 0x0?, 0x0?, 0x0?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc0003296d8 sp=0xc0003296b8 pc=0x403e276
runtime.chanrecv(0xc0001321e0, 0xc0003297c0, 0x1)
        /usr/local/go/src/runtime/chan.go:583 +0x42c fp=0xc000329768 sp=0xc0003296d8 pc=0x4007f6c
runtime.chanrecv2(0x0?, 0x0?)
        /usr/local/go/src/runtime/chan.go:447 +0x18 fp=0xc000329790 sp=0xc000329768 pc=0x4007b18
github.com/seaweedfs/seaweedfs/weed/util/grace.init.0.func1()
        /Users/tochka/GolandProjects/seaweedfs/weed/util/grace/signal_handling.go:30 +0x5b fp=0xc0003297e0 sp=0xc000329790 pc=0x52b30db
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0003297e8 sp=0xc0003297e0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/util/grace.init.0
        /Users/tochka/GolandProjects/seaweedfs/weed/util/grace/signal_handling.go:29 +0x18b

goroutine 53 [select]:
runtime.gopark(0xc000096f80?, 0x3?, 0x0?, 0x0?, 0xc000096f22?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000096d88 sp=0xc000096d68 pc=0x403e276
runtime.selectgo(0xc000096f80, 0xc000096f1c, 0xc0000dc480?, 0x0, 0x0?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x8bc fp=0xc000096ee8 sp=0xc000096d88 pc=0x404f65c
go.opencensus.io/stats/view.(*worker).start(0xc0000dc480)
        /Users/tochka/go/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:276 +0x185 fp=0xc000096fc0 sp=0xc000096ee8 pc=0x5d72065
go.opencensus.io/stats/view.init.0.func1()
        /Users/tochka/go/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0x3a fp=0xc000096fe0 sp=0xc000096fc0 pc=0x5d70ada
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000096fe8 sp=0xc000096fe0 pc=0x4072a01
created by go.opencensus.io/stats/view.init.0
        /Users/tochka/go/pkg/mod/go.opencensus.io@v0.23.0/stats/view/worker.go:34 +0xf7

goroutine 86 [chan receive]:
runtime.gopark(0x68ac6c0?, 0x0?, 0x0?, 0x0?, 0xc000354b70?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000327628 sp=0xc000327608 pc=0x403e276
runtime.chanrecv(0xc00070f3e0, 0xc000327798, 0x1)
        /usr/local/go/src/runtime/chan.go:583 +0x42c fp=0xc0003276b8 sp=0xc000327628 pc=0x4007f6c
runtime.chanrecv2(0xc00056fac0?, 0xc00056fae8?)
        /usr/local/go/src/runtime/chan.go:447 +0x18 fp=0xc0003276e0 sp=0xc0003276b8 pc=0x4007b18
github.com/seaweedfs/seaweedfs/weed/server.(*MasterServer).ProcessGrowRequest.func1()
        /Users/tochka/GolandProjects/seaweedfs/weed/server/master_grpc_server_volume.go:25 +0xcc fp=0xc0003277e0 sp=0xc0003276e0 pc=0x6375c2c
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc0003277e8 sp=0xc0003277e0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/server.(*MasterServer).ProcessGrowRequest
        /Users/tochka/GolandProjects/seaweedfs/weed/server/master_grpc_server_volume.go:22 +0x8f

goroutine 85 [select]:
runtime.gopark(0xc000099d70?, 0x2?, 0x2?, 0x0?, 0xc000099d44?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000099b48 sp=0xc000099b28 pc=0x403e276
runtime.selectgo(0xc000099d70, 0xc000099d40, 0x1729?, 0x0, 0xc0002fa130?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x8bc fp=0xc000099ca8 sp=0xc000099b48 pc=0x404f65c
github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes.func3()
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:37 +0x171 fp=0xc000099fe0 sp=0xc000099ca8 pc=0x61e6291
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000099fe8 sp=0xc000099fe0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:35 +0x28f

goroutine 84 [sleep]:
runtime.gopark(0x501b9a42ea3b?, 0xc000142008?, 0x25?, 0x58?, 0x41c1dcf?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000322ef0 sp=0xc000322ed0 pc=0x403e276
time.Sleep(0xce0e1c5200)
        /usr/local/go/src/runtime/time.go:195 +0x135 fp=0xc000322f30 sp=0xc000322ef0 pc=0x406f555
github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes.func2(0x0?)
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:32 +0x94 fp=0xc000322fb8 sp=0xc000322f30 pc=0x61e6474
github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes.func4()
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:34 +0x4b fp=0xc000322fe0 sp=0xc000322fb8 pc=0x61e63ab
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000322fe8 sp=0xc000322fe0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:25 +0x225

goroutine 83 [sleep]:
runtime.gopark(0x501b9a430118?, 0xc000142008?, 0x25?, 0x58?, 0x41c1dcf?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000327f30 sp=0xc000327f10 pc=0x403e276
time.Sleep(0x1aef10b80)
        /usr/local/go/src/runtime/time.go:195 +0x135 fp=0xc000327f70 sp=0xc000327f30 pc=0x406f555
github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes.func1()
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:22 +0xaf fp=0xc000327fe0 sp=0xc000327f70 pc=0x61e65cf
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000327fe8 sp=0xc000327fe0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/topology.(*Topology).StartRefreshWritableVolumes
        /Users/tochka/GolandProjects/seaweedfs/weed/topology/topology_event_handling.go:16 +0xd7

goroutine 42 [select]:
runtime.gopark(0xc0009de720?, 0x9?, 0x0?, 0x0?, 0xc0009de5e6?)
        /usr/local/go/src/runtime/proc.go:363 +0xd6 fp=0xc000a07c40 sp=0xc000a07c20 pc=0x403e276
runtime.selectgo(0xc000a07f20, 0xc0009de5d4, 0x0?, 0x0, 0x0?, 0x1)
        /usr/local/go/src/runtime/select.go:328 +0x8bc fp=0xc000a07da0 sp=0xc000a07c40 pc=0x404f65c
github.com/seaweedfs/seaweedfs/weed/stats.(*ServerStats).Start(0xc00035ac00)
        /Users/tochka/GolandProjects/seaweedfs/weed/stats/stats.go:92 +0x4a9 fp=0xc000a07fc0 sp=0xc000a07da0 pc=0x4a6a589
github.com/seaweedfs/seaweedfs/weed/server.init.0.func1()
        /Users/tochka/GolandProjects/seaweedfs/weed/server/common.go:36 +0x3a fp=0xc000a07fe0 sp=0xc000a07fc0 pc=0x633a01a
runtime.goexit()
        /usr/local/go/src/runtime/asm_amd64.s:1594 +0x1 fp=0xc000a07fe8 sp=0xc000a07fe0 pc=0x4072a01
created by github.com/seaweedfs/seaweedfs/weed/server.init.0
        /Users/tochka/GolandProjects/seaweedfs/weed/server/common.go:36 +0xe5
exit status 2

seaweedfs/seaweedfs#3521

problem line /Users/tochka/go/pkg/mod/github.com/boltdb/bolt@v1.3.1/bucket.go:626 +0x211 fp=0xc0009d5038 sp=0xc0009d4fa8 pc=0x62be751

	// Convert byte slice to a fake page and write the root node.
	var p = (*page)(unsafe.Pointer(&value[bucketHeaderSize]))

https://github.com/boltdb/bolt/blob/master/bucket.go#L626

This is flagging a real error. You're writing beyond the end of an allocated object.

type page struct {
	id       pgid
	flags    uint16
	count    uint16
	overflow uint32
	ptr      uintptr
}

const pageHeaderSize = int(unsafe.Offsetof(((*page)(nil)).ptr))

That's not the size of a page. it doesn't count the size of ptr itself. Use unsafe.Sizeof(page{}).

Thanks!