[ python-Bugs-1581906 ] test_sqlite fails on OSX G5 arch if test_ctypes is run

SourceForge.net noreply at sourceforge.net
Sat Jun 30 01:37:47 CEST 2007


Bugs item #1581906, was opened at 2006-10-21 18:02
Message generated for change (Comment added) made by marketdickinson
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: Python Library
Group: Python 2.6
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: Skip Montanaro (montanaro)
Assigned to: Skip Montanaro (montanaro)
Summary: test_sqlite fails on OSX G5 arch if test_ctypes is run

Initial Comment:
I noticed a test_sqlite test failure on my Mac G5 the other day while trying 
to set up a buildbot for sqlalchemy.  Everything runs fine on my G4 
powerbook.  Both machines run Mac OSX 10.4.8 with Apple's gcc 4.0.0, 
build 5026.

I whittled the problem down to just having test_ctypes and test_sqlite 
enabled, then further whittled it down to just having Lib/ctypes/test/
test_find.py available (all other ctypes tests eliminated).  More detailed 
problem descriptions are in these two postings to python-dev:

    http://article.gmane.org/gmane.comp.python.devel/84478
    http://article.gmane.org/gmane.comp.python.devel/84481

Skip


----------------------------------------------------------------------

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 23:37

Message:
Logged In: YES 
user_id=703403
Originator: NO

And also on Python 2.5, compiled under Apple's GCC. (Still OS X
10.4.10/G4)
The following four lines of Python code are enough to cause the problem
for me.

Interestingly, if the second and third lines are exchanged (so that the
two import commands come first), then no exception is raised.

Python 2.5.1 (r251:54863, May 10 2007, 20:59:25) 
[GCC 4.0.1 (Apple Computer, Inc. build 5367)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> from ctypes import CDLL
>>>
CDLL('/System/Library/Frameworks/GLUT.framework/GLUT').glutWireTetrahedron
<_FuncPtr object at 0x514500>
>>> import sqlite3
>>> sqlite3.connect(":memory:")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
sqlite3.ProgrammingError: library routine called out of sequence



----------------------------------------------------------------------

Comment By: Mark Dickinson (marketdickinson)
Date: 2007-06-29 19:11

Message:
Logged In: YES 
user_id=703403
Originator: NO

I've just noticed the same failure on an iBook G4, with OS X 10.4.10,
sqlite version 3.4.0, 
and Python built with gcc 4.2.0 (from macports).

(Python 2.6a0 (trunk:56123M, Jun 29 2007, 13:22:18) 
[GCC 4.2.0] on darwin)




----------------------------------------------------------------------

Comment By: ted pollari (incongruity)
Date: 2007-06-13 20:19

Message:
Logged In: YES 
user_id=1375728
Originator: NO

FWIW, I'm getting an identical error on a MacBook Pro with a Core Duo
processor

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2007-05-04 14:04

Message:
Logged In: YES 
user_id=11105
Originator: NO

FYI, this PyOpenGL bug may be related:

https://sourceforge.net/tracker/?func=detail&atid=105988&aid=1712741&group_id=5988

----------------------------------------------------------------------

Comment By: Thomas Heller (theller)
Date: 2007-03-22 20:18

Message:
Logged In: YES 
user_id=11105
Originator: NO

Skip,

I do not have a G5 machine available, only a G4 and the problem doesn't
appear there.
For someone with a G5 it should not be too difficult to reproduce (or
investigate),
I think that running './python Lib/test/regrtest.py test_ctypes
test_sqlite' should suffice.

However, if loading the GLUT library changes the cwd, and sqlite fails
with a changed working dir,
I'm not sure where the problem really is and how it should be fixed.  It
could be said that test_ctypes
should restore the cwd after the tests (but maybe this should be done by
the test framework?),
or it could be said that test_sqlite should set the cwd in case the test
relies on it.

I'll assign back to you because I have no way to test it on a machine
where the problem appears.

----------------------------------------------------------------------

Comment By: Skip Montanaro (montanaro)
Date: 2007-03-18 17:20

Message:
Logged In: YES 
user_id=44345
Originator: YES

Thomas, I assigned this to you simply so you can cast your eye on the
problem and see if you think there might be anything ctypes-related in the
problem I've reported.  I've ignored it up 'til now, but I bumped up
against it again trying to get the Pybots SQLAlchemy test suite running on
my Mac.  During my previous encounter with this problem Ronald Oussouren
reported on a possible connection with GLUT:

    http://mail.python.org/pipermail/python-dev/2006-October/069523.html

Assuming there is no obvious ctypes connection you can determine  (it's
not clear to me that there is any current directory funny business going
on) just assign it back to me and I'll try to find a pysqlite expert to
take a look.

Thx,

Skip


----------------------------------------------------------------------

Comment By: Skip Montanaro (montanaro)
Date: 2006-10-21 18:04

Message:
Logged In: YES 
user_id=44345

Another article here:

    http://article.gmane.org/gmane.comp.python.devel/84487


----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=105470&aid=1581906&group_id=5470


More information about the Python-bugs-list mailing list