Bug with Python3 in wait_for_occupied_port/check_port not patched

Bug #1353896 reported by Vincent Tabard
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
cherrypy3 (Ubuntu)
Fix Released
High
Unassigned

Bug Description

See https://bitbucket.org/cherrypy/cherrypy/issue/1170/bug-in-check_port-running-python-33 for upstream bug description and patch, commited in source in 2012 in this commit: https://bitbucket.org/cherrypy/cherrypy/commits/9820107d4ffb8058fd507888f90e28c695f6b4c0.

Summary:

« The new exception hierarchy in Python 3.3 has created a bug in check_port in process/servers.py. IOError and socket.error are both now aliases of OSError, so a check for socket.error wrongly catches the IOError that's thrown in the try block. »

It pretty much makes cherrypy unusable with Python 3.3+ (3.4 shipped with trusty), since when you start a server, about 50 s later it shuts down because of « port not bound », when it really is.

Revision history for this message
Robie Basak (racb) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better.

I see that Trusty is on 3.2.2-4ubuntu5 and Utopic on 3.5.0-1. Please could you confirm which of these versions are affected?

Please could you also provide step-by-step instructions to reproduce the problem for a developer who is not familiar with cherrypy?

Once done, please change the bug status back to New. Thanks!

Changed in cherrypy3 (Ubuntu):
importance: Undecided → High
Robie Basak (racb)
Changed in cherrypy3 (Ubuntu):
status: New → Incomplete
Revision history for this message
Vincent Tabard (0incent) wrote :

The affected version was trusty. I guess the problem is solved on utopic. I'm absolutely no CherryPy expert, so I'll pass on submitting a minimal testcase, sorry :/

Revision history for this message
Robie Basak (racb) wrote :

Thanks. I'll mark this Fix Released to reflect the situation in Utopic.

If you need a fix for Trusty, please comment with a justification against https://wiki.ubuntu.com/StableReleaseUpdates#When and complete steps 1 through 4 in https://wiki.ubuntu.com/StableReleaseUpdates#Procedure - and go ahead with all the steps if you can. Note that that SRU team would need to make a final decision.

Those steps require a test case, and this is needed before any update to Trusty. So we'll have to leave that for now.

Changed in cherrypy3 (Ubuntu):
status: Incomplete → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.