Subject: gethostbyname_r() ?
To: None <>
From: Jan Danielsson <>
List: tech-net
Date: 07/17/2006 00:31:32
This is an OpenPGP/MIME signed message (RFC 2440 and 3156)
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

Hello all,

   I'm having serious problems running TOR on my system. It eats all my
memory, begins swapping like mad, and finally the tor processes get
killed because they have eaten all memory + swap. When I asked about
this issue on the TOR mailing lists, I was directed to a wiki. From

   "FreeBSD 4.x, all versions of OpenBSD, and all versions of NetBSD
have broken gethostbyname_r() implementations that cause Tor's threads
to stomp on each other. So rather than threading on these platforms, we
made Tor fork new processes. This means you need way more memory to run
a Tor server, especially an exit server. If you want to run a Tor
server, we recommend you upgrade to a better OS."

   So, apparently, it all boils down to a broken implementation of
gethostbyname_r(). Could someone elaborate? What is broken about it? Is
it easy to fix? Or is it unimplemented?

Kind regards,
Jan Danielsson

Content-Type: application/pgp-signature; name="signature.asc"
Content-Description: OpenPGP digital signature
Content-Disposition: attachment; filename="signature.asc"

Version: GnuPG v1.4.4 (NetBSD)