Roundup Tracker - Issues

Issue 2550495

classification
Fail on login using the MySQL database
Type: Severity: normal
Components: Database Versions:
process
Status: closed out of date
:
: : alessandro, ber, matej, raphi, rouilj
Priority: :

Created on 2009-02-05 14:21 by matej, last changed 2017-05-10 10:32 by ber.

Files
File name Uploaded Description Edit Remove
schema.py matej, 2009-02-05 14:21
Messages
msg3505 Author: [hidden] (matej) Date: 2009-02-05 14:21
The error pasted at the end of this comment occurs directly after
submitting valid login credentials. The error does not occur if invalid
credentials are submitted.


My system specifications:

  Operating System: Fedora 10 (Linux Maco 2.6.27.9-159.fc10.i686 #1 SMP
Tue Dec 16 15:12:04 EST 2008 i686 i686 i386 GNU/Linux)

  Installed related packages (using standard Fedora 10 repository packages):
    - MySQL-Python 1.2.2
    - roundup 1.4.6.
    - MySQL 5.0.67


The error message:

Traceback (most recent call last):

 File "/usr/lib/python2.5/site-packages/roundup/cgi/client.py", line
409, in inner_main
   html = self.handle_action()

 File "/usr/lib/python2.5/site-packages/roundup/cgi/client.py", line
975, in handle_action
   return action_klass(self).execute()

 File "/usr/lib/python2.5/site-packages/roundup/cgi/actions.py", line
39, in execute
   return self.handle()

 File "/usr/lib/python2.5/site-packages/roundup/cgi/actions.py", line
918, in handle
   self.client.session_api.set(user=self.client.user)

 File "/usr/lib/python2.5/site-packages/roundup/cgi/client.py", line
168, in set
   self._sid = self._gen_sid()

 File "/usr/lib/python2.5/site-packages/roundup/cgi/client.py", line
141, in _gen_sid
   if not self.session_db.exists(s):

 File
"/usr/lib/python2.5/site-packages/roundup/backends/sessions_rdbms.py",
line 27, in exists
   n, self.db.arg), (infoid,))

 File "/usr/lib/python2.5/site-packages/MySQLdb/cursors.py", line 147,
in execute
   charset = db.character_set_name()

InterfaceError: (0, '')
msg3554 Author: [hidden] (raphi) Date: 2009-02-18 08:12
we are currently facing exactly the same error. we use the following
applications on our server:

- FreeBSD 7.1-RELEASE-p2 amd64
- MySQL 5.1.30
- python 2.5.2
- MySQL-Python
- py25-MySQLdb-1.2.2
msg3740 Author: [hidden] (alessandro) Date: 2009-06-26 13:46
This is my wsgi application, I run it with "python2.4
wsgi_application.py". I'm using mysql database


from wsgiref.simple_server import make_server
from roundup.cgi.wsgi_handler import RequestDispatcher

tracker_home = 'trackers'
app = RequestDispatcher(tracker_home) #, debug=True) # <= HERE

httpd = make_server('', 8000, app)
httpd.serve_forever()



Note that if I use debug=True I can't login inside the roundup web page,
I got an error page:
""
An error has occurred

A problem was encountered processing your request. The tracker
maintainers have been notified of the problem.
""

and -by email- roundup says:

Traceback (most recent call last):

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line
443, in inner_main
    html = self.handle_action()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line
1053, in handle_action
    return action_klass(self).execute()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line
38, in execute
    return self.handle()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/actions.py", line
965, in handle
    self.client.session_api.set(user=self.client.user)

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line
168, in set
    self._sid = self._gen_sid()

  File "/usr/lib/python2.4/site-packages/roundup/cgi/client.py", line
141, in _gen_sid
    if not self.session_db.exists(s):

  File
"/usr/lib/python2.4/site-packages/roundup/backends/sessions_rdbms.py",
line 27, in exists
    n, self.db.arg), (infoid,))

  File "/usr/lib/pymodules/python2.4/MySQLdb/cursors.py", line 147, in
execute
    charset = db.character_set_name()

InterfaceError: (0, '')



I changed some lines near sessions_rdbms.py line 27: I put many print,
in order to check the sql query and I saw it's all ok (I have put thet
query in a simple mysql client).
I got the same error substituting the query at line 26 with a simple
"SELECT 1"; the problem seem to be in the database cursor

It seems to me a mysql bug, 
http://bugs.mysql.com/bug.php?id=21543 


If I don't use the "debug" option roundup works correctly.

Tested with roundup 1.4.8 and 1.4.6, mysql version 5.0.51a and 5.0.32
for debian, python 2.4.6

I'm still thinking about a mysql bug..
msg5805 Author: [hidden] (rouilj) Date: 2016-07-09 22:26
I hate to do this but does anybody have an issue if I close this
out and mark it out of date?

Since the issue can be reproduced outside of roundup, it does
look like a mysql bug. It's possible roundup could have been adapted
to work around the bug but at this late date I don't think it's
possible/a good idea.

If I don't see objections in a month or so I'll close this.

-- rouilj
msg5978 Author: [hidden] (ber) Date: 2017-05-10 10:32
Hi, 
as announced by @rouilj I'm closing this issues, 
because there are not objections 
and the issue is very likely to be an mysql upstream defect
which was fixed a long while ago.
History
Date User Action Args
2017-05-10 10:32:20bersetstatus: new -> closed
resolution: out of date
messages: + msg5978
nosy: + ber
2016-07-09 22:26:25rouiljsetnosy: + rouilj
messages: + msg5805
2016-06-27 01:06:56rouiljsetcomponents: + Database
2009-06-26 13:46:14alessandrosetnosy: + alessandro
messages: + msg3740
2009-02-18 08:12:07raphisetnosy: + raphi
messages: + msg3554
2009-02-05 14:21:43matejcreate