Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

acquire a global lock to init the OpenSSL singleton locks #2336

Closed
wants to merge 3 commits into from

Conversation

reaperhulk
Copy link
Member

...then init the library since we really only want to do that once anyway

This approach was suggested in #2299. Of note, in a subinterpreter environment a "random" subinterpreter will register the static locks and engine. This means it will contain the Python callbacks for them. If the subinterpreter is subsequently destroyed, do the locks and random engine continue to function? If not, this solution will not work.

This should be considered WIP until we have a solid answer to the above.

@codecov-io
Copy link

Current coverage is 99.98%

Merging #2336 into master will not affect coverage as of db77358

@@            master   #2336   diff @@
======================================
  Files          118     118       
  Stmts        12133   12139     +6
  Branches      1336    1336       
  Methods          0       0       
======================================
+ Hit          12131   12137     +6
  Partial          2       2       
  Missed           0       0       

Review entire Coverage Diff as of db77358

Powered by Codecov. Updated on successful CI builds.

imp.acquire_lock()
Binding.init_static_locks()
Binding._ensure_ffi_initialized()
imp.release_lock()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should definitely be inside of a finally block. I still need to think of any of this makes sense though :-)

@reaperhulk
Copy link
Member Author

Since this doesn't work I'm closing it. We'll do what's in #2446 probably but a complete fix is still elusive.

@reaperhulk reaperhulk closed this Oct 26, 2015
@reaperhulk reaperhulk deleted the imp-locks branch March 8, 2016 01:19
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Aug 30, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Development

Successfully merging this pull request may close these issues.

4 participants