Hypertable uses dns very lightly mostly at init stage. I don't know if you've used libadns before, the interface is quite hairy. The easiest fix would be an #ifdef for linux etc. As it turns out, gethostbyname is actually thread safe on recent OS X (Darwin. The manual is outdated) using thread local storage.
Donald, have you found out where InetAddr::initialize(host, port) is being called by multiple threads? __Luke On Oct 9, 8:36 am, "Mateusz Berezecki" <[EMAIL PROTECTED]> wrote: > On Thu, Oct 9, 2008 at 4:58 PM, Liu Kejia(Donald) <[EMAIL PROTECTED]> wrote: > > > I believe I've found the problem: In function InetAddr::initialize(), > > the non-reentrant function gethostbyname() is used unprotected. I've > > replaced it with gethostbyname_r() and tested 3 more times, the > > problem didn't occur any more. > > > According to its manpage, gethostbyname_r() seems to be only available > > in Linux. So a simple substitution may influence Hypertable's > > portability. I wonder if there is any other more portable solution? > > perhaps libadns ? > > http://www.chiark.greenend.org.uk/~ian/adns/ > > Mateusz --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Hypertable Development" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/hypertable-dev?hl=en -~----------~----~----~----~------~----~------~--~---
