sn/object: Fix out-of-range panic in GET/HEAD/RANGE handlers - #4120
Merged
Conversation
Accidentally occurred:
```
panic: runtime error: index out of range [1] with length 1
goroutine 6053 [running]:
github.com/nspcc-dev/neofs-node/pkg/services/object/get.(*Service).forwardRequest(0x140002828d0, {0x102156190, 0x140013d2990}, {0x14001fa1758, 0x1, 0x253b2996faeb36a5?}, {0x102d3e060, 0x0, 0x253b2996faeb36a5?}, {0x14001546b58, ...}, ...)
github.com/nspcc-dev/neofs-node/pkg/services/object/get/forward.go:46 +0x54c
github.com/nspcc-dev/neofs-node/pkg/services/object/get.(*Service).Get(_, {_, _}, {{{0x10214e550, 0x140013d8120}, 0x140013caa40, {{0x30, 0x32, 0x5b, 0x60, ...}, ...}, ...}, ...})
github.com/nspcc-dev/neofs-node/pkg/services/object/get/get.go:80 +0x1318
main.(*objectSvc).Get(_, {_, _}, {{{0x10214e550, 0x140013d8120}, 0x140013caa40, {{0x30, 0x32, 0x5b, 0x60, ...}, ...}, ...}, ...})
github.com/nspcc-dev/neofs-node/cmd/neofs-node/object.go:121 +0x54
github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).Get(0x14000186d80, 0x140013ca940, {0x10215e760, 0x140013a0bb0})
github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:1113 +0x1040
github.com/nspcc-dev/neofs-sdk-go/proto/object._ObjectService_Get_Handler({0x102114360, 0x14000186d80}, {0x10215b6d8, 0x14000a61700})
github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.21/proto/object/service_grpc.pb.go:726 +0x11c
google.golang.org/grpc.(*Server).processStreamingRPC(0x1400034c008, {0x102156190, 0x140013d2930}, 0x14001217a00, 0x1400023d830, 0x102cff7e0, 0x0)
google.golang.org/grpc@v1.82.1/server.go:1729 +0xcd4
google.golang.org/grpc.(*Server).handleStream(0x1400034c008, {0x102156bd8, 0x14000612680}, 0x14001217a00)
google.golang.org/grpc@v1.82.1/server.go:1862 +0x798
google.golang.org/grpc.(*Server).serveStreams.func2.1()
google.golang.org/grpc@v1.82.1/server.go:1078 +0x74
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 275
google.golang.org/grpc@v1.82.1/server.go:1089 +0x120
```
Signed-off-by: Leonard Liubich <leonard@morphbits.io>
cthulhu-rider
force-pushed
the
get-panic
branch
from
August 7, 2026 11:59
ba86e5e to
dc71fc2
Compare
cthulhu-rider
marked this pull request as ready for review
August 7, 2026 12:00
cthulhu-rider
requested review from
End-rey,
carpawell and
roman-khimov
as code owners
August 7, 2026 12:00
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #4120 +/- ##
==========================================
- Coverage 27.26% 27.26% -0.01%
==========================================
Files 678 678
Lines 46301 46301
==========================================
- Hits 12625 12622 -3
- Misses 32459 32461 +2
- Partials 1217 1218 +1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
roman-khimov
approved these changes
Aug 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.