gunicorn raises exception due to gevent change in 1.1b1

Bug #1554964 reported by James Henstridge
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
python-gevent (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

I was trying to get a Python project that uses gunicorn running on Xenial, and hit the following error:

    Traceback (most recent call last):
      File "/usr/lib/python2.7/dist-packages/gevent/greenlet.py", line 498, in run
        result = self._run(*self.args, **self.kwargs)
      File "/usr/lib/python2.7/dist-packages/gevent/baseserver.py", line 153, in _close_when_done
        return handle(*args)
      File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 945, in handle
        handler.handle()
      File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 340, in handle
        result = self.handle_one_request()
      File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 500, in handle_one_request
        self.handle_one_response()
      File "/usr/lib/python2.7/dist-packages/gevent/pywsgi.py", line 693, in handle_one_response
        self.log_request()
      File "/usr/lib/python2.7/dist-packages/gunicorn/workers/ggevent.py", line 228, in log_request
        self.server.log.access(resp, req_headers, self.environ, response_time)
    AttributeError: 'LoggingLogAdapter' object has no attribute 'access'

After searching around for others with this problem, I found the following upstream gevent bug report:

https://github.com/gevent/gevent/issues/663

It looks like this fix was applied in 1.1b6, and applying the same change to pywsgi.py locally was enough to get gunicorn running again.

The final 1.1.0 release was recently released, so it would be nice to upgrade to that version. If that isn't possible, could we get the patch from that bug report applied?

ProblemType: Bug
DistroRelease: Ubuntu 16.04
Package: python-gevent 1.1~b1-0ubuntu2 [modified: usr/lib/python2.7/dist-packages/gevent/pywsgi.py]
ProcVersionSignature: Ubuntu 4.4.0-4.19-generic 4.4.1
Uname: Linux 4.4.0-4-generic x86_64
ApportVersion: 2.20-0ubuntu3
Architecture: amd64
CurrentDesktop: Unity
Date: Wed Mar 9 16:08:57 2016
InstallationDate: Installed on 2013-10-29 (861 days ago)
InstallationMedia: Ubuntu 13.10 "Saucy Salamander" - Release amd64 (20131016.1)
SourcePackage: python-gevent
UpgradeStatus: Upgraded to xenial on 2015-12-22 (78 days ago)

Revision history for this message
James Henstridge (jamesh) wrote :
Revision history for this message
James Henstridge (jamesh) wrote :
Joshua Powers (powersj)
Changed in python-gevent (Ubuntu):
status: New → Triaged
importance: Undecided → Medium
Revision history for this message
Christian Ehrhardt  (paelzer) wrote :

Hi,
trying to clean up bug dormant for too long.
I beg your pardon that nothing happened, but maybe things were too unclear - trying to sort that out now.

It seems that the change you referred to was released in v1.1.0 of gevent.
git tag --contains bb785fc18ee2b401ac84a524ea8c561d4e041104
1.2.0
1.2.1
1.2.2
v1.1.0
[...]

That said it should be released in Xenial and newer
python-gevent | 1.1.0-2 | xenial/universe | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 python-gevent | 1.1.1-2 | yakkety/universe | source, amd64, arm64, armhf, i386, powerpc, ppc64el, s390x
 python-gevent | 1.1.2-1 | zesty/universe | source, amd64, arm64, armhf, i386, ppc64el, s390x
 python-gevent | 1.1.2-build1 | artful/universe | source, amd64, arm64, armhf, i386, ppc64el, s390x

I checked and the code in Xenial really has that fix applied already.

Checking your report in detail related to that I see
python-gevent 1.1~b1-0ubuntu2 [modified: usr/lib/python2.7/dist-packages/gevent/pywsgi.py]

I'd assume that this was from Xenial development phase but it released with the fix as it had 1.1.0
That said closing that bug, please reopen and share extra Detail if I overlooked something.

Changed in python-gevent (Ubuntu):
status: Triaged → 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.