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

handle start_http failure in rpc_service #25400

Merged
merged 1 commit into from May 21, 2022

Conversation

jbiseda
Copy link
Contributor

@jbiseda jbiseda commented May 20, 2022

Problem

In JsonRpcService::new: if start_http fails close_handle_sender will be dropped without sending a value to the channel. Subsequent close_handle_receiver.recv().unwrap() will fail on the closed channel.

Summary of Changes

Send error value over the channel to gracefully handle the failure.

Fixes #

@jbiseda jbiseda marked this pull request as ready for review May 20, 2022 18:36
Copy link
Contributor

@lijunwangs lijunwangs left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good to me

@jbiseda jbiseda merged commit e263be2 into solana-labs:master May 21, 2022
@jbiseda jbiseda deleted the rpc_service-error-fix branch May 21, 2022 01:00
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 19, 2022
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 21, 2022
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 21, 2022
…#25400)""

This reverts commit 7d54b1a45c8d91633fb1f4f365df8dab4fcd27c3.
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 21, 2022
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 21, 2022
@behzadnouri
Copy link
Contributor

For cross reference, this is causing segfaults in rocks-db: #25941 (comment)

behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 22, 2022
behzadnouri added a commit to behzadnouri/solana that referenced this pull request Jun 22, 2022
…#25400)""

This reverts commit 46ffacd1b7dbf8a2d0f8664101f3889d20c19459.
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
jeffwashington pushed a commit to jeffwashington/solana that referenced this pull request Jun 29, 2022
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.

None yet

3 participants