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

env: handle process termination more gracefully #891

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

evgeniiz321
Copy link
Contributor

@evgeniiz321 evgeniiz321 commented Nov 2, 2024

Sometimes subprocesses are not terminated by the terminate call. Add timeout for this case and use kill instead.

Also on the latest node - storage nodes fail to stop gracefully, latest messages in the log:

info	policer/process.go:15	routine stopped	{"component": "Object Policer"}
info	event/listener.go:221	stop event listener by context	{"reason": "context canceled"}
debug	neofs-node/main.go:101	shutting down pprof service
info	neofs-node/main.go:157	pprof service started successfully
debug	neofs-node/main.go:110	pprof service has been stopped
info	neofs-node/grpc.go:138	stopping gRPC server...	{"name": "NeoFS Control API"}
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...
debug	blobstor/control.go:44	closing...	{"shard_id": "Zhk5nFGfiWGBLfEe8vGXH"}
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": "Nn74icc68kj8hkUqRFUKGP"}
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"}
info	neofs-node/grpc.go:154	gRPC server stopped successfully	{"name": "NeoFS Public API"}
info	neofs-node/grpc.go:117	stop listening gRPC endpoint	{"endpoint": "127.0.0.1:55649"}
debug	neofs-node/main.go:192	waiting for all processes to stop

Sometimes subprocesses are not terminated by the terminate call.
Add timeout for this case and use kill instead.

Signed-off-by: Evgeniy Zayats <zayatsevgeniy@nspcc.io>
Signed-off-by: Evgeniy Zayats <zayatsevgeniy@nspcc.io>
@roman-khimov
Copy link
Member

roman-khimov commented Nov 2, 2024

Sometimes subprocesses are not terminated by the terminate call.

Which is a bug that should be fixed.

Also on the latest node - storage nodes fail to stop gracefully,

Can you trace to the first PR when this behavior appeared?

@roman-khimov
Copy link
Member

Tests started to fail with nspcc-dev/neofs-node#2991, but node behavior isn't changed there.

@roman-khimov roman-khimov merged commit d5d7798 into master Nov 2, 2024
6 of 7 checks passed
@roman-khimov roman-khimov deleted the ezayats/new-timeout-fixes branch November 2, 2024 10:06
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