Roundup Tracker - Issues

Issue 896917

classification
IOError: [Errno 9] Bad file descriptor
Type: Severity: normal
Components: Web interface Versions:
process
Status: closed fixed
:
: richard : richard
Priority: normal :

Created on 2004-02-14 03:57 by anonymous, last changed 2004-02-28 06:29 by anonymous.

Files
File name Uploaded Description Edit Remove
issue.htm anonymous, 2004-02-14 03:57 Error message
Messages
msg1103 Author: [hidden] (anonymous) Date: 2004-02-14 03:57
Environment:

PC:         Dual CPU PIII
OS:        Windows 2000 Pro
Python:   2.3.3
Apache 2.0.48 + mod_proxy calling standalone roundup
Roundup: 0.6.4
Template: bsddb, classic modified with +4 fields

First, we love Roundup so we're continuing to actively
use it despite running into this problem.  Thanks for
working on this project!

We're getting a "Bad file descriptor" error once every
3-15 requests/submits with no observable pattern.  Ran
into this issue with just 1 user active.

Clicking the browser's RELOAD button or resubmitting
after using the browser's BACK button always succeeds
in getting past the error--but we sometimes get
duplicate records when we do this (depending on the
page this happened).

Two uncommon things about our setup:

1.  dual cpu -- could this be making threading issues
more likely to crop up in Python?  Google found other
non-roundup apps having file descriptor problems in
Python which they resolved by catching/retrying upon
invalid file descriptor.

2.  modified roundup-server.bat so we don't have a
console/command prompt window in our task bar by using
"start" and "pythonw.exe" together.  

@echo off
if NOT "%_4ver%" == "" start
d:\apps\python23\pythonw.exe -O -c "from
roundup.scripts.roundup_server import run; run()" %$
if     "%_4ver%" == "" start
d:\apps\python23\pythonw.exe -O -c "from
roundup.scripts.roundup_server import run; run()" %*

We hope the attached error page helps.  It contains a
lot of details--we're new to Python so we can't help
(we installed Python simply to use Roundup).

ATTACHED ERROR PAGE:  issue.htm

msg1104 Author: [hidden] (richard) Date: 2004-02-15 21:28
Logged In: YES 
user_id=6405

Hurm. I guess I really need to fix the logging stuff sooner 
rather than later. 
 
It looks like the logging to stderr is breaking because of the 
environment that the server ends up running in. Not sure why 
it doesn't break on *every* request though. 
 
Try adding a method to the RoundupService class in the 
roundup-server script: 
 
     def log_message(*args): 
           pass 
 
and I'm pretty sure the problem will go away. If it works for 
you, I'll include the fix in the next bugfix release of 0.6. 
msg1105 Author: [hidden] (richard) Date: 2004-02-15 22:27
Logged In: YES 
user_id=6405

I've also put in a try/except as suggested. This is done in 
both the CVS HEAD and maint-0-6 branch. 
 
I'm not really that good on Windows stuff - are there likely to 
be any ramifications to your change in the batch file? (Apart 
from stderr / stdout being closed, and breaking the logging, 
that is ;) 
msg1106 Author: [hidden] (anonymous) Date: 2004-02-16 16:04
Logged In: NO 

Thanks, I'll try out the following and let you know how it
goes.  It might be a while because we're reinstalling the os
on several machines today.

 def log_message(*args): 
           pass 

msg1107 Author: [hidden] (anonymous) Date: 2004-02-19 15:47
Logged In: NO 

Will test soon...sorry about the delay!
msg1108 Author: [hidden] (anonymous) Date: 2004-02-28 06:29
Logged In: NO 

Sorry, roundup 0.6.4 has become mission-critical for us and
I can't afford to experiment with our install anymore.

I'll download 0.6.6 or 0.6.7 on my pc and see if running it
with pythonw as described below works without problems. 
This will be great for Windows users who don't want an extra
command prompt on the task bar they might accidentally close.
History
Date User Action Args
2004-02-14 03:57:15anonymouscreate