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

psycopg2 version depends on old libssl #4837

Closed
bzar opened this issue Jun 12, 2019 · 0 comments · Fixed by #4841
Closed

psycopg2 version depends on old libssl #4837

bzar opened this issue Jun 12, 2019 · 0 comments · Fixed by #4841
Assignees

Comments

@bzar
Copy link
Contributor

bzar commented Jun 12, 2019

CKAN Version if known (or site URL)

2.8.2

Please describe the expected behaviour

CKAN works with up-to-date libssl

Please describe the actual behaviour

psycopg segfaults if running environment has libssl 1.1 or newer:

#0  0x00007f662989ac1b in ssl3_cleanup_key_block ()
   from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/./libssl-fad88670.so.1.0.2l
#1  0x00007f6629898516 in ssl3_clear ()
   from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/./libssl-fad88670.so.1.0.2l
#2  0x00007f66298a40a9 in tls1_clear ()
   from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/./libssl-fad88670.so.1.0.2l
#3  0x00007f663ecb79d2 in SSL_new () from target:/usr/lib/x86_64-linux-gnu/libssl.so.1.1
#4  0x00007f6629b2f389 in ?? () from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/libpq-909a53d8.so.5.10
#5  0x00007f6629b30925 in ?? () from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/libpq-909a53d8.so.5.10
#6  0x00007f6629b1a600 in PQconnectPoll ()
   from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/libpq-909a53d8.so.5.10
#7  0x00007f6629b1b099 in ?? () from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/libpq-909a53d8.so.5.10
#8  0x00007f6629b1de9f in PQconnectdb ()
   from target:/usr/lib/ckan/default/lib/python2.7/site-packages/psycopg2/.libs/libpq-909a53d8.so.5.10
#9  0x00007f6629d6e4d1 in _conn_sync_connect (self=0x7f662a1baa10) at psycopg/connection_int.c:716
#10 conn_connect (self=self@entry=0x7f662a1baa10, async=<optimized out>) at psycopg/connection_int.c:812
...

Notice the two libssl versions. A related psycopg2 issue: psycopg/psycopg2#543

What steps can be taken to reproduce the issue?

Install libssl 1.1 on server, restart apache2 and try to open the front page.

The issue can be resolved by updating to psycopg2==2.8.2

@amercader amercader self-assigned this Jun 13, 2019
bzar added a commit to bzar/ckan that referenced this issue Jun 14, 2019
amercader added a commit that referenced this issue Jul 1, 2019
amercader added a commit that referenced this issue Jul 1, 2019
Some users might find libssl issues (see #4837) for which an upgrade in
psycopg2 is required. While we are not porting the requirement upgrade
to 2.8, we make this change which is backwards compatible with psycopg2
2.7.3.2 (CKAN 2.8 pinned version) in case someone needs to upgrade the
requirement in their environment.

Just in case we fall back to the old syntax if there is an
AttributeError.
amercader added a commit that referenced this issue May 14, 2021
Some users might find libssl issues (see #4837) for which an upgrade in
psycopg2 is required. While we are not porting the requirement upgrade
to 2.8, we make this change which is backwards compatible with psycopg2
2.7.3.2 (CKAN 2.8 pinned version) in case someone needs to upgrade the
requirement in their environment.

Just in case we fall back to the old syntax if there is an
AttributeError.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants