Bug 364911 - cherrypy doesn't cope with being SIGSTOPped, or suspended/resumed
Summary: cherrypy doesn't cope with being SIGSTOPped, or suspended/resumed
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: python-cherrypy
Version: 7
Hardware: All
OS: Linux
low
low
Target Milestone: ---
Assignee: Luke Macken
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2007-11-03 00:33 UTC by Nils Philippsen
Modified: 2016-09-20 02:38 UTC (History)
2 users (show)

Fixed In Version: 2.2.1-7.fc8
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2007-11-12 23:55:11 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
backported fix (1.31 KB, patch)
2007-11-03 00:33 UTC, Nils Philippsen
no flags Details | Diff

Description Nils Philippsen 2007-11-03 00:33:02 UTC
Description of problem:

When accepting socket connections, cherrypy doesn't handle interrupted system
calls gracefully. This means that e.g. if a cherrypy application (e.g. a
TurboGears website) gets SIGSTOP and SIGCONT or the machine gets
suspended/resumed, it doesn't serve web pages anymore.

Version-Release number of selected component (if applicable):

python-cherrypy-2.2.1-6.fc7 (any version < 3.1.0 beta!)

How reproducible:
Easy

Steps to Reproduce:
1. Start a cherrypy app
2. Load one of its pages into the browser (works)
3. "kill -STOP ..." its processes
4. Try to load the same page into the browser

Actual results:
Browser hangs, traceback in app:

Exception in thread CPHTTPServer Thread-2:
Traceback (most recent call last):
  File "/usr/lib64/python2.5/threading.py", line 460, in __bootstrap
    self.run()
  File "/usr/lib64/python2.5/threading.py", line 440, in run
    self.__target(*self.__args, **self.__kwargs)
  File "/usr/lib/python2.5/site-packages/cherrypy/_cpserver.py", line 114, in
_start_http
    self.httpserver.start()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cpwsgiserver.py", line 319,
in start
    self.tick()
  File "/usr/lib/python2.5/site-packages/cherrypy/_cpwsgiserver.py", line 325,
in tick
    s, addr = self.socket.accept()
  File "/usr/lib64/python2.5/socket.py", line 167, in accept
    sock, addr = self._sock.accept()
error: (4, 'Interrupted system call')

Expected results:

Page gets served, no traceback in app.

Additional info:

Upstream Ticket is http://www.cherrypy.org/ticket/707

Comment 1 Nils Philippsen 2007-11-03 00:33:02 UTC
Created attachment 247161 [details]
backported fix

Comment 2 Nils Philippsen 2007-11-03 00:33:45 UTC
NB: same on F8 as it is the same package (inherited from F7).

Comment 3 Luke Macken 2007-11-03 13:50:28 UTC
Fixed in python-cherrypy-2.2.1-7.fc9.  I'll push this into bodhi for F7/F8
shortly.  Thanks for the patch!

Comment 4 Nils Philippsen 2007-11-03 21:30:01 UTC
Itch, meet scratch ;-). Changing resolution to ERRATA, as I think NEXTRELEASE is
 for things you don't intend to fix in the current product (here Fedora) version.

Comment 5 Nils Philippsen 2007-11-03 23:06:39 UTC
... or come to think of it MODIFIED since new packages for F7/F8 haven't been
built/pushed.

Comment 6 Fedora Update System 2007-11-06 16:08:21 UTC
python-cherrypy-2.2.1-7.fc8 has been pushed to the Fedora 8 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-cherrypy'

Comment 7 Nils Philippsen 2007-11-07 09:55:32 UTC
Works for me with python-cherrypy-2.2.1-7.fc7 from koji. I'll try the F8 version
once I get in front of the laptop.

Comment 8 Nils Philippsen 2007-11-07 11:48:13 UTC
python-cherrypy-2.2.1-7.fc8 works as well.

Comment 9 Fedora Update System 2007-11-09 23:56:06 UTC
python-cherrypy-2.2.1-7.fc7 has been pushed to the Fedora 7 testing repository.  If problems still persist, please make note of it in this bug report.
 If you want to test the update, you can install it with 
 su -c 'yum --enablerepo=updates-testing update python-cherrypy'

Comment 10 Fedora Update System 2007-11-12 23:55:09 UTC
python-cherrypy-2.2.1-7.fc8 has been pushed to the Fedora 8 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 11 Fedora Update System 2007-11-12 23:57:06 UTC
python-cherrypy-2.2.1-7.fc7 has been pushed to the Fedora 7 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.