Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 16 Aug 2002 22:55:57 -0700 (PDT)
From:      Mike Harding <mvh@ix.netcom.com>
To:        sobomax@FreeBSD.org
Cc:        gnome@FreeBSD.org
Subject:   Re: ports/41209: www/mozilla browser serializes DNS lookups
Message-ID:  <20020817055557.EAC73132D2@netcom1.netcom.com>
In-Reply-To: <200208081220.g78CK41R014319@freefall.freebsd.org> (message from Maxim Sobolev on Thu, 8 Aug 2002 05:20:04 -0700 (PDT))
References:   <200208081220.g78CK41R014319@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

Err.. the man page for geaddrinfo least on -STABLE, sez:

BUGS
     The current implementation is not thread-safe.

- Mike H.

   Date: Thu, 8 Aug 2002 05:20:04 -0700 (PDT)
   Cc: 
   From: Maxim Sobolev <sobomax@FreeBSD.org>
   Reply-To: Maxim Sobolev <sobomax@FreeBSD.org>
   Sender: owner-freebsd-gnome@FreeBSD.ORG
   X-Loop: FreeBSD.ORG
   X-Spam-Status: No, hits=0.3 required=5.0
	   tests=PORN_10,AWL
	   version=2.31
   X-Spam-Level: 

   The following reply was made to PR ports/41209; it has been noted by GNATS.

   From: Maxim Sobolev <sobomax@FreeBSD.org>
   To: freebsd-gnats-submit@FreeBSD.org, agapon@excite.com
   Cc:  
   Subject: Re: ports/41209: www/mozilla browser serializes DNS lookups
   Date: Thu, 08 Aug 2002 15:18:13 +0300

    Andriy,

    Unfortunately, closer look at FreeBSD dns lookup code revealed that
    gethostbyXXX(3) family of functions aren't thread-safe, as they return
    pointers to a static storage. Therefore, applying the patch "as is"
    could lead to potential problems, when several threads will be trying
    to call gethostbyname(3) simulateneously. The possible solutions are
    to extend FreeBSD libc with gethostbyXXX_r(3) functions, similar to
    ones present in other unices out there (Solaris, HP-UX, BSDI), or to
    modify gethostbyXXX(3) functions to return pointers to a per thread
    storage.

    Another approach is to modify Mozilla to use getaddrinfo(3) function,
    which is available on BSDs and is thread-safe by design, instead of
    gethostbyname(3).

    -Maxim

   To Unsubscribe: send mail to majordomo@FreeBSD.org
   with "unsubscribe freebsd-gnome" in the body of the message


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-gnome" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020817055557.EAC73132D2>