Skip to content

sn/object: Fix out-of-range panic in GET/HEAD/RANGE handlers - #4120

Merged
roman-khimov merged 1 commit into
masterfrom
get-panic
Aug 7, 2026
Merged

sn/object: Fix out-of-range panic in GET/HEAD/RANGE handlers#4120
roman-khimov merged 1 commit into
masterfrom
get-panic

Conversation

@cthulhu-rider

Copy link
Copy Markdown
Contributor

No description provided.

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
cthulhu-rider marked this pull request as ready for review August 7, 2026 12:00
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 27.26%. Comparing base (4827c85) to head (dc71fc2).

Files with missing lines Patch % Lines
pkg/services/object/get/forward.go 0.00% 2 Missing ⚠️
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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@roman-khimov
roman-khimov merged commit 68883b0 into master Aug 7, 2026
20 of 22 checks passed
@roman-khimov
roman-khimov deleted the get-panic branch August 7, 2026 12:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants