I'm a system administrator from Wikipedia. We've been interested in
pound for a while, since our tests indicate that it's vastly faster for
small files than perlbal, which is the non-caching reverse proxy we've
been using for a while. However, when I tried to put it into production,
as soon as the load got high enough, the worker process would start
segfaulting, once every few seconds.
With a bit of help from gdb I found the problem. On our system, for
whatever reason, gethostbyname would occasionally return successfully,
but with an empty list in h_addr_list, i.e. h_addr_list was NULL.
Thus this code from is_be():
if((he = gethostbyname(host)) == NULL)
Would segfault in memcpy. There were a few instances of similar code, I
fixed them all and made a patch:
At no extra charge, you can also have my patch to give more useful log
entries when apache segfaults and returns no headers:
Consider both to be public domain; feel free to incorporate them without