Subject: Memory corruption in Apache 2.2 (and 2.0) on -current
To: NetBSD current-users <current-users@netbsd.org>
From: M Graff <explorer@flame.org>
List: current-users
Date: 10/31/2007 10:51:05
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I've recently upgraded my web server to -current (4.99.34) and have a
rather strange problem now.

Apache 2.2 (and 2.0) seems to send out garbage.  Not all the time, and
not consistently.  And not on all virtual hosts.

And it's hard to repeat.

I think it might have something to do with the fact that I actually had
somewhat bad virtual host declarations; adding a ServerName for each
seemed to fix the problem.  But it came back...

Removing this section seemed to fix it as well:

#
# The mod_mime_magic module allows the server to use various hints from the
# contents of the file itself to determine its type.  The MIMEMagicFile
# directive tells the module where the hint definitions are located.
#
<IfModule mod_mime_magic.c>
  MIMEMagicFile etc/httpd/magic
</IfModule>

but putting it back didn't cause the problem to return just now.

Re-ordering the virtual host declarations seemed to make it better, but
not consistently.

It starts happening both immediately after restarting the server, and
days later.  I think.  I may have restarted it each time it happened,
I'm unfortnately not 100% certain.

The contents of the garbage is both a "true" memory corruption -- the
server tag line has binary gibberish in it -- and parts of the magic
file -- which is why I hoped disabling it and re-enabling it would be
the final test.  I once thought this was fcgid, but I removed that.  I
also once thought it might be the php5 module, so that's gone too, now.

Has anyone else seen this happen?

- --Michael
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)

iD8DBQFHKKRpuzMQWQwZDN0RAgMpAJwOAwchpKOLqgRrktndztSMpgV+ZQCeNpNz
xAdQiUEmwjZ/1IOf9T6jWCo=
=443Y
-----END PGP SIGNATURE-----