Re: FW: segfault on psycopg2 on CentOS

From: Daniele Varrazzo <daniele(dot)varrazzo(at)gmail(dot)com>
To: Ed Davison <EDavison(at)getmns(dot)com>
Cc: "psycopg(at)postgresql(dot)org" <psycopg(at)postgresql(dot)org>
Subject: Re: FW: segfault on psycopg2 on CentOS
Date: 2015-03-11 15:28:43
Message-ID: CA+mi_8YGKQJRxTYWuDMgOM7CYF+6WDo1nQQ6a0PycFBgMUoBAw@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: psycopg

On Wed, Mar 11, 2015 at 2:47 PM, Ed Davison <EDavison(at)getmns(dot)com> wrote:

>> # trying
>> /opt/python2.7.8/lib/python2.7/site-packages/psycopg2/_psycopg.so
>> dlopen("/opt/python2.7.8/lib/python2.7/site-packages/psycopg2/_psycopg
>> .so", 2); Segmentation fault
>>
>> I have tested this with python2.7 to just simply load the psycopg2 library with the import statement and just loading the library causes a segfault as earlier stated in my backtrace.
>
> To follow up on Danieles comment:
>
> 1) Are you running in a virtualenv?
> No, I am not.
>
> 2) Do you have more than one installation of Python?
> Yes, I have python 2.7.8 and python 2.4.3. Running on CentOS 5.9 there is no package for upgrading the main and only version to anything newer.
>
> 3) More to the point what does python2.7 point to?
> # ls -al /usr/bin/python2.7
> lrwxrwxrwx 1 root root 30 Nov 10 15:55 /usr/bin/python2.7 -> /opt/python2.7.8/bin/python2.7

This is a bit messed up. Either your Python environment is
inconsistent or it is WRT when psycopg was compiled. If you wanted to
investigate further maybe an "ldd /path/to/_psycopg.so" would suggest
you something.

What you may try to do is to create a virtualenv and pip install
psycopg2 into it, which would compile a fresh copy.

-- Daniele

In response to

Browse psycopg by date

  From Date Subject
Next Message Adrian Klaver 2015-03-11 20:20:01 Re: segfault on psycopg2 on CentOS
Previous Message Ed Davison 2015-03-11 14:51:02 Re: segfault on psycopg2 on CentOS