From owner-freebsd-gecko@FreeBSD.ORG Fri Sep 2 09:19:34 2011 Return-Path: Delivered-To: gecko@FreeBSD.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 21F08106564A; Fri, 2 Sep 2011 09:19:34 +0000 (UTC) (envelope-from avg@FreeBSD.org) Received: from citadel.icyb.net.ua (citadel.icyb.net.ua [212.40.38.140]) by mx1.freebsd.org (Postfix) with ESMTP id 2F3748FC17; Fri, 2 Sep 2011 09:19:32 +0000 (UTC) Received: from porto.starpoint.kiev.ua (porto-e.starpoint.kiev.ua [212.40.38.100]) by citadel.icyb.net.ua (8.8.8p3/ICyb-2.3exp) with ESMTP id MAA16645; Fri, 02 Sep 2011 12:19:30 +0300 (EEST) (envelope-from avg@FreeBSD.org) Received: from localhost ([127.0.0.1]) by porto.starpoint.kiev.ua with esmtp (Exim 4.34 (FreeBSD)) id 1QzPuM-000EZT-7C; Fri, 02 Sep 2011 12:19:30 +0300 Message-ID: <4E609F9F.6080208@FreeBSD.org> Date: Fri, 02 Sep 2011 12:19:27 +0300 From: Andriy Gapon User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:6.0) Gecko/20110830 Thunderbird/6.0 MIME-Version: 1.0 To: Florian Smeets References: <4E5F6753.3070402@FreeBSD.org> <4E5F737F.1070703@ksu.ru> <4E5F799C.7030509@FreeBSD.org> <4E5F7B22.40604@freebsd.org> In-Reply-To: <4E5F7B22.40604@freebsd.org> X-Enigmail-Version: undefined Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Cc: gnome@FreeBSD.org, gecko@FreeBSD.org Subject: Re: firefox-6.0_1 spinning on a cpu X-BeenThere: freebsd-gecko@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Gecko Rendering Engine issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Sep 2011 09:19:34 -0000 [CC-ing gnome@ who is listed as the maintainer of devel/nspr] on 01/09/2011 15:31 Florian Smeets said the following: > On 01.09.2011 14:25, Andriy Gapon wrote: >> on 01/09/2011 14:58 Marat N.Afanasyev said the following: >>> I have a seamonkey with the same symptoms, from time to time it eats several >>> cores >>> of my CPU. >> >> Just a general note: at these level of diagnosing it is not possible to say if >> you >> see the same problem or not. That's why I tried to provide a little bit more >> detailed symptoms. >> > > Yes, it's a known problem, however we did not get any further on this topic, yet. > > We have a PR which was filed some time ago ports/156889 which describes a > similar problem. > > What i do know is that i can easily provoke it by going to > http://localhost:$port where $port is some random port where nothing listens. > > Adriy, I'm very happy that someone with kernel knowledge got interested in this ;) :-) I guess you had a reason for that. > P.S. I doubt it is fixed in 6.0.1 You are right about this. The following patch for devel/nspr port fixes the problem for me: --- mozilla/nsprpub/pr/src/pthreads/ptio.c.orig 2011-09-02 12:00:35.233509956 +0300 +++ mozilla/nsprpub/pr/src/pthreads/ptio.c 2011-09-02 12:00:39.987512769 +0300 @@ -1635,7 +1635,7 @@ static PRStatus pt_ConnectContinue( PR_SetError(PR_BAD_DESCRIPTOR_ERROR, 0); return PR_FAILURE; } - if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR)) == 0) + if ((out_flags & (PR_POLL_WRITE | PR_POLL_EXCEPT | PR_POLL_ERR | PR_POLL_HUP)) == 0) { PR_ASSERT(out_flags == 0); PR_SetError(PR_IN_PROGRESS_ERROR, 0); I am not actually sure if this patch is really needed, maybe it should only be a temporary FreeBSD-specific workaround. I need now to investigate if POLLHUP may be set by an OS on a socket that has never been connected (for which connect(2) failed). -- Andriy Gapon