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

[Bug]: abci handshake not gracefully shutdown #16202

Closed
yihuang opened this issue May 18, 2023 · 0 comments · Fixed by #16206
Closed

[Bug]: abci handshake not gracefully shutdown #16202

yihuang opened this issue May 18, 2023 · 0 comments · Fixed by #16206
Labels

Comments

@yihuang
Copy link
Collaborator

yihuang commented May 18, 2023

It turns out #15041 has fixed most of the graceful shutdown issue, there's still one more issue with ABCI handshake, handshake could replay lots of blocks for a long time, when we interrupted it with signals, it better to handle in a graceful way, so it'll work with the --cpu-profile flag, and async commit feature.

right now handshake happens in NewNode, and not cancelable, which breaks the profiling and async commit feature which needs graceful shutdown to cleanup resource.

we need to fix that in cometbft first, make the handshake process cancelable with a Context (cometbft/cometbft#857).

@yihuang yihuang added the T:Bug label May 18, 2023
@yihuang yihuang changed the title [Bug]: node cleanup is not run when signal received [Bug]: node graceful shutdown May 18, 2023
@yihuang yihuang changed the title [Bug]: node graceful shutdown [Bug]: abci handshake not gracefully shutdown May 18, 2023
yihuang added a commit to yihuang/cometbft that referenced this issue May 18, 2023
it'll make the handshake work with graceful shutdown.

see: cosmos/cosmos-sdk#16202
yihuang added a commit to yihuang/cometbft that referenced this issue May 18, 2023
it'll make the handshake work with graceful shutdown.

see: cosmos/cosmos-sdk#16202
mergify bot pushed a commit to cometbft/cometbft that referenced this issue May 19, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.



---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
yihuang added a commit to yihuang/cometbft that referenced this issue Jun 21, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
yihuang added a commit to yihuang/cometbft that referenced this issue Jun 21, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
yihuang added a commit to yihuang/cometbft that referenced this issue Jun 21, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
sergio-mena pushed a commit to cometbft/cometbft that referenced this issue Jun 22, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

#### PR checklist

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
sergio-mena pushed a commit to cometbft/cometbft that referenced this issue Jun 22, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
sergio-mena pushed a commit to cometbft/cometbft that referenced this issue Sep 5, 2023
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
nivasan1 pushed a commit to skip-mev/cometbft that referenced this issue Jan 16, 2024
it'll make the handshake work with graceful shutdown(see: cosmos/cosmos-sdk#16202)

handshake could be a long running process if there are many local blocks to replay, for example we use it to do profiling.

Hope we can backport this to 0.34.x.

---

- [ ] Tests written/updated
- [ ] Changelog entry added in `.changelog` (we use [unclog](https://github.com/informalsystems/unclog) to manage our changelog)
- [ ] Updated relevant documentation (`docs/` or `spec/`) and code comments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant