From owner-freebsd-ports@FreeBSD.ORG Sun Jan 9 18:41:30 2011 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 1748B1065674 for ; Sun, 9 Jan 2011 18:41:30 +0000 (UTC) (envelope-from fluffy@fluffy.khv.ru) Received: from forward15.mail.yandex.net (forward15.mail.yandex.net [95.108.130.119]) by mx1.freebsd.org (Postfix) with ESMTP id 3DA7A8FC19 for ; Sun, 9 Jan 2011 18:41:24 +0000 (UTC) Received: from web134.yandex.ru (web134.yandex.ru [95.108.130.33]) by forward15.mail.yandex.net (Yandex) with ESMTP id 416FC44582BF; Sun, 9 Jan 2011 21:41:02 +0300 (MSK) Received: from localhost (localhost.localdomain [127.0.0.1]) by web134.yandex.ru (Yandex) with ESMTP id 2538052122C; Sun, 9 Jan 2011 21:41:02 +0300 (MSK) Received: from [46.38.1.85] ([46.38.1.85]) by mail.yandex.ru with HTTP; Sun, 09 Jan 2011 21:41:01 +0300 From: Dima Panov To: Denny Lin In-Reply-To: <20110108110016.GA72486@mail.hs.ntnu.edu.tw> References: <20110102113714.GA81113@mail.hs.ntnu.edu.tw> <868vz34d76.fsf@gmail.com> <4D228490.9080602@gmail.com> <20110108110016.GA72486@mail.hs.ntnu.edu.tw> MIME-Version: 1.0 Message-Id: <549101294598461@web134.yandex.ru> Date: Mon, 10 Jan 2011 04:41:01 +1000 X-Mailer: Yamail [ http://yandex.ru ] 5.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain; charset=koi8-r Cc: Anonymous , Volodymyr Kostyrko , freebsd-ports@freebsd.org Subject: Re: Ccache hangs while compiling and cache size is exaggerated X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 09 Jan 2011 18:41:30 -0000 Hello! 08.01.2011, 21:00, "Denny Lin" : > On Tue, Jan 04, 2011 at 04:23:12AM +0200, Volodymyr Kostyrko wrote: > >> š02.01.2011 16:01, Anonymous wrote: >>>> I'm using ccache 3.1.3, and it often hangs while compiling. >>> What its waiting channel? Hit ^T when it hangs or run under ktrace(1). > > This is what appears when I hit ^T: > load: 0.96 šcmd: ccache 25893 [zio->io_cv)] 3.83r 0.00u 0.06s 1% 1604k > >> šNot just every compilation attempt triggers it. Chances are closer to 100/1. > > Correct, but it's always triggered at the same point. > >>>> Every time this happens, the cache size from $ ccache -s also becomes >>>> ridiculously large (larger than the actual cache size). >>>> >>>> $ ccache -s >>>> [...] >>>> cache size ššš6.9 Gbytes >>>> The filesystem says it's only 2.9 GB. >>> How did you measure it? du(1) with `-A' option? >>> For example, compression can make difference > > Compression is turned off. > >> šI'd clarify this one. ccache reports size of cache +4G per damaged >> šsubdir. If damaged subdir would be removed ccache reports normal size of >> šcache again. >>>> I can reproduce this, but I don't know what is causing this. >> šThis gives high IO. When ccache thinks cache is full it tries to purge >> šit, yet purge does nothing. But this means walking all subdir per each >> šcompilation. > > This seems to be the exact reason ccache is hanging. Does anyone have a > clue why subdirs are getting damaged and how this can be prevented? I'm also affected by ccache stalling is some circumstances. In my case it's mostly for large ports with parallell build enabled (MAKE_JOBS_SAFE) -- Dima Panov (fluffy@FreeBSD.org) KDE@FreeBSD team Facebook: http://www.facebook.com/?id=100000181104157