From owner-freebsd-chromium@freebsd.org Wed Jul 6 14:13:38 2016 Return-Path: Delivered-To: freebsd-chromium@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 12BFCB75E4C for ; Wed, 6 Jul 2016 14:13:38 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mailman.ysv.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id F2B9E12E4 for ; Wed, 6 Jul 2016 14:13:37 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: by mailman.ysv.freebsd.org (Postfix) id F21C0B75E4B; Wed, 6 Jul 2016 14:13:37 +0000 (UTC) Delivered-To: chromium@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id F1C04B75E4A for ; Wed, 6 Jul 2016 14:13:37 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from mail.kapsi.fi (mx1.kapsi.fi [IPv6:2001:1bc8:1004::1:25]) (using TLSv1.2 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id B6F9A12E3 for ; Wed, 6 Jul 2016 14:13:37 +0000 (UTC) (envelope-from isoa@kapsi.fi) Received: from kirsikka.kapsi.fi ([217.30.184.185] helo=roundcube.kapsi.fi) by mail.kapsi.fi with esmtpsa (TLS1.2:DHE_RSA_AES_256_CBC_SHA256:256) (Exim 4.80) (envelope-from ) id 1bKna1-0002kH-OQ; Wed, 06 Jul 2016 17:13:33 +0300 MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Date: Wed, 06 Jul 2016 17:13:33 +0300 From: Arto Pekkanen To: Matthew Macy Cc: chromium Subject: Re: chrome spends all its time calling close Re: chrome spends all its time calling open In-Reply-To: <155ae2426da.ecd708a055370.6844710089510046027@nextbsd.org> References: <155ae2351dc.d435e15355364.689950361019774764@nextbsd.org> <155ae2426da.ecd708a055370.6844710089510046027@nextbsd.org> Message-ID: <23d62c1559ad130b7ae7f812ad7f0a0c@kapsi.fi> X-Sender: isoa@kapsi.fi User-Agent: RoundCube Webmail/0.9.4 X-SA-Exim-Connect-IP: 217.30.184.185 X-SA-Exim-Mail-From: isoa@kapsi.fi X-SA-Exim-Scanned: No (on mail.kapsi.fi); SAEximRunCond expanded to false X-BeenThere: freebsd-chromium@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: FreeBSD-specific Chromium issues List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 06 Jul 2016 14:13:38 -0000 Matthew Macy kirjoitti 03.07.2016 03:24: > Subject line was wrong. > > > ---- On Sat, 02 Jul 2016 17:23:18 -0700 Matthew Macy > wrote ---- > > > > While looking at other issues I tried running truss on chrome at > startup and I discovered a certain rather dysfunctional behavior: > > > > > > lanecrash# grep "close(" chrome.log | wc > > 1317903 7905445 68502169 > > planecrash# wc chrome.log > > 1466068 8798135 78854285 chrome.log > > > > It repeatedly calls close on 1 up to ~128000. System calls aren't > expensive per se, but if almost 95% of your system calls are close > you're doing something quite wrong. > > > > -M The FreeBSD port of Chromium does too many things wrong. It cannot even properly manage memory, because it's render processes frequently crash with SIGSEGV somewhere in the standard C++ library. Also the page www.kickstarter.com crashes everytime with Chromium specific MAPERR -error, which is yet again another instance implication that the memory management code does not work with FreeBSD. All these problems started a few years ago, cannot remember when. There are two PRs about these hard and soft crashes, but nobody has done anything to fix them. See here: https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=204454 <-- frequent tab crashes (soft crash) https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=207298 <-- kickstarter.com crashes (hard crash) The maintainers just keep updating the www/chromium port and hope that some newer version would make these issues go away, but I think the problem is deeper than that. Probably something to do with the behavioural differences of syscalls between FreeBSD and Linux. Such problems will not go away over version upgrades. I've done some of debugging myself, and figured out that the the SIGSEGV is triggered somewhere in libstdc++. But I cannot fix these issues because I am not familiar with the Chromium codebase, Linux vs FreeBSD syscall differences or even stdc++ specific issues. Also, Firefox doesn't work properly, it starts using 100% CPU after few hours of use. Again, no solutions, not enough PRs, nobody fixing the problem. There was some issue with the oss sound backend, but having it fixed still does not rectify the overall slowdown issue. We cannot even figure out where Firefox uses all the CPU because the FreeBSD version of Firefox does not support profiling at all. The compile time option PROFILE does absolutely nothing. Ergo, there are no stable, modern full featured browsers for FreeBSD users. Only unstable imports from Linux, pieced together with a bundle of patches. If we are to get a decent browser for FreeBSD, one of two things HAVE to happen: 1) a few FreeBSD developers become involved in Firefox and Chromium development, actually fixing these problems with communication and collaboration upstream or 2) somebody needs to create a modern, full featured browser specifically for FreeBSD Not sure if any of these gonna happen any time soon. -- Arto Pekkanen