httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Chris Darroch <>
Subject mod_authn_file + low ThreadStackSize = oops
Date Tue, 05 Oct 2010 02:08:18 GMT
Hi --

   It's been ages since I wrote to the list; as always, my apologies.
I hope to get back to some actual programming soon, unless life gets
in the way again.

   In the meantime, a quick note for anyone who might at some point
stumble over the same thing and go to Google for help.  I set up a
simple Apache httpd with mod_authn_file and mod_authn_basic, and
the darn thing was crashing while trying to authenticate the user.
A trace revealed it was crashing in apr_password_validate() on a memset()
on a crypt_data struct buffer from for use with crypt_r().  Huh?

   I stared at the definition of crypt_data in crypt.h, poked
around at various things, then gave up and went for quick bike ride.
The answer immediately popped to mind: I'd set my ThreadStackSize really
low, to 64 KB, and while that usually lets you run without trouble
on a Linux box, crypt_data contains about 256 KB worth of arrays
and it was overflowing the per-thread stack.  Live and learn.


GPG Key ID: 088335A9
GPG Key Fingerprint: 86CD 3297 7493 75BC F820  6715 F54F E648 0883 35A9

View raw message