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

add sighup tests #915

Merged
merged 3 commits into from
Dec 23, 2024
Merged

add sighup tests #915

merged 3 commits into from
Dec 23, 2024

Conversation

evgeniiz321
Copy link
Contributor

there is a problem during fschain endpoint update:

info	neofs-node/config.go:902	SIGHUP has been received, rereading configuration...
info	shard/control.go:315	trying to restore read-write mode	{"shard_id": "EgZdmowYzd4UqrK63zvAFg"}
info	shard/mode.go:28	setting shard mode	{"shard_id": "EgZdmowYzd4UqrK63zvAFg", "old_mode": "READ_WRITE", "new_mode": "READ_WRITE"}
info	shard/mode.go:69	shard mode set successfully	{"shard_id": "EgZdmowYzd4UqrK63zvAFg", "mode": "READ_WRITE"}
info	shard/control.go:315	trying to restore read-write mode	{"shard_id": "WQ1oGrsfXW2xe54Uy5jcKS"}
info	shard/mode.go:28	setting shard mode	{"shard_id": "WQ1oGrsfXW2xe54Uy5jcKS", "old_mode": "READ_WRITE", "new_mode": "READ_WRITE"}
info	shard/mode.go:69	shard mode set successfully	{"shard_id": "WQ1oGrsfXW2xe54Uy5jcKS", "mode": "READ_WRITE"}
info	client/notifications.go:228	RPC connection lost, attempting reconnect
info	neofs-node/config.go:960	configuration has been reloaded successfully
info	client/multi.go:53	connection to RPC node has been established	{"endpoint": "ws://localhost:58302/ws"}
info	neofs-node/main.go:207	restarting internal services because of RPC connection loss...
info	event/listener.go:221	stop event listener by context	{"reason": "context canceled"}
warn	neofs-node/main.go:181	internal application error	{"message": "restarting after morph connection was lost: getting network state: could not get current epoch number: could not perform test invocation (epoch): chain/client: contract execution finished with state FAULT; exception: at instruction 31 (SYSCALL): System.Contract.Call failed: called contract 4ea20d322984f445a4a737dbbd4bb1900cdee905 not found: key not found"}
info	neofs-node/grpc.go:138	stopping gRPC server...	{"name": "NeoFS Control API"}
error	client/notifications.go:267	could not restore block subscription	{"error": "connection lost: while waiting for the response"}
info	client/notifications.go:228	RPC connection lost, attempting reconnect
info	neofs-node/grpc.go:154	gRPC server stopped successfully	{"name": "NeoFS Control API"}
info	neofs-node/storage.go:65	closing components of the storage engine...
warn	client/multi.go:43	could not establish connection to RPC node	{"endpoint": "ws://localhost:58302/ws", "error": "WS client creation: dial tcp: lookup localhost: operation was canceled"}
debug	blobstor/control.go:44	closing...	{"shard_id": "EgZdmowYzd4UqrK63zvAFg"}
info	shard/gc.go:165	waiting for GC workers to stop...
debug	shard/gc.go:151	GC is stopped
warn	shard/gc.go:105	stop event listener by closed channel
debug	blobstor/control.go:44	closing...	{"shard_id": "WQ1oGrsfXW2xe54Uy5jcKS"}
info	shard/gc.go:165	waiting for GC workers to stop...
debug	shard/gc.go:151	GC is stopped
warn	shard/gc.go:105	stop event listener by closed channel
info	neofs-node/storage.go:73	all components of the storage engine closed successfully
info	neofs-node/grpc.go:138	stopping gRPC server...	{"name": "NeoFS Public API"}
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x20 pc=0x1009fed98]

goroutine 70 [running]:
github.com/nspcc-dev/neofs-node/pkg/morph/client.(*Client).routeNotifications(0x140001be240)
	github.com/nspcc-dev/neofs-node/pkg/morph/client/notifications.go:236 +0xf8
created by github.com/nspcc-dev/neofs-node/pkg/morph/client.New in goroutine 1
	github.com/nspcc-dev/neofs-node/pkg/morph/client/constructor.go:172 +0x630
panic: runtime error: invalid memory address or nil pointer dereference
[signal SIGSEGV: segmentation violation code=0x2 addr=0x0 pc=0x1009ff044]

goroutine 372 [running]:
github.com/nspcc-dev/neofs-node/pkg/morph/client.(*Client).restoreSubscriptions(0x140001be240, 0x0, 0x140001172c0)
	github.com/nspcc-dev/neofs-node/pkg/morph/client/notifications.go:265 +0xc4
created by github.com/nspcc-dev/neofs-node/pkg/morph/client.(*Client).routeNotifications in goroutine 70
	github.com/nspcc-dev/neofs-node/pkg/morph/client/notifications.go:230 +0xe4

Besides panic there is a -

warn	neofs-node/main.go:181	internal application error	{"message": "restarting after morph connection was lost: getting network state: could not get current epoch number: could not perform test invocation (epoch): chain/client: contract execution finished with state FAULT; exception: at instruction 31 (SYSCALL): System.Contract.Call failed: called contract 4ea20d322984f445a4a737dbbd4bb1900cdee905 not found: key not found"}

I need some help to understand why it happens

It was previously used to debug problems with free space.
Is not needed anymore.

Signed-off-by: Evgeniy Zayats <[email protected]>
@roman-khimov
Copy link
Member

Node can't panic, if it does --- it's a bug. RPC error looks as if you're trying to access some different network. Contract hash is cached, it can not change between reconnects to the same network, but in your case calls to this contract fail because the contract doesn't exist.

Evgeniy Zayats added 2 commits December 22, 2024 02:50
It is better to use config file to pass node attributes instead of
env variables.

Signed-off-by: Evgeniy Zayats <[email protected]>
closes #901

Signed-off-by: Evgeniy Zayats <[email protected]>
@roman-khimov roman-khimov merged commit afa7d08 into master Dec 23, 2024
5 of 7 checks passed
@roman-khimov roman-khimov deleted the ezayats/issue-901 branch December 23, 2024 13:01
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