Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-08-01 Thread Christoph Haas
On Monday 31 July 2006 18:02, Piotr Ozarowski wrote:
 Christoph Haas ([EMAIL PROTECTED]):
  I'm puzzled. :(

 so am I, sorry :(

 Could you try upgrading sqlalchemy to 0.2.6?
 It will not help probably, but it's worth the shot.

Same result indeed.

I tried a stack backtrace with electric fence thanks to tips on #python. 
This is the actual stack:

(gdb) bt
#0  0x4010e174 in strcpy () from /lib/libc.so.6
#1  0x43351431 in ?? () 
from /usr/lib/python2.3/site-packages/psycopgmodule.so
#2  0x434e1ff8 in ?? ()
#3  0x419b1f94 in ?? ()
#4  0x43358194 in ?? () 
from /usr/lib/python2.3/site-packages/psycopgmodule.so
#5  0x4335a1a0 in ?? () 
from /usr/lib/python2.3/site-packages/psycopgmodule.so
#6  0xbfffd60c in ?? ()
#7  0xbfffd608 in ?? ()
#8  0xbfffd5fc in ?? ()
#9  0xbfffd5f8 in ?? ()
#10 0xbfffd604 in ?? ()
#11 0xbfffd600 in ?? ()
#12 0xbfffd5f4 in ?? ()
#13 0xbfffd618 in ?? ()
#14 0xbfffd614 in ?? ()
#15 0xbfffd610 in ?? ()
#16 0xbfffd618 in ?? ()
#17 0x0806d3d7 in PyList_AsTuple ()
#18 0x08057e17 in PyObject_Call ()
#19 0x080b2470 in PyEval_GetFuncName ()
#20 0x080b4a25 in PyEval_EvalCodeEx ()
#21 0x080b36c1 in PyEval_GetFuncName ()
#22 0x080b37a0 in PyEval_GetFuncName ()
#23 0x080b37a0 in PyEval_GetFuncName ()
#24 0x080b4a25 in PyEval_EvalCodeEx ()
#25 0x080f65c9 in PyClassMethod_New ()
#26 0x08057e17 in PyObject_Call ()
#27 0x0805d1de in PyClass_IsSubclass ()
#28 0x08057e17 in PyObject_Call ()
#29 0x0808a01b in PyType_GenericAlloc ()
#30 0x0808cfe3 in _PyObject_SlotCompare ()
#31 0x08057e17 in PyObject_Call ()
#32 0x080b066f in PyEval_GetFuncName ()
#33 0x080b37a0 in PyEval_GetFuncName ()
#34 0x080b37a0 in PyEval_GetFuncName ()
#35 0x080b37a0 in PyEval_GetFuncName ()
#36 0x080b4a25 in PyEval_EvalCodeEx ()
#37 0x080f6695 in PyClassMethod_New ()
#38 0x08057e17 in PyObject_Call ()
#39 0x0805d1de in PyClass_IsSubclass ()
#40 0x08057e17 in PyObject_Call ()
#41 0x0808a01b in PyType_GenericAlloc ()
#42 0x0808cfe3 in _PyObject_SlotCompare ()
#43 0x08057e17 in PyObject_Call ()
#44 0x080b2470 in PyEval_GetFuncName ()
#45 0x080b4a25 in PyEval_EvalCodeEx ()
#46 0x080b36c1 in PyEval_GetFuncName ()
#47 0x080b4a25 in PyEval_EvalCodeEx ()
#48 0x080f6695 in PyClassMethod_New ()
#49 0x08057e17 in PyObject_Call ()
#50 0x080b2470 in PyEval_GetFuncName ()
#51 0x080b4a25 in PyEval_EvalCodeEx ()
#52 0x080b36c1 in PyEval_GetFuncName ()
#53 0x080b4a25 in PyEval_EvalCodeEx ()
#54 0x080b36c1 in PyEval_GetFuncName ()
#55 0x080b4a25 in PyEval_EvalCodeEx ()
#56 0x080b4ab9 in PyEval_EvalCode ()
#57 0x080d5047 in PyRun_FileExFlags ()
#58 0x080d5244 in PyRun_SimpleFileExFlags ()
#59 0x08054fbf in Py_Main ()
#60 0x08054992 in main ()


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-08-01 Thread Piotr Ozarowski
Just wondering... could you check that psycopg is working at all
(without sqlalchemy)

try to test it with this code:

 #!/usr/bin/python
 from psycopg import connect
 conn = connect(dbname=xxx user=yyy password=zzz)
 curs = conn.cursor()
 curs.execute(CREATE TABLE testtable(testcolumn char(8)))
 curs.execute(INSERT INTO testtable VALUES ('a'))

-- 
-=[ Piotr Ozarowski ]=-
-=[ http://www.ozarowski.pl ]=-


pgp1xlZksUYMq.pgp
Description: PGP signature


Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-08-01 Thread Christoph Haas
On Tuesday 01 August 2006 13:30, Piotr Ozarowski wrote:
 Just wondering... could you check that psycopg is working at all
 (without sqlalchemy)

 try to test it with this code:

  #!/usr/bin/python
  from psycopg import connect
  conn = connect(dbname=xxx user=yyy password=zzz)
  curs = conn.cursor()
  curs.execute(CREATE TABLE testtable(testcolumn char(8)))
  curs.execute(INSERT INTO testtable VALUES ('a'))

I added a conn.commit() at the end because otherwise nothing happened. 
The script ran well and did what is was supposed to. Both with or without 
psycopg2.

 Christoph


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-08-01 Thread Christoph Haas
Another addition... just for show and tell I installed a plain Etch system 
with todays installer. The problem didn't appear here. So it must be 
something on the updated system from Sarge.

At least it's not a general problem because I can't reproduce it on a fresh 
installation.

 Christoph


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-07-31 Thread Christoph Haas
Package: python-sqlalchemy
Version: 0.2.3-0.1
Severity: normal

The current Etch version of python-sqlalchemy does not seem to be
able to connect to PostgreSQL when python-psycopg is installed (as
Suggested:) but python-psycopg2 is not.

Error message:
*** glibc detected *** malloc(): memory corruption: 0x0818ee38 ***

However when python-psycopg2 is installed, too, then the program runs
well.

-- System Information:
Debian Release: testing/unstable
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)
Shell:  /bin/sh linked to /bin/bash
Kernel: Linux 2.4.27
Locale: LANG=de_DE.UTF-8, LC_CTYPE=de_DE.UTF-8 (charmap=UTF-8) (ignored: LC_ALL 
set to de_DE.UTF-8)

Versions of packages python-sqlalchemy depends on:
ii  python2.3.5-11   An interactive high-level object-o
ii  python-central0.5.1  register and build utility for Pyt

python-sqlalchemy recommends no packages.

-- no debconf information


-- 
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of unsubscribe. Trouble? Contact [EMAIL PROTECTED]



Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-07-31 Thread Piotr Ozarowski
Christoph Haas ([EMAIL PROTECTED]):
 The current Etch version of python-sqlalchemy does not seem to be
 able to connect to PostgreSQL when python-psycopg is installed (as
 Suggested:) but python-psycopg2 is not.
 
 Error message:
 *** glibc detected *** malloc(): memory corruption: 0x0818ee38 ***
 
 However when python-psycopg2 is installed, too, then the program runs
 well.

I have downgraded my python-sqlalchemy package version to 0.2.3, removed
python-psycopg2 (2.0.2-1) package (python-psycopg in version 1.1.21-9 is
still installed) and my app. *still* works with PostgreSQL 8.1 (8.1.4-5)

Could you provide more info?
-- 
-=[ Piotr Ozarowski ]=-
-=[ http://www.ozarowski.pl ]=-


pgpprNmQ7346f.pgp
Description: PGP signature


Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-07-31 Thread Christoph Haas
On Monday 31 July 2006 15:03, you wrote:
 Christoph Haas ([EMAIL PROTECTED]):
  The current Etch version of python-sqlalchemy does not seem to be
  able to connect to PostgreSQL when python-psycopg is installed (as
  Suggested:) but python-psycopg2 is not.
 
  Error message:
  *** glibc detected *** malloc(): memory corruption: 0x0818ee38 ***
 
  However when python-psycopg2 is installed, too, then the program runs
  well.

 I have downgraded my python-sqlalchemy package version to 0.2.3, removed
 python-psycopg2 (2.0.2-1) package (python-psycopg in version 1.1.21-9 is
 still installed) and my app. *still* works with PostgreSQL 8.1 (8.1.4-5)

 Could you provide more info?

I will try. The error happens when running the First Steps demo program
at http://www.rmunn.com/sqlalchemy-tutorial/tutorial.html exactly at the
users.create() statement.

The connection string looks a bit different here though:

  db = create_engine('postgres://username:[EMAIL PROTECTED]:5432/mydatabase')

I have postgresql-8.1 (8.1.4-4) installed. It's a Sarge server that I
dist-ugpraded to Etch today.

It happens both with python2.3 and python2.4.

The last lines of an strace of this program:

open(/usr/lib/python23.zip/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python23.zip/psycopg2module.so, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python23.zip/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python23.zip/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
stat64(/usr/lib/python2.3/psycopg2, 0xbfffbd0c) = -1 ENOENT (No such file or 
directory)
open(/usr/lib/python2.3/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python2.3/psycopg2module.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/usr/lib/python2.3/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python2.3/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = -1 ENOENT (No 
such file or directory)
stat64(/usr/lib/python2.3/plat-linux2/psycopg2, 0xbfffbd0c) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python2.3/plat-linux2/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/plat-linux2/psycopg2module.so, O_RDONLY|O_LARGEFILE) 
= -1 ENOENT (No such file or directory)
open(/usr/lib/python2.3/plat-linux2/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/plat-linux2/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
stat64(/usr/lib/python2.3/lib-tk/psycopg2, 0xbfffbd0c) = -1 ENOENT (No such 
file or directory)
open(/usr/lib/python2.3/lib-tk/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/usr/lib/python2.3/lib-tk/psycopg2module.so, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/lib-tk/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 ENOENT 
(No such file or directory)
open(/usr/lib/python2.3/lib-tk/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
stat64(/usr/lib/python2.3/lib-dynload/psycopg2, 0xbfffbd0c) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python2.3/lib-dynload/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/lib-dynload/psycopg2module.so, O_RDONLY|O_LARGEFILE) 
= -1 ENOENT (No such file or directory)
open(/usr/lib/python2.3/lib-dynload/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/lib-dynload/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
stat64(/usr/local/lib/python2.3/site-packages/psycopg2, 0xbfffbd0c) = -1 
ENOENT (No such file or directory)
open(/usr/local/lib/python2.3/site-packages/psycopg2.so, 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(/usr/local/lib/python2.3/site-packages/psycopg2module.so, 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(/usr/local/lib/python2.3/site-packages/psycopg2.py, 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(/usr/local/lib/python2.3/site-packages/psycopg2.pyc, 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
stat64(/usr/lib/python2.3/site-packages/psycopg2, 0xbfffbd0c) = -1 ENOENT (No 
such file or directory)
open(/usr/lib/python2.3/site-packages/psycopg2.so, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/site-packages/psycopg2module.so, 
O_RDONLY|O_LARGEFILE) = -1 ENOENT (No such file or directory)
open(/usr/lib/python2.3/site-packages/psycopg2.py, O_RDONLY|O_LARGEFILE) = -1 
ENOENT (No such file or directory)
open(/usr/lib/python2.3/site-packages/psycopg2.pyc, O_RDONLY|O_LARGEFILE) = 
-1 ENOENT (No such file or directory)
stat64(/usr/lib/python2.3/site-packages/Numeric/psycopg2, 0xbfffbd0c) = -1 
ENOENT (No such 

Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-07-31 Thread Piotr Ozarowski
What version of libkrb53 package do you have? (mine's 1.4.3-8)

$ diff firststeps_with_psycopg_strace_output 
firststeps_with_psycopg2_strace_output

shows that /usr/lib/libkrb5support.so.0 could be the one causing
problems (in both cases example worked fine on my machine)

-- 
-=[ Piotr Ozarowski ]=-
-=[ http://www.ozarowski.pl ]=-


pgpn64ztImp1A.pgp
Description: PGP signature


Bug#380622: malloc(): memory corruption when using psycopg instead of psycopg2

2006-07-31 Thread Piotr Ozarowski
Christoph Haas ([EMAIL PROTECTED]):
 I'm puzzled. :(

so am I, sorry :(

Could you try upgrading sqlalchemy to 0.2.6?
It will not help probably, but it's worth the shot.

-- 
-=[ Piotr Ozarowski ]=-
-=[ http://www.ozarowski.pl ]=-


pgp4UW0esxE2c.pgp
Description: PGP signature