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 -> main] Fix crash on startup if port already in use #75

Merged
merged 3 commits 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 added the OCI Work exclusive to OCI team label Aug 30, 2022
@heifner heifner merged commit 076c98e into main Aug 30, 2022
@heifner heifner deleted the GH-60-merge-main branch August 30, 2022 18:06
heifner added a commit that referenced this pull request Apr 29, 2024
IF: Avoid using fork in log messages that are not about micro-forks
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