Node panics after attr-less optimization #1416

Closed
opened 2025-12-28 17:22:55 +00:00 by sami · 0 comments
Owner

Originally created by @roman-khimov on GitHub (May 14, 2025).

Expected Behavior

No panics.

Current Behavior

panic: runtime error: index out of range [0] with length 0

goroutine 16844 [running]:
github.com/nspcc-dev/neofs-node/pkg/core/object.MergeSearchResults(0x3e8?, {0xc00927e300, 0x12}, 0x0, {0xc001deaa20, 0x4, 0x834923cc0a0b85cb?}, {0xc006bde668, 0x4, 0x8})
	github.com/nspcc-dev/neofs-node/pkg/core/object/metadata.go:81 +0x110f
github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).ProcessSearch(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0)
	github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:2048 +0xc53
github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).processSearchRequest(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0)
	github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:1904 +0x646
github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).SearchV2(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0)
	github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:1841 +0x2f3
github.com/nspcc-dev/neofs-sdk-go/proto/object._ObjectService_SearchV2_Handler({0x11627c0, 0xc00020c420}, {0x13dde30, 0xc003099b30}, 0xc00212ac80, 0x0)
	github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.13.0.20250514113748-9abf8c619246/proto/object/service_grpc.pb.go:839 +0x1a6
google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000e9400, {0x13dde30, 0xc003099aa0}, 0xc0019618c0, 0xc000346d50, 0x1d65bb0, 0x0)
	google.golang.org/grpc@v1.70.0/server.go:1400 +0x103b
google.golang.org/grpc.(*Server).handleStream(0xc0000e9400, {0x13dec00, 0xc002dc96c0}, 0xc0019618c0)
	google.golang.org/grpc@v1.70.0/server.go:1810 +0xbaa
google.golang.org/grpc.(*Server).serveStreams.func2.1()
	google.golang.org/grpc@v1.70.0/server.go:1030 +0x7f
created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 16832
	google.golang.org/grpc@v1.70.0/server.go:1041 +0x125

https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/3254-1747229765/index.html#suites/295ed2e000f8fa6f3ade59cc13b98615/14aed1ec2356de66/
https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/3254-1747229812/index.html

Possible Solution

Fix it.

Steps to Reproduce (for bugs)

Run tests with current master.

Context

#3329.

Regression

Yes, #3331.

Originally created by @roman-khimov on GitHub (May 14, 2025). ## Expected Behavior No panics. ## Current Behavior ``` panic: runtime error: index out of range [0] with length 0 goroutine 16844 [running]: github.com/nspcc-dev/neofs-node/pkg/core/object.MergeSearchResults(0x3e8?, {0xc00927e300, 0x12}, 0x0, {0xc001deaa20, 0x4, 0x834923cc0a0b85cb?}, {0xc006bde668, 0x4, 0x8}) github.com/nspcc-dev/neofs-node/pkg/core/object/metadata.go:81 +0x110f github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).ProcessSearch(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0) github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:2048 +0xc53 github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).processSearchRequest(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0) github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:1904 +0x646 github.com/nspcc-dev/neofs-node/pkg/services/object.(*Server).SearchV2(0xc00020c420, {0x13dde30, 0xc003099b30}, 0xc0019232c0) github.com/nspcc-dev/neofs-node/pkg/services/object/server.go:1841 +0x2f3 github.com/nspcc-dev/neofs-sdk-go/proto/object._ObjectService_SearchV2_Handler({0x11627c0, 0xc00020c420}, {0x13dde30, 0xc003099b30}, 0xc00212ac80, 0x0) github.com/nspcc-dev/neofs-sdk-go@v1.0.0-rc.13.0.20250514113748-9abf8c619246/proto/object/service_grpc.pb.go:839 +0x1a6 google.golang.org/grpc.(*Server).processUnaryRPC(0xc0000e9400, {0x13dde30, 0xc003099aa0}, 0xc0019618c0, 0xc000346d50, 0x1d65bb0, 0x0) google.golang.org/grpc@v1.70.0/server.go:1400 +0x103b google.golang.org/grpc.(*Server).handleStream(0xc0000e9400, {0x13dec00, 0xc002dc96c0}, 0xc0019618c0) google.golang.org/grpc@v1.70.0/server.go:1810 +0xbaa google.golang.org/grpc.(*Server).serveStreams.func2.1() google.golang.org/grpc@v1.70.0/server.go:1030 +0x7f created by google.golang.org/grpc.(*Server).serveStreams.func2 in goroutine 16832 google.golang.org/grpc@v1.70.0/server.go:1041 +0x125 ``` https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/3254-1747229765/index.html#suites/295ed2e000f8fa6f3ade59cc13b98615/14aed1ec2356de66/ https://rest.fs.neo.org/HXSaMJXk2g8C14ht8HSi7BBaiYZ1HeWh2xnWPGQCg4H6/3254-1747229812/index.html ## Possible Solution Fix it. ## Steps to Reproduce (for bugs) Run tests with current master. ## Context #3329. ## Regression Yes, #3331.
sami 2025-12-28 17:22:55 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
nspcc-dev/neofs-node#1416
No description provided.