There is a highest/blocker bug about sessions expiring in .10.4, which
we are attempting to fix. Having dug pretty deep into the internals,
it appears that a specific sql query is misbehaving. I've posted a
writeup here:
http://trac-hacks.org/ticket/1493#comment:7
Please look at it and let me know if you have a suggestion. It seems
like we're pretty close to the solution for this issue; hopefully we
can come up with a patch that fixes it.
Thanks much,
Aaron Maxwell
SnapLogic - Open Source Internet Data Services
http://snaplogic.org/
Here are some ideas to try out...
Looking at the changes from 0.10.3.1 to 0.10.4, I don't see anything
that could have introduced this "interesting" new behavior, except
perhaps at the level of the mysql_backend support itself:
Try to undo those changes (which, OTOH, were done for a reason, so you
might have other issues), to check if this solves the "auto-logout" issue.
If this is not the case, then please setup a test env using something
else than MySQL (e.g. sqlite), and see if you experience the issue as well.
If the problem is related to MySQL as I'd expect, then perhaps you would
have to debug the mysql bindings themselves, in order to understand why
that SELECT fails when it shouldn't (don't forget to activate the print
statements in trac/db/util.py, to monitor the SQL statements and their
arguments, maybe it's simply the auth_cookie value changing for some
other reason).
-- Christian
Like you said, all the changes are there for a reason, so the next
step is for me to determine exactly what difference in
mysql_backend.py is connected with the issue. I'll work on that today
and post here when we have a candidate patch.
Christian, thank you.
-Aaron
On Jun 1, 1:04 am, Christian Boos <c...@neuf.fr> wrote:
> Aaron Maxwell - SnapLogic wrote:
>
> > Hi,
>
> > There is a highest/blocker bug about sessions expiring in .10.4, which
> > we are attempting to fix. Having dug pretty deep into the internals,
> > it appears that a specific sql query is misbehaving. I've posted a
> > writeup here:
>
> >http://trac-hacks.org/ticket/1493#comment:7
>
> > Please look at it and let me know if you have a suggestion. It seems
> > like we're pretty close to the solution for this issue; hopefully we
> > can come up with a patch that fixes it.
>
> Here are some ideas to try out...
>
> Looking at the changes from 0.10.3.1 to 0.10.4, I don't see anything
> that could have introduced this "interesting" new behavior, except
> perhaps at the level of the mysql_backend support itself:
>
> http://trac.edgewall.org/changeset?new=branches%2F0.10-stable%2Ftrac%...
http://trac.edgewall.org/changeset/4962
Still investigating...
-A
On Jun 1, 1:31 pm, Aaron Maxwell - SnapLogic <a...@snaplogic.org>
wrote:
This seems related to the previously closed ticket 4802:
http://trac.edgewall.org/ticket/4802
I believe the reason it does not work on our setup has to do with the
return value of _mysql.ping(). In r5565 (i.e. 0.10.4), in db/
mysql_backend.py we had:
<pre>
def rollback(self):
if self.cnx.ping():
self._set_character_set(self.cnx, 'utf8')
self.cnx.rollback()
else:
self._is_closed = True
</pre>
In our setup, self.cnx.ping() always returns None (as determined
through inserted logging statements). I suppose it returns a
meaningful value in some other setups. However, from the
documentation I found on the net, the return value python's
_mysql.ping() [1] is not explicitly defined, even though the
underlying C api [2] does have a return value. In any case, checking
ping's return value does not seem to work properly in our case, so I
put in a try-except.
Christian, I see you handled the original ticket above. Do you forsee
any problems with the patch? (All the unit tests pass.) In
particular, I'm not sure if ProgrammingError is the best exception to
catch.
Thanks,
Aaron Maxwell
SnapLogic - Open Source Internet Data Services
http://snaplogic.org
[1] http://mysql-python.sourceforge.net/MySQLdb-1.2.2/private/_mysql.connection-class.html#ping