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 core dump on python:3.5.3-alpine #177

Closed
austinnichols101 opened this issue Feb 20, 2017 · 6 comments
Closed

psycopg2 core dump on python:3.5.3-alpine #177

austinnichols101 opened this issue Feb 20, 2017 · 6 comments

Comments

@austinnichols101
Copy link

I have a specific query that triggers a Segmentation fault (core dumped) when running on python:3.5.3-alpine. If I attempt the same query using an (otherwise identical, minimal difference) image based on python:3.5.3 (non-alpine), the behavior does not occur.

I have a core dump, but there's not much info inside. I'm looking for assistance in next steps to capture the data necessary to investigate further.

The evidence points to a potential problem with the psycopg2 library on alpine.

@yosifkit
Copy link
Member

In the python image, the python source is downloaded and compiled. Perhaps there is something missing to make psycopg2 work correctly with musl libc. Can you reproduce it on other versions of python? Can you reproduce it on the Alpine provided python package either from the alpine:3.4 or alpine:3.5 image? Both Alpine 3.4 and 3.5 have python 3.5.2 available with just local distro packaging revision changes between the two.

FROM alpine:3.4
# FROM alpine:3.5
RUN apk add --no-cache python3
# other deps 

@austinnichols101
Copy link
Author

austinnichols101 commented Feb 20, 2017

Test Results:

  • Same symptoms using python:3.4.6-alpine
  • Could not test on python:3.3.6 due to minimum python version requirements
  • Testing with alpine:3.4. I had to include python3-dev in order to install psycopg2. Once installed, I saw the same symptoms at with the python.xxx-alpine images.

@yosifkit
Copy link
Member

I'm assuming you are just pip installing psycopg2; have you tried the Alpine package py3-psycopg2 with the Alpine python3? It's only available in Alpine 3.5 and edge.

@austinnichols101
Copy link
Author

@yosifkit - funny you should mention that. I just tried with py3-psycopg2 and much to my surprise I do not see the problem. I'm reaching out to the psycopg2 team for further comment.

Thanks!

@austinnichols101
Copy link
Author

Further update - We built the latest psycopg2 source on Alpine and all tests passed. We were again able to reproduce the issue. Will be checking the core dump for additional clues.

@austinnichols101
Copy link
Author

This appears to be the same issue as #211 (the alpine 3.7 fix seems to work).

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

No branches or pull requests

2 participants