[Boost-bugs] [Boost C++ Libraries] #3605: Boost.Asio: Deadlock during WSAStartup

Subject: [Boost-bugs] [Boost C++ Libraries] #3605: Boost.Asio: Deadlock during WSAStartup
From: Boost C++ Libraries (noreply_at_[hidden])
Date: 2009-11-11 09:31:00

#3605: Boost.Asio: Deadlock during WSAStartup
 Reporter: ulrich.kroemer@… | Owner: chris_kohlhoff
     Type: Bugs | Status: new
Milestone: Boost 1.41.0 | Component: asio
  Version: Boost 1.40.0 | Severity: Problem
 Keywords: deadlock asio WSAStartup |
 I am experiencing spurios deadlocks during static initialization of the
 do_init global instance (win_sock_init.hpp).

 The scenario is this:
 I am using a static library version of Boost.Asio, which means that once
 my .dll gets loaded, the do_init global instance is initialized and a call
 to WSAStartup is made.

 At the same time a different thread of the application is already in a
 call to WSAStartup and already holds the critical section inside the
 WSAStartup function. Now inside that critical section a call to load the
 old winsock.dll is made and so the other thread tries to gain the loader
 lock, which my thread currently is the owner of. Therefore the application

 I know that this might actually be a problem of WSAStartup all together,
 however due to the static initialization there is no workaround to the
 problem, as the time when the call to WSAStartup is made can't be

Ticket URL: <https://svn.boost.org/trac/boost/ticket/3605>
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:01 UTC