Subject: Re: bin/25748: mozilla stopped working
To: None <dokas@cs.umn.edu>
From: Shin'ichiro TAYA <taya@ba2.so-net.ne.jp>
List: current-users
Date: 06/03/2004 11:06:46
From: Paul Dokas <dokas@cs.umn.edu>
Subject: Fw: bin/25748: mozilla stopped working
Date: Tue, 1 Jun 2004 23:49:14 -0500
> Looking deeper into this with GDB, I noticed that there were about 10 running threads
> at the time of the crash. And of those threads, about half appear to have been doing
> DNS lookups.
>
> Is there any chance that the new resolver library is responsible for this? Is it
> possible that it's not thread safe? Or that there's something in the way that
> mozilla is calling the new library vs the old one?
There is a patch to prevent multiple DNS lookup simultaneously.
If your analysis is correct, problem is in "LOCK_DNS()".
But I don't known what "LOCK_DNS()" is doing actually.
$NetBSD: patch-br,v 1.3 2004/02/22 12:02:55 taya Exp $
--- nsprpub/pr/src/misc/prnetdb.c.orig 2004-02-19 21:45:15.000000000 +0900
+++ nsprpub/pr/src/misc/prnetdb.c 2004-02-19 21:50:57.000000000 +0900
@@ -2094,7 +2094,12 @@
*/
hints.ai_socktype = SOCK_STREAM;
+ LOCK_DNS();
+
rv = GETADDRINFO(hostname, NULL, &hints, &res);
+
+ UNLOCK_DNS();
+
if (rv == 0)
return (PRAddrInfo *) res;