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

[3.1] Fix crash on startup if port already in use #72

Merged
merged 1 commit into from
Aug 30, 2022

Conversation

heifner
Copy link
Member

@heifner heifner commented Aug 30, 2022

Do not throw exception in posted lambdas to main thread as this causes non-joined threads to terminate. Instead report error and quit the application.

error 2022-08-30T13:15:52.885 nodeos    net_plugin.cpp:3747           operator()           ] net_plugin::plugin_startup failed to bind to port 9876, bind: Address already in use
info  2022-08-30T13:15:52.885 nodeos    resource_monitor_plugi:122    plugin_shutdown      ] shutdown...
info  2022-08-30T13:15:52.885 nodeos    resource_monitor_plugi:129    plugin_shutdown      ] exit shutdown
info  2022-08-30T13:15:52.885 nodeos    net_plugin.cpp:3776           plugin_shutdown      ] shutdown..
info  2022-08-30T13:15:52.885 nodeos    net_plugin.cpp:3793           plugin_shutdown      ] close 0 connections
info  2022-08-30T13:15:52.885 nodeos    net_plugin.cpp:3813           plugin_shutdown      ] exit shutdown
info  2022-08-30T13:15:52.887 nodeos    main.cpp:181                  main                 ] nodeos successfully exiting

Resolves #60

@heifner heifner linked an issue Aug 30, 2022 that may be closed by this pull request
@heifner heifner added the OCI Work exclusive to OCI team label Aug 30, 2022
@heifner heifner merged commit ac48773 into release/3.1 Aug 30, 2022
@heifner heifner deleted the GH-60-bind-crash-3.1 branch August 30, 2022 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
OCI Work exclusive to OCI team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3.1.0: if p2p socket fails to bind, nodeos crashes leaving DB dirty
2 participants