Return-Path: Mailing-List: contact python-dev-help@httpd.apache.org; run by ezmlm Delivered-To: mailing list python-dev@httpd.apache.org Received: (qmail 10388 invoked by uid 99); 5 Mar 2006 03:56:25 -0000 X-ASF-Spam-Status: No, hits=0.0 required=10.0 tests= X-Spam-Check-By: apache.org Received: from [192.87.106.226] (HELO ajax.apache.org) (192.87.106.226) by apache.org (qpsmtpd/0.29) with ESMTP; Sat, 04 Mar 2006 19:56:24 -0800 Received: from ajax.apache.org (ajax.apache.org [127.0.0.1]) by ajax.apache.org (Postfix) with ESMTP id DAF3FDC for ; Sun, 5 Mar 2006 04:56:02 +0100 (CET) Message-ID: <1586057446.1141530962567.JavaMail.jira@ajax.apache.org> Date: Sun, 5 Mar 2006 04:56:02 +0100 (CET) From: "Graham Dumpleton (JIRA)" To: python-dev@httpd.apache.org Subject: [jira] Closed: (MODPYTHON-31) mod_python - session stopped working after infinite loop was killed In-Reply-To: <1914043063.1110463552976.JavaMail.jira@ajax.apache.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ http://issues.apache.org/jira/browse/MODPYTHON-31?page=all ] Graham Dumpleton closed MODPYTHON-31: ------------------------------------- > mod_python - session stopped working after infinite loop was killed > ------------------------------------------------------------------- > > Key: MODPYTHON-31 > URL: http://issues.apache.org/jira/browse/MODPYTHON-31 > Project: mod_python > Type: Bug > Components: core > Versions: 3.1.3 > Environment: Using Fedora Core 3. > -- > # rpm -q httpd > httpd-2.0.52-3.1 > -- > -- > # rpm -q mod_python > mod_python-3.1.3-5.2 > -- > Reporter: Jarkko > Priority: Blocker > > /etc/httpd/conf.d/python.conf > -- > # Add .psp to types > AddType application/x-httpd-psp .psp > # Handle .psp documents with mod_python > AddHandler mod_python .psp > PythonHandler mod_python.psp > # Add index.psp to index documents > DirectoryIndex index.psp > # Enable debug under /psp directory > > AddHandler mod_python .psp_ > PythonDebug On > > -- > /var/www/html/psp/index.psp > -- > > sid: <%=session.id()%> > > -- > lynx localhost/psp > -- > Mod_python error: "PythonHandler mod_python.psp" > Traceback (most recent call last): > File "/usr/lib/python2.3/site-packages/mod_python/apache.py", line 299, in > HandlerDispatch > result = object(req) > File "/usr/lib/python2.3/site-packages/mod_python/psp.py", line 297, in > handler > p.run() > File "/usr/lib/python2.3/site-packages/mod_python/psp.py", line 191, in run > session = Session.Session(req) > File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line 389, in > Session > timeout=timeout, lock=lock) > File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line 294, in > __init__ > timeout=timeout, lock=lock) > File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line 132, in > __init__ > Cookie.add_cookie(self._req, self.make_cookie()) > File "/usr/lib/python2.3/site-packages/mod_python/Session.py", line 160, in > make_cookie > c.path = dirpath[len(docroot):] > TypeError: unsubscriptable object > -- > First the page worked like a charm. But then I figured I'd like to see how > mod_python handles a situation where the page has an infinite loop in it. > I coded a page with a code like "while True:" etc. in it and ran it. (The code > had a call to session too, so session was initialized.) I noticed that the > script was newer killed (this is bad, PHP handles this with its time limit). I > had to restart httpd then (which killed the script). > Now after that loop test the session variable does not work anymore. I get > that "unsubscriptable object" error message. > I figured that maybe the session data is corrupted and deleted the dbm file > from /tmp. That did not help. I've also restarted httpd multiple times. > The weirdest thing about this is that the httpd is preforked, so the session > should exists only in memory. If the session exists only in memory, restarting > httpd should be enough. > Where can that corrupted session data be stored now? Does httpd save its state > into some files? Even rebooting the whole machine did not help. > I consider this bug a very serious thing because this is a blocker. Sessions > don't work anymore. > Also, some kind of handling for infinite loops should be implemented. Yes I > know, that should be described in another bug report, but let's fix this > session thing first. > I have high hopes for mod_python as it integrates an excellent language to an > excellent web server and because it enables a powerfull and easy alternative to > PHP. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira