summaryrefslogtreecommitdiff
path: root/doc/src
diff options
context:
space:
mode:
authorJan UrbaƄski <wulczer@wulczer.org>2015-02-17 10:48:18 +0100
committerDaniele Varrazzo <daniele.varrazzo@gmail.com>2015-05-03 12:27:36 +0100
commita59704cf93e8594dfe59cf12d416e82a816953a4 (patch)
tree84d1ec1f60d3e97f196da4fdeadc4257815a03ea /doc/src
parent1b7e3c6da4017fb40eff5d2d59531d7254e13fd0 (diff)
downloadpsycopg2-a59704cf93e8594dfe59cf12d416e82a816953a4.tar.gz
Make sure libcrypto threadsafety callbacks are properly set up
Multithreaded programs using libcrypto (part of OpenSSL) need to set up callbacks to ensure safe execution. Both Python and libpq set up those callbacks, which might lead to a conflict. To avoid leaving dangling function pointers when being unloaded, libpq sets up and removes the callbacks every time a SSL connection it opened and closed. If another Python thread is performing unrelated SSL operations (like connecting to a HTTPS server), this might lead to deadlocks, as described in http://www.postgresql.org/message-id/871tlzrlkq.fsf@wulczer.org Even if the problem will be remediated in libpq, it's still useful to have it fixed in psycopg2. The solution is to use Python's own libcrypto callbacks and completely disable handling them in libpq.
Diffstat (limited to 'doc/src')
0 files changed, 0 insertions, 0 deletions