Lighthouse has a new layout. Prefer the old one? Return to the old layout, and switch back any time from the link at the top of each page.

This project is archived and is in readonly mode.

segfault reading isolation_level on closed connection

#74

It happens with version 2.4.2 (from PyPI) on Ubuntu x86_64.

dsn = 'host=127.0.0.1 port=xxxxx user=xxxxxx password=xxxxxx dbname=xxxxxx'
import psycopg2 as pg
print pg.__version__
cnx = pg.connect(dsn=dsn)
cnx.close()
cnx.isolation_level

Output:

  2.4.2 (dt dec pq3 ext)
  Segmentation fault

Reported by flox · November 4th, 2011 @ 11:51 PM

State: resolved
Milestone: none
Assigned to: nobody

Activity

  1. flox
    flox
    >>> sys.version
    '2.6.6 (r266:84292, Sep 15 2010, 16:22:56) \n[GCC 4.4.5]'
    

    November 4th, 2011 @ 11:52 PM

  2. flox
    flox

    Seems fixed with the @devel branch.

    
    >>> 
    >>> import psycopg2 as pg
    >>> print pg.__version__
    2.4.3.dev0 (dt dec pq3 ext)
    >>> cnx = pg.connect(dsn=dsn)
    >>> cnx.close()
    >>> cnx.isolation_level
    Traceback (most recent call last):
      File "<stdin>", line 1, in <module>
    psycopg2.OperationalError: connection pointer is NULL
    
    >>>
    

    November 6th, 2011 @ 01:36 AM

  3. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from new to open

    Yes, but there is still a missing check somewhere: it needs a better message. Thanks for reporting.

    November 16th, 2011 @ 10:04 AM

  4. Daniele Varrazzo
    Daniele Varrazzo
    • State changed from open to resolved

    Bug fixed, added proper check for connection closed, thank you for the report.

    By the way, sorry for having made you wait 10 days: I don't receive email notification for new tickets opened by Lighthouse users, but I receive them from bugs open on the web interface. I've reported the issue one year ago (http://help.lighthouseapp.com/discussions/problems/2122-email-notif...) but it hasn't been fixed yet.

    November 16th, 2011 @ 11:58 PM