Exception not getting logged

18 views
Skip to first unread message

Vedran Furač

unread,
Oct 23, 2011, 4:05:21 PM10/23/11
to mod...@googlegroups.com
Hello,

I've a problem with mod_wsgi apps failing to log errors. I have to
strace apache to get them and then it looks like this:

write(4294967295, "[Thu Oct 20 17:50:01 2011] [error]
ImproperlyConfigured: Error importing middleware helpers: \"cannot
import name AuthenticationGroup\"\n", 168) = -1 EBADF (Bad file descriptor)

4294967295 is obviously a bad file descriptor and I've no idea why is
apache trying to write to it.

Configuration is fairly basic and looks like this:

WSGIDaemonProcess foo processes=16 threads=5 display-name='%{GROUP}'
maximum-requests=5000
WSGIProcessGroup foo
WSGIScriptAlias / /path/to/foo.wsgi

Apache is 2.2.16 with mod_wsgi 3.3 all running on Debian Squeeze. Any
insight?

TIA!

Regards,
Vedran

Graham Dumpleton

unread,
Oct 23, 2011, 4:22:07 PM10/23/11
to mod...@googlegroups.com
The first argument to write() is 4294967295 (32bit -1 value) which
isn't right. This suggest memory corruption, something being nasty and
closing open files when it shouldn't, or something replacing
sys.stderr when they shouldn't have.

Try writing a hello world program, setting up any Python module search
path for virtual environment, and then add statement to import just
that module into the hello world program.

What third party packages for Python are you using, especially any
that have a C extension component?

Also check to make sure you aren't reassigning sys.stderr yourself,
you shouldn't need to.

Graham

2011/10/24 Vedran Furač <vedran...@gmail.com>:

> --
> You received this message because you are subscribed to the Google Groups "modwsgi" group.
> To post to this group, send email to mod...@googlegroups.com.
> To unsubscribe from this group, send email to modwsgi+u...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/modwsgi?hl=en.
>
>

Reply all
Reply to author
Forward
0 new messages