When starting a shard server with --sslMode=allowSSL and supplying a password-encrypted PEM file, the shard server crashes at start-up, while performing sharding state initialization. The stack trace indicates possible trouble creating or destroying an SSL manager:
mongo/util/net/ssl_manager.h:74:8: mongo::SSLConfiguration::~SSLConfiguration() mongo/util/net/ssl_manager.h:74:0: mongo::SSLConfiguration::~SSLConfiguration() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() third_party/asio-asio-1-11-0/asio/include/asio/ssl/impl/context.ipp:200:7: asio::ssl::context::~context() /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2459:13: std::__1::default_delete<asio::ssl::context>::operator()(asio::ssl::con /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2658:0: std::__1::unique_ptr<asio::ssl::context, std::__1::default_delete<asio:: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<asio::ssl::context, std::__1::default_delete<asio:: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<asio::ssl::context, std::__1::default_delete<asio:: mongo/util/net/asio_ssl_context.h:45:0: mongo::ASIOSSLContext::~ASIOSSLContext() mongo/util/net/asio_ssl_context.h:45:0: mongo::ASIOSSLContext::~ASIOSSLContext() mongo/util/net/asio_message_port.cpp:58:0: mongo::(anonymous namespace)::ASIOSSLContextPair::~ASIOSSLContextPair() mongo/util/net/asio_message_port.cpp:58:0: mongo::(anonymous namespace)::ASIOSSLContextPair::~ASIOSSLContextPair() mongo/util/decoration_registry.h:118:0: void mongo::DecorationRegistry::destructAt<mongo::(anonymous namespace)::ASIOSSLContextPair>(void*) /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1793:12: std::__1::function<void (void*)>::operator()(void*) const mongo/util/decoration_registry.cpp:75:0: mongo::DecorationRegistry::destruct(mongo::DecorationContainer*) const mongo/util/decoration_container.cpp:44:5: mongo::DecorationContainer::~DecorationContainer() mongo/util/decoration_container.cpp:43:0: mongo::DecorationContainer::~DecorationContainer() mongo/util/decorable.h:110:6: mongo::Decorable<mongo::SSLManagerInterface>::~Decorable() mongo/util/net/ssl_manager.cpp:502:0: mongo::SSLManagerInterface::~SSLManagerInterface() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() mongo/util/net/ssl_manager.cpp:206:0: mongo::(anonymous namespace)::SSLManager::~SSLManager() third_party/asio-asio-1-11-0/asio/include/asio/ssl/impl/context.ipp:200:7: asio::ssl::context::~context() mongo/executor/async_secure_stream_factory.h:46:7: mongo::executor::AsyncSecureStreamFactory::~AsyncSecureStreamFactory() mongo/executor/async_secure_stream_factory.h:46:0: mongo::executor::AsyncSecureStreamFactory::~AsyncSecureStreamFactory() mongo/executor/async_secure_stream_factory.h:46:0: mongo::executor::AsyncSecureStreamFactory::~AsyncSecureStreamFactory() /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2459:13: std::__1::default_delete<mongo::executor::AsyncStreamFactoryInterface>: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2658:0: std::__1::unique_ptr<mongo::executor::AsyncStreamFactoryInterface, std:: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::AsyncStreamFactoryInterface, std:: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::AsyncStreamFactoryInterface, std:: mongo/executor/network_interface_asio.h:95:0: mongo::executor::NetworkInterfaceASIO::~NetworkInterfaceASIO() mongo/executor/network_interface_asio.h:95:7: mongo::executor::NetworkInterfaceASIO::~NetworkInterfaceASIO() mongo/executor/network_interface_asio.h:95:0: mongo::executor::NetworkInterfaceASIO::~NetworkInterfaceASIO() /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2459:13: std::__1::default_delete<mongo::executor::NetworkInterface>::operator() /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2658:0: std::__1::unique_ptr<mongo::executor::NetworkInterface, std::__1::defaul /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::NetworkInterface, std::__1::defaul /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::NetworkInterface, std::__1::defaul mongo/executor/thread_pool_task_executor.cpp:129:0: mongo::executor::ThreadPoolTaskExecutor::~ThreadPoolTaskExecutor() mongo/executor/thread_pool_task_executor.cpp:129:51: mongo::executor::ThreadPoolTaskExecutor::~ThreadPoolTaskExecutor() mongo/executor/thread_pool_task_executor.cpp:129:0: mongo::executor::ThreadPoolTaskExecutor::~ThreadPoolTaskExecutor() /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2459:13: std::__1::default_delete<mongo::executor::TaskExecutor>::operator()(mon /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2658:0: std::__1::unique_ptr<mongo::executor::TaskExecutor, std::__1::default_de /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::TaskExecutor, std::__1::default_de /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/memory:2626:0: std::__1::unique_ptr<mongo::executor::TaskExecutor, std::__1::default_de /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:415:0: decltype(std::__1::forward<mongo::initializeGlobalShardingStat /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:430:0: std::__1::unique_ptr<mongo::ShardingCatalogManager, std::__1:: /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1407:0: std::__1::__function::__func<mongo::initializeGlobalShardingStateFor /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1793:12: std::__1::function<std::__1::unique_ptr<mongo::ShardingCatalogManag mongo/s/sharding_initialization.cpp:163:0: mongo::initializeGlobalShardingState(mongo::OperationContext*, mongo::ConnectionString const&, mongo::Strin mongo/db/s/sharding_initialization_mongod.cpp:83:12: mongo::initializeGlobalShardingStateForMongod(mongo::OperationContext*, mongo::ConnectionString c /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:415:12: decltype(std::__1::forward<mongo::Status (*&)(mongo::Operatio /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/__functional_base:430:0: mongo::Status std::__1::__invoke_void_return_wrapper<mongo::St /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1407:0: std::__1::__function::__func<mongo::Status (*)(mongo::OperationConte /Library/Developer/CommandLineTools/usr/bin/../include/c++/v1/functional:1793:12: std::__1::function<mongo::Status (mongo::OperationContext*, mongo:: mongo/db/s/sharding_state.cpp:454:0: mongo::ShardingState::initializeFromShardIdentity(mongo::OperationContext*, mongo::ShardIdentityType const&) mongo/db/s/sharding_state.cpp:653:27: mongo::ShardingState::initializeShardingAwarenessIfNeeded(mongo::OperationContext*) mongo/db/db.cpp:721:5: mongo::_initAndListen(int) mongo/db/db.cpp:793:16: mongo::initAndListen(int) mongo/db/db.cpp:1143:25: mongoDbMain(int, char**, char**) mongo/db/db.cpp:836:0: main