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

Pool unexpected panic #631

Open
AliceInHunterland opened this issue Oct 7, 2024 · 4 comments
Open

Pool unexpected panic #631

AliceInHunterland opened this issue Oct 7, 2024 · 4 comments
Labels
bug Something isn't working I4 No visible changes pool Issue related to the pool S4 Routine U2 Seriously planned
Milestone

Comments

@AliceInHunterland
Copy link

AliceInHunterland commented Oct 7, 2024

During nspcc-dev/neo-go#3582 (comment)
I have created the pool:

signer := user.NewAutoIDSignerRFC6979(acc.PrivateKey().PrivateKey)
	p, err := pool.New(pool.NewFlatNodeParams(rpcNeoFS), signer, pool.DefaultOptions())
	if err != nil {
		return cli.Exit(fmt.Sprintf("failed to create NeoFS pool: %v", err), 1)
	}

	if err = p.Dial(context.Background()); err != nil {
		return cli.Exit(fmt.Sprintf("failed to dial NeoFS pool: %v", err), 1)
	}
	defer p.Close()

and then tried to p.ObjectPutInit(ctx, hdr, signer, prmObjectPutInit)
and received this after ~2 hours of work.

[2024-10-06T01:47:40+03:00] Successfully uploaded block: 442000
panic: runtime error: index out of range [-1]

goroutine 247 [running]:
math/rand.(*rngSource).Uint64(...)
        math/rand/rng.go:249
math/rand.(*rngSource).Int63(0x1400048d6a8?)
        math/rand/rng.go:234 +0x98
math/rand.(*Rand).Int63(...)
        math/rand/rand.go:96
math/rand.(*Rand).Int31(...)
        math/rand/rand.go:110
math/rand.(*Rand).Int31n(0x14000040750?, 0x48d7a0?)
        math/rand/rand.go:142 +0x8c
math/rand.(*Rand).Intn(0x10?, 0x10?)
        math/rand/rand.go:183 +0x30
github.com/nspcc-dev/neofs-sdk-go/pool.(*sampler).Next(0x140001cf3c0)
        github.com/nspcc-dev/[email protected]/pool/sampler.go:63 +0x2c
github.com/nspcc-dev/neofs-sdk-go/pool.(*innerPool).connection(0x140001cf400)
        github.com/nspcc-dev/[email protected]/pool/pool.go:988 +0x1a0
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).connection(0x60?)
        github.com/nspcc-dev/[email protected]/pool/pool.go:967 +0x58
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).sdkClient(0xad8f60c33a130b3?)
        github.com/nspcc-dev/[email protected]/pool/pool.go:1031 +0x1c
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).ObjectPutInit(0x1400048da88, {0x101e0dec0, 0x1027af240}, {0x0, 0x0, 0x1400422a2a0, {0x0, 0x0, 0x0}}, {0x101e0e400, ...}, ...)
        github.com/nspcc-dev/[email protected]/pool/object.go:35 +0xa4
github.com/nspcc-dev/neo-go/cli/util.uploadBlock({0x101e0dec0, 0x1027af240}, {{0x14000192180, 0x1, 0x1}, {0x101e0e400, 0x140003f53b0}, 0x140002fb150, 0x14000436a80, 0x1400004b910, ...}, ...)
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:401 +0x11c
github.com/nspcc-dev/neo-go/cli/util.uploadBin.func3()
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:162 +0x6bc
created by github.com/nspcc-dev/neo-go/cli/util.uploadBin in goroutine 1
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:145 +0xb48
(base) ekaterinapavlova@MacBook-Air-4 neo-go % 

I have been using as rpcNeoFS "st1.t5.fs.neo.org:8080", "st2.t5.fs.neo.org:8080", "st3.t5.fs.neo.org:8080", "st4.t5.fs.neo.org:8080".

Maybe connected with #600

@AliceInHunterland AliceInHunterland added bug Something isn't working U2 Seriously planned pool Issue related to the pool S2 Regular significance I2 Regular impact labels Oct 7, 2024
@roman-khimov roman-khimov added this to the v1.0.0-rc13 milestone Oct 23, 2024
@roman-khimov roman-khimov added S4 Routine I4 No visible changes and removed S2 Regular significance I2 Regular impact labels Oct 23, 2024
@roman-khimov
Copy link
Member

Rather suspicious since it's a math/rand panic. But it's dependent on randomness source. What's the SDK version? Maybe we broke something in recent upgrades.

@AliceInHunterland
Copy link
Author

github.com/nspcc-dev/neofs-sdk-go v1.0.0-rc.12

And we had it (the same one) multiple times - for example, yesterday:

Retrying after error: session: init session: status: code = 1024 message = connection to the RPC node has been lost
panic: runtime error: index out of range [-1]

goroutine 380 [running]:
math/rand.(*rngSource).Uint64(...)
        math/rand/rng.go:249
math/rand.(*rngSource).Int63(0x1040ce160?)
        math/rand/rng.go:234 +0x98
math/rand.(*Rand).Int63(...)
        math/rand/rand.go:96
math/rand.(*Rand).Int31(...)
        math/rand/rand.go:110
math/rand.(*Rand).Int31n(0x0?, 0x2700008?)
        math/rand/rand.go:142 +0x8c
math/rand.(*Rand).Intn(0x10?, 0x10?)
        math/rand/rand.go:183 +0x30
github.com/nspcc-dev/neofs-sdk-go/pool.(*sampler).Next(0x140016cb940)
        github.com/nspcc-dev/[email protected]/pool/sampler.go:63 +0x2c
github.com/nspcc-dev/neofs-sdk-go/pool.(*innerPool).connection(0x140002a6940)
        github.com/nspcc-dev/[email protected]/pool/pool.go:988 +0x1a0
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).connection(0x60?)
        github.com/nspcc-dev/[email protected]/pool/pool.go:967 +0x58
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).sdkClient(0x1400204fb58?)
        github.com/nspcc-dev/[email protected]/pool/pool.go:1031 +0x1c
github.com/nspcc-dev/neofs-sdk-go/pool.(*Pool).ObjectHead(0x14000162dc0, {0x1037922c0, 0x1041372a0}, {0xf9, 0x19, 0x7b, 0x9b, 0x81, 0x72, 0xcb, ...}, ...)
        github.com/nspcc-dev/[email protected]/pool/object.go:96 +0x8c
github.com/nspcc-dev/neo-go/cli/util.getSmt.func1()
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:411 +0x84
github.com/nspcc-dev/neo-go/cli/util.retry(0x1400204fec8)
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:210 +0xd4
github.com/nspcc-dev/neo-go/cli/util.getSmt(0x14000162dc0, {0xf9, 0x19, 0x7b, 0x9b, 0x81, 0x72, 0xcb, 0x82, 0x30, ...}, ...)
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:410 +0x148
created by github.com/nspcc-dev/neo-go/cli/util.updateIndexFiles in goroutine 1
        github.com/nspcc-dev/neo-go/cli/util/uploader.go:329 +0x5a8

@carpawell
Copy link
Member

@AliceInHunterland, can you also attach go verison just in case? since math's panic is not cool.

@AliceInHunterland
Copy link
Author

@AliceInHunterland, can you also attach go verison just in case? since math's panic is not cool.

go version go1.22.6 darwin/arm64

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working I4 No visible changes pool Issue related to the pool S4 Routine U2 Seriously planned
Projects
None yet
Development

No branches or pull requests

3 participants