Skip to content

Check failed: worker != workers_.end() when using SSLContextConfig #50

Closed

Description

@keithmendozasr

I'm trying to setup TLS using proxygen tag 0.28.0. However, when I run the program, I get the following:

F0703 10:53:44.163373  2344 ServerBootstrap.cpp:40] Check failed: worker != workers_.end()
*** Check failure stack trace: ***
    @     0x7fc7d294cdaa  (unknown)
    @     0x7fc7d294cce4  (unknown)
    @     0x7fc7d294c6e6  (unknown)
    @     0x7fc7d294f687  (unknown)
    @     0x7fc7d2fea282  folly::ServerWorkerPool::threadStopped()
    @     0x7fc7d2ff143c  folly::wangle::IOThreadPoolExecutor::stopThreads()
    @     0x7fc7d2ffe4aa  folly::wangle::ThreadPoolExecutor::removeThreads()
    @     0x7fc7d2ffe632  folly::wangle::ThreadPoolExecutor::stop()
    @     0x7fc7d2ff2a94  folly::wangle::IOThreadPoolExecutor::~IOThreadPoolExecutor()
    @           0x40911a  std::_Sp_counted_base<>::_M_release()
    @     0x7fc7d336d85e  proxygen::HTTPServer::start()
    @           0x4059aa  _ZZ4mainENKUlvE_clEv
    @           0x40704c  _ZNSt12_Bind_simpleIFZ4mainEUlvE_vEE9_M_invokeIIEEEvSt12_Index_tupleIIXspT_EEE
    @           0x406fa3  _ZNSt12_Bind_simpleIFZ4mainEUlvE_vEEclEv
    @           0x406f3c  _ZNSt6thread5_ImplISt12_Bind_simpleIFZ4mainEUlvE_vEEE6_M_runEv
    @     0x7fc7d26e9a40  (unknown)
    @     0x7fc7d1c2e182  start_thread
    @     0x7fc7d215747d  (unknown)
    @              (nil)  (unknown)
Aborted (core dumped)`

Here's the function that I'm using to build the IPConfig object:

HTTPServer::IPConfig buildIpConfig(const string &ip, const uint32_t &port, const Protocol &protocol)
{
    SSLContextConfig sslCfg;
    sslCfg.isDefault = true;
    sslCfg.setCertificate(FLAGS_sslcrt, FLAGS_sslkey, FLAGS_sslkeypass);
    sslCfg.sslVersion = folly::SSLContext::SSLVersion::TLSv1;

    HTTPServer::IPConfig ipCfg(SocketAddress(ip, port, true), protocol);
    ipCfg.sslConfigs.push_back(std::move(sslCfg));

    return std::move(ipCfg);
}

where FLAGS_sslcrt is the certificate, FLAGS_sslkey is the private key in PEM format, and FLAGS_sslkeypass is the password to the private key.

Below is the code that I use to create the parameter passed to HTTPServer::bind():

std::vector<HTTPServer::IPConfig> IPs;
IPs.push_back(buildIpConfig(FLAGS_ip, FLAGS_http_port, Protocol::HTTP));
IPs.push_back(buildIpConfig(FLAGS_ip, FLAGS_spdy_port, Protocol::SPDY));

I based my code on proxygen/httpserver/tests/HTTPServerTest.cpp

Activity

  1. vishar0 commented on Jul 5, 2015

    @vishar0

    @djwatson, looks like this is related to ServerBootstrap. Could you look into this?

  2. afrind commented on Jul 16, 2015

    @afrind
    Contributor

    @djwatson is off the grid for a while. I will try to take a look.

  3. afrind commented on Sep 21, 2015

    @afrind
    Contributor

    @djwatson claims this was recently fixed. I'll close out after our next push.

  4. afrind commented on Sep 28, 2015

    @afrind
    Contributor

    Please try again with the latest.

  5. keithmendozasr commented on Sep 30, 2015

    @keithmendozasr
    Author

    I'll give it a try in the next few weeks, and I'll provide an update whether it's fixed or not.

  6. added a commit that references this issue on Jun 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions