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

fix(share/shwap/p2p/bitswap): set archivalPool ctx #4052

Merged
merged 2 commits into from
Jan 20, 2025

Conversation

renaynay
Copy link
Member

archivalPool ctx for bitswap session was never set, leading to a panic when tracing begins inside the bitswap session that is created for archival requests.

panic: cannot create context from nil parent

goroutine 3130 [running]:
context.WithValue({0x0?, 0x0?}, {0x103cbe2e0?, 0x103ad0f20?}, {0x1041e48a0?, 0x14004d89a40?})
        /opt/homebrew/opt/go/libexec/src/context/context.go:715 +0x140
go.opentelemetry.io/otel/trace.ContextWithSpan(...)
        /Users/rene/go/pkg/mod/go.opentelemetry.io/otel/[email protected]/context.go:14
go.opentelemetry.io/otel/internal/global.(*tracer).Start(0x14006998cd0, {0x0, 0x0}, {0x14004f9a558?, 0x102e7c26d?}, {0x0?, 0x102e7febf?, 0xa?})
        /Users/rene/go/pkg/mod/go.opentelemetry.io/[email protected]/internal/global/trace.go:143 +0x148
github.com/ipfs/boxo/bitswap/internal.startSpan({0x0, 0x0}, {0x14004f9a558, 0x12}, {0x0, 0x0, 0x0})
        /Users/rene/go/pkg/mod/github.com/celestiaorg/[email protected]/bitswap/internal/tracing.go:16 +0x7c
github.com/ipfs/boxo/bitswap/internal.StartSpan(...)
        /Users/rene/go/pkg/mod/github.com/celestiaorg/[email protected]/bitswap/internal/tracing.go:11
github.com/ipfs/boxo/bitswap/client.(*Client).NewSession(0x14002c232c0, {0x0, 0x0})
        /Users/rene/go/pkg/mod/github.com/celestiaorg/[email protected]/bitswap/client/client.go:511 +0x74
github.com/celestiaorg/celestia-node/share/shwap/p2p/bitswap.(*pool).get(0x40?)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/p2p/bitswap/getter.go:339 +0xc4
github.com/celestiaorg/celestia-node/share/shwap/p2p/bitswap.(*Getter).getSession(0x14002d50140, 0x1)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/p2p/bitswap/getter.go:279 +0x44
github.com/celestiaorg/celestia-node/share/shwap/p2p/bitswap.(*Getter).GetEDS(0x14002d50140, {0x104307850?, 0x14006998be0?}, 0x140040ae480)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/p2p/bitswap/getter.go:190 +0x2d4
github.com/celestiaorg/celestia-node/share/shwap/getters.(*CascadeGetter).GetEDS.func1({0x104307850?, 0x14006998be0?}, {0x104307c40?, 0x14002d50140?})
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/getters/cascade.go:68 +0x44
github.com/celestiaorg/celestia-node/share/shwap/getters.cascadeGetters[...]({0x104307818, 0x14006609f50}, {0x14002d501c0, 0x3, 0x0}, 0x14003f9d7f8?)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/getters/cascade.go:151 +0x530
github.com/celestiaorg/celestia-node/share/shwap/getters.(*CascadeGetter).GetEDS(0x140014c4cc0, {0x1043078c0?, 0x14003870d90?}, 0x140040ae480)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/shwap/getters/cascade.go:71 +0xd4
github.com/celestiaorg/celestia-node/share/availability/full.(*ShareAvailability).SharesAvailable(0x14002d4b1a0, {0x1043078c0, 0x14003870d90}, 0x140040ae480)
        /Users/rene/go/src/github.com/renaynay/celestia-node/share/availability/full/availability.go:85 +0x1a4
github.com/celestiaorg/celestia-node/das.(*DASer).sample(0x14002d4d930, {0x1043078c0, 0x14003870d90}, 0x140040ae480)
        /Users/rene/go/src/github.com/renaynay/celestia-node/das/daser.go:157 +0x40
github.com/celestiaorg/celestia-node/das.(*worker).sample(0x1400697e700, {0x104307850, 0x140035b65f0}, 0x1bf08eb000, 0x2?)
        /Users/rene/go/src/github.com/renaynay/celestia-node/das/worker.go:122 +0x94
github.com/celestiaorg/celestia-node/das.(*worker).run(0x1400697e700, {0x104307850, 0x140035b65f0}, 0x1bf08eb000, 0x14001451ce0)
        /Users/rene/go/src/github.com/renaynay/celestia-node/das/worker.go:82 +0x19c
github.com/celestiaorg/celestia-node/das.(*samplingCoordinator).runWorker.func1()
        /Users/rene/go/src/github.com/renaynay/celestia-node/das/coordinator.go:112 +0x64
created by github.com/celestiaorg/celestia-node/das.(*samplingCoordinator).runWorker in goroutine 981
        /Users/rene/go/src/github.com/renaynay/celestia-node/das/coordinator.go:110 +0x244

@renaynay renaynay added the kind:fix Attached to bug-fixing PRs label Jan 20, 2025
@renaynay renaynay self-assigned this Jan 20, 2025
@renaynay renaynay enabled auto-merge (squash) January 20, 2025 11:49
@renaynay renaynay merged commit bb68a13 into celestiaorg:main Jan 20, 2025
26 of 28 checks passed
@codecov-commenter
Copy link

codecov-commenter commented Jan 20, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 45.16%. Comparing base (2469e7a) to head (3b8c2d1).
Report is 420 commits behind head on main.

Files with missing lines Patch % Lines
share/shwap/p2p/bitswap/getter.go 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4052      +/-   ##
==========================================
+ Coverage   44.83%   45.16%   +0.33%     
==========================================
  Files         265      309      +44     
  Lines       14620    22326    +7706     
==========================================
+ Hits         6555    10084    +3529     
- Misses       7313    11173    +3860     
- Partials      752     1069     +317     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:fix Attached to bug-fixing PRs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants