beekeeper | ----webserver-thread-pool-size problem with signed value
The problem occurs when we try to assign a signed value to this flag.
Internally, webserver-thread-pool-size
refers to thread_pool_size_t
which is a uint32_t
type. It cannot assign a negative value to it, so it will try to assign 4294967295
.
Example:
./beekeeper --notifications-endpoint 127.0.0.1:8000 --webserver-http-endpoint 127.0.0.1:6666 --salt "avocado" --webserver-thread-pool-size -1
1709560ms json_rpc_plugin.cpp:222 initialize ] initializing JSON RPC plugin
1709560ms webserver_plugin.cpp:584 plugin_initialize ] initializing webserver plugin
1709560ms webserver_plugin.cpp:587 plugin_initialize ] configured with 4294967295 thread pool size
1709560ms webserver_plugin.cpp:590 plugin_initialize ] Compression in webserver is disabled
1709560ms webserver_plugin.cpp:602 plugin_initialize ] configured http to listen on 127.0.0.1:6666
1709560ms beekeeper_app_init.cpp:120 initialize_program_o ] initializing options
1709561ms notifications.cpp:64 setup ] setting up notification handler for 1 address
1709563ms beekeeper_app_init.cpp:157 initialize_program_o ] Backtrace on segfault is enabled.
Setting up a startup_io_handler...
1709563ms webserver_plugin.cpp:290 operator() ] start processing http thread
1709563ms webserver_plugin.cpp:305 operator() ] start listening for http requests on 127.0.0.1:6666
Throw location unknown (consider using BOOST_THROW_EXCEPTION)
Dynamic exception type: boost::wrapexcept<boost::thread_resource_error>
std::exception::what: boost::thread_resource_error: Resource temporarily unavailable
1709560ms webserver_plugin.cpp:587 plugin_initialize ] configured with 4294967295 thread pool size
It is a problem with webserver_plugin
, but the beekeeper inherited it.
Edited by Wieslaw Kedzierski