krime / serf

Automatically exported from code.google.com/p/serf
Apache License 2.0
1 stars 0 forks source link

static void init_ssl_libraries(void) has a race condition in a multithreaded application #39

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
Start multiple subversion client commands in multiple threads at the same 
time with serf enabled.

What is the expected output? What do you see instead?
I think I see multiple openssl initialization calls running at the same 
time; Resulting in serveral different crashtypes

What version of the product are you using? On what operating system?
trunk on windows Vista

Please provide any additional information below.

The workaround is probably using something like svn_atomic__init_once 
(based on a few apr method) instead of testing if an integer is set.

I can provide a patch, but would like some input on how you would like to 
see it resolved? (Copy&pasting the synchronization code from subversion 
doesn't seem a good idea)

Original issue reported on code.google.com by bhuijben on 27 Aug 2008 at 10:15

GoogleCodeExporter commented 9 years ago
(The race condition is that another initialization can start while the first is 
not 
finished; there has to be some kind of delay while the first initializer is 
still 
running)

Original comment by bhuijben on 27 Aug 2008 at 10:18

GoogleCodeExporter commented 9 years ago
Fixed in r1209.

Original comment by justin.e...@gmail.com on 30 Dec 2008 at 6:53