IOError: ' sys.stdout access restricted by mod_wsgi'

Bug #1089827 reported by Michael Nelson
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Ratings and Reviews server
Fix Released
High
Unassigned
txStatsD
Fix Committed
Undecided
Sidnei da Silva

Bug Description

We had over 30k oopses last night on staging rnr, which seems to be caused by twisted accessing a stdout attribute within our wsgi process. Here's an example oops:

https://pastebin.canonical.com/80384/

and a description of the problem can be found at:

http://code.google.com/p/modwsgi/wiki/DebuggingTechniques#Apache_Error_Log_Files

We should be able to reproduce this locally to find the cause.

Tags: oops

Related branches

Revision history for this message
Michael Nelson (michael.nelson) wrote :

AFAICT, the cause is a change between twisted releases 11.0.0 and 11.1.0.

Our staging server (waxapple) had 11.1.0 installed yesterday [1], although I can't be certain from which version it was upgraded from the info that I have.

The line causing the IOError is accessing stdout in the 11.1.0 twisted release [2], which is not accessed at all in the twisted 11.0.0 release [3].

Our production service is still running with python-twisted-core 10.0.0 [4].

As this will effect any wsgi service using txstatsd, I'll mark it as affected also, although we can probably just use the WSGIRestrictStdout directive to avoid the exception.

[1] https://pastebin.canonical.com/80387/
[2] http://twistedmatrix.com/trac/browser/tags/releases/twisted-11.1.0/twisted/python/log.py#L658
[3] http://twistedmatrix.com/trac/browser/tags/releases/twisted-11.0.0/twisted/python/log.py#L621
[4] https://pastebin.canonical.com/80391/

description: updated
Revision history for this message
Michael Nelson (michael.nelson) wrote :

We had one lonely oops yesterday on staging reviews - thanks Sidnei for the fix, and for the quick rollout achuni.

Changed in txstatsd:
assignee: nobody → Sidnei da Silva (sidnei)
status: New → Fix Committed
Changed in rnr-server:
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.