Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 143849 - dev-python/mysql-python - InterfaceError with dev-db/mysql 4.1.21
Summary: dev-python/mysql-python - InterfaceError with dev-db/mysql 4.1.21
Status: RESOLVED INVALID
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: New packages (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Python Gentoo Team
URL: http://sourceforge.net/tracker/index....
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-08-13 22:01 UTC by Alex V. Koval
Modified: 2006-12-03 21:42 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex V. Koval 2006-08-13 22:01:52 UTC
Hello,

After latest security upgrade of MySQL (4.1.20 to 4.1.21) I started
experiencing connection loss problems in all my Zope based servers. Althrough,
it looks like the actual problems are deeper, and lie somewhere in mysql-python
bindings.

All my servers are running Gentoo. We have tested 4.1.21 on development system,
and when we found no errors, we upgraded all production servers, and then, under
bigger load the problem started to appear.

I explained it here:
http://sourceforge.net/tracker/index.php?func=detail&aid=1539290&group_id=22307&atid=374932

python 2.4
affected zope versions: 2.7.8, 2.8.4
affected mysql-python: 1.2.0, 1.2.0-r1
zmysqlda: 2.0.8-r1

In short, it seems that connection get lost
and did not restarts automatically. I can see connection in
mysql 'show processlist' but the connection is dead - when attempting
issue the query, I get:

Traceback (innermost last):
  Module ZPublisher.Publish, line 101, in publish
  Module ZPublisher.mapply, line 88, in mapply
  Module ZPublisher.Publish, line 39, in call_object
  Module Shared.DC.ZRDB.Connection, line 115, in manage_test
  Module Products.ZMySQLDA.db, line 284, in query
InterfaceError: (0, '')

Products.ZMySQLDA.db, line 284
------------------------------


281                if qtype == "SELECT" and max_rows:
282                    qs = "%s LIMIT %d" %
(qs,max_rows)
283                    r=0
284                db.query(qs)
285                c=db.store_result()
286                if desc is not None:
287                    if c and (c.describe() != desc):

--
db defined at top as:
        self.db=apply(self.Database_Connection, (), kwargs)

--
self.Database_Connection is     Database_Connection=_mysql.connect

apparently since its somewhere in C code, I have no time and not very 
experienced into debugging problems in MySQL C code. 

I have downgraded to mysql-4.1.20 on all production servers since it
became impossible to work - our servers were stopping functioning
2-3 times per day.

I understand that 4.1.20 is marked as 'security problematic' ebuild in 
 200608-09 [N] MySQL: Denial of Service ( dev-db/mysql )

and in fact its why it has been upgraded.

Do you have any hint how to enable debugging in MySQL daemon to see
what happens inside of it so it returns InterfaceError?

Any additional info you need from me? It happend in 4 different servers with 
different arch (x86, amd64) so it seems to be unrelated to the installation.

Alex
Comment 1 Luca Longinotti (RETIRED) gentoo-dev 2006-08-14 03:33:14 UTC
Hmm problems with mysql-python and the Interface Error are known with the MySQL 5.0.24 upgrade, as it seems something changed in the ABI. Recompiling the python bindings seems to be the correct solution, but according to your bug-report at sf.net that didn't help...
Link to the MySQL bug: http://bugs.mysql.com/bug.php?id=21543
Best regards, CHTEKK.
Comment 2 Alex V. Koval 2006-08-15 06:32:48 UTC
Hi Luca,
yes, I've seen http://bugs.mysql.com/bug.php?id=21543
and it does not seems to be related since I started experiencing
InterfaceError exactly after upgrade from 4.1.20 to 4.1.21

Seems that minor version change affects me. Also, recompiling client
libraries does not help in my case.

Everything explain in upstream bug report, on source forge. I made a duplicate
bug in Gentoo so everyone who searches for such problem, know where to look.

Also I have no idea if we can reproduce this bug on other O/S. I have only Gentoo servers. 

I have downgraded to 4.1.20 everywhere. All works OK now, except that this version of mysql is broken by security
200608-09 [N] MySQL: Denial of Service ( dev-db/mysql )

Alex
Comment 3 Alex V. Koval 2006-09-15 00:42:20 UTC
People! Help! somebody has removed 4.1.20 from Portage!!!

now most of my sites die, with InterfaceError and I can not go back
to 4.1.20...

going to check. may be I can find or make the ebuild myself...
Comment 5 Alex V. Koval 2006-09-15 10:53:17 UTC
in fact I made a ebuild myself and downgraded it :)
on my bug to software maintainers nothing gets fixed.
it seems I will have to try to debug Mysql server myself... not sure how
to do it, but probably gdb is my friend... 
Comment 6 Alex V. Koval 2006-12-03 21:42:13 UTC
Looks like nobody is interested in fixing this, and in fact its not a Gentoo trouble at all - it is python/MySQL/Zope problem. I was not able to fix that,
so I am moving all our sites out from Zope. Because since MySQL 4.0.21 neither 
site works with MySQL. I am very upset about that, but this problem finally
helped me to decide to move out from Zope, and I found a very good platform
named Django,which I recommend to all.