Bug 364911 - cherrypy doesn't cope with being SIGSTOPped, or suspended/resumed
cherrypy doesn't cope with being SIGSTOPped, or suspended/resumed
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: python-cherrypy (Show other bugs)
7
All Linux
low Severity low
: ---
: ---
Assigned To: Luke Macken
Fedora Extras Quality Assurance
: EasyFix, Patch, Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2007-11-02 20:33 EDT by Nils Philippsen
Modified: 2007-11-30 17:12 EST (History)
1 user (show)

See Also:
Fixed In Version: 2.2.1-7.fc8
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2007-11-12 18:55:11 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:


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

  None (edit)
Description Nils Philippsen 2007-11-02 20:33:02 EDT
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-02 20:33:02 EDT
Created attachment 247161 [details]
backported fix
Comment 2 Nils Philippsen 2007-11-02 20:33:45 EDT
NB: same on F8 as it is the same package (inherited from F7).
Comment 3 Luke Macken 2007-11-03 09:50:28 EDT
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 17:30:01 EDT
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 19:06:39 EDT
... 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 11:08:21 EST
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 04:55:32 EST
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 06:48:13 EST
python-cherrypy-2.2.1-7.fc8 works as well.
Comment 9 Fedora Update System 2007-11-09 18:56:06 EST
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 18:55:09 EST
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 18:57:06 EST
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.