Skip to content

updateTxnProofs data race #261

@ChrisSchinnerl

Description

@ChrisSchinnerl
  WARNING: DATA RACE
  Write at 0x00c0000d2920 by goroutine 833:
    go.sia.tech/coreutils/chain.updateTxnProofs.func1()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:690 +0x318
    go.sia.tech/coreutils/chain.updateTxnProofs()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:694 +0x91
    go.sia.tech/coreutils/chain.(*Manager).applyPoolUpdate()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:820 +0x35a
    go.sia.tech/coreutils/chain.(*Manager).applyTip()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:333 +0xfe4
    go.sia.tech/coreutils/chain.(*Manager).reorgTo()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:406 +0x385
    go.sia.tech/coreutils/chain.(*Manager).AddBlocks()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/chain/manager.go:251 +0x14a9
    go.sia.tech/renterd/v2/bus.(*Bus).consensusAcceptBlock()
        /home/runner/work/renterd/renterd/bus/routes.go:183 +0x236
    go.sia.tech/renterd/v2/bus.(*Bus).consensusAcceptBlock-fm()
        <autogenerated>:1 +0xb3
    go.sia.tech/jape.Mux.adaptor.func2()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/server.go:185 +0x111
    github.com/julienschmidt/httprouter.(*Router).ServeHTTP()
        /home/runner/go/pkg/mod/github.com/julienschmidt/[email protected]/router.go:387 +0xec2
    go.sia.tech/jape.BasicAuth.func1.1()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/server.go:244 +0xa4
    net/http.HandlerFunc.ServeHTTP()
        /opt/hostedtoolcache/go/1.24.4/x64/src/net/http/server.go:2294 +0x47
    go.sia.tech/renterd/v2/internal/test/e2e.newTestCluster.newTestCluster.Auth.func7.func8()
        /home/runner/work/renterd/renterd/api/auth.go:87 +0x1ae
    net/http.HandlerFunc.ServeHTTP()
        /opt/hostedtoolcache/go/1.24.4/x64/src/net/http/server.go:2294 +0x47
    go.sia.tech/renterd/v2/api.TreeMux.ServeHTTP()
        /home/runner/work/renterd/renterd/api/mux.go:27 +0x36a
    go.sia.tech/renterd/v2/api.TreeMux.ServeHTTP()
        /home/runner/work/renterd/renterd/api/mux.go:22 +0x32a
    go.sia.tech/renterd/v2/api.(*TreeMux).ServeHTTP()
        <autogenerated>:1 +0x74
    net/http.serverHandler.ServeHTTP()
        /opt/hostedtoolcache/go/1.24.4/x64/src/net/http/server.go:3301 +0x2a1
    net/http.(*conn).serve()
        /opt/hostedtoolcache/go/1.24.4/x64/src/net/http/server.go:2102 +0x1304
    net/http.(*Server).Serve.gowrap3()
        /opt/hostedtoolcache/go/1.24.4/x64/src/net/http/server.go:3454 +0x4f
  
  Previous read at 0x00c0000d2920 by goroutine 1478:
    go.sia.tech/core/types.EncodeSlice[go.shape.struct { Parent go.sia.tech/core/types.SiacoinElement "json:\"parent\""; SatisfiedPolicy go.sia.tech/core/types.SatisfiedPolicy "json:\"satisfiedPolicy\"" }]()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/types/encoding.go:136 +0x225
    go.sia.tech/core/types.V2Transaction.EncodeTo()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/types/encoding.go:775 +0x3a4
    go.sia.tech/core/types.EncodeSlice[go.shape.0074940fc201370a929e85cdad2c1bcc71180031264811c7b4fdc89de8540483]()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/types/encoding.go:136 +0x285
    go.sia.tech/core/gateway.(*RPCRelayV2TransactionSet).encodeRequest()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/gateway/encoding.go:364 +0xaf
    go.sia.tech/core/gateway.Object.encodeRequest-fm()
        <autogenerated>:1 +0x4c
    go.sia.tech/core/gateway.withV2Encoder()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/gateway/encoding.go:34 +0xcb
    go.sia.tech/core/gateway.(*Stream).withEncoder()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/gateway/transport.go:124 +0xa4
    go.sia.tech/core/gateway.(*Stream).WriteRequest()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/gateway/transport.go:155 +0x359
    go.sia.tech/coreutils/syncer.(*Peer).callRPC()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/syncer/peer.go:90 +0x360
    go.sia.tech/coreutils/syncer.(*Peer).RelayV2TransactionSet()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/syncer/peer.go:196 +0x194
    go.sia.tech/coreutils/syncer.(*Syncer).relayV2TransactionSet.func1()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/syncer/syncer.go:441 +0x1a
    go.sia.tech/coreutils/syncer.(*Syncer).withV2Peers.func1()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/syncer/syncer.go:393 +0x6a
    go.sia.tech/coreutils/syncer.(*Syncer).withV2Peers.gowrap1()
        /home/runner/go/pkg/mod/go.sia.tech/[email protected]/syncer/syncer.go:398 +0x41

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions