[Boost-bugs] [Boost C++ Libraries] #10212: Don't protect calls to SSL_accept by a static mutex

Subject: [Boost-bugs] [Boost C++ Libraries] #10212: Don't protect calls to SSL_accept by a static mutex
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2014-07-17 15:11:27


#10212: Don't protect calls to SSL_accept by a static mutex
-------------------------------------------+----------------------------
 Reporter: Sergei Nikishin <nordsturm@…> | Owner: chris_kohlhoff
     Type: Patches | Status: new
Milestone: To Be Determined | Component: asio
  Version: Boost 1.54.0 | Severity: Problem
 Keywords: |
-------------------------------------------+----------------------------
 Since this commit:
 commit ad1c1008321e9b14779816ae19dfaa261c2de293
 Author: Christopher Kohlhoff <chris_at_[hidden]>
 Date: Fri Mar 18 00:25:54 2011 +0000

     New SSL implementation.


     [SVN r70096]

 calls to SSL_connect are not protected by ssl_mutex_, but calls to
 SSL_accept are wrapped by a lock.

 I have a http/websocket server application which is extremelly slow in
 processing requests over a secured connection (about 700 RPS). Under peak
 load (3K RPS) all threads are waiting for the mutex (for example, 10
 threads which are calling to io_service::run()).

 For every instance of io_service I use a single ssl_context.

 I'm uploading a patch I use to solve this problem. I have tested it under
 load for 5-6 months and I have no problems with using SSL_accept without
 this mutex so I propose the patch.

-- 
Ticket URL: <https://svn.boost.org/trac/boost/ticket/10212>
Boost C++ Libraries <http://www.boost.org/>
Boost provides free peer-reviewed portable C++ source libraries.

This archive was generated by hypermail 2.1.7 : 2017-02-16 18:50:16 UTC