Skip to content

Test PutBlock with the max sized data square #275

@evan-forbes

Description

@evan-forbes

When using the max sized data square in TestPutBlock, we eventually crash.

I'm still investigating why. As @Wondertan mentioned, we definitely need to test PutBlock with the max sized data square, which we currently are not doing (this was my mistake in #178!). I'm getting the same crash that we're experiencing in #270, even after using the optimization introduced in #271

When running PutBlock with the max sized data square, we're getting some huge goroutine leak

goroutine 431 [select, 9 minutes]:
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).worker(0xc001f891d0)
        /home/evan/go/pkg/mod/github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:45 +0xdf
github.com/ipfs/go-bitswap/internal/decision.(*blockstoreManager).start.func1(0x22c0500, 0xc002242ea0)
        /home/evan/go/pkg/mod/github.com/ipfs/go-bitswap@v0.3.3/internal/decision/blockstoremanager.go:38 +0x2a
github.com/jbenet/goprocess.(*process).Go.func1(0xc001e17330, 0xc002242ea0, 0xc002242f00)
        /home/evan/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:134 +0x3c
created by github.com/jbenet/goprocess.(*process).Go
        /home/evan/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:133 +0x1fe
...
...
goroutine 609 [select]:
github.com/ipfs/go-bitswap/internal/decision.(*Engine).nextEnvelope(0xc001e480c0, 0x22ac940, 0xc001f88ea0, 0x1, 0x0, 0x0)
        /home/evan/go/pkg/mod/github.com/ipfs/go-bitswap@v0.3.3/internal/decision/engine.go:313 +0x128
github.com/ipfs/go-bitswap/internal/decision.(*Engine).taskWorker(0xc001e480c0, 0x22ac940, 0xc001f88ea0)
        /home/evan/go/pkg/mod/github.com/ipfs/go-bitswap@v0.3.3/internal/decision/engine.go:285 +0x1be
github.com/ipfs/go-bitswap/internal/decision.(*Engine).StartWorkers.func1(0x22c0500, 0xc0022ffb00)
        /home/evan/go/pkg/mod/github.com/ipfs/go-bitswap@v0.3.3/internal/decision/engine.go:240 +0x3c
github.com/jbenet/goprocess.(*process).Go.func1(0xc002378fa0, 0xc0022ffb00, 0xc0022ffb60)
        /home/evan/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:134 +0x3c
created by github.com/jbenet/goprocess.(*process).Go
        /home/evan/go/pkg/mod/github.com/jbenet/goprocess@v0.1.4/impl-mutex.go:133 +0x1fe

Originally posted by @evan-forbes in #232 (comment)

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions