From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp11.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms9.migadu.com with LMTPS id KPaFH4LnimR+CgEASxT56A (envelope-from ) for ; Thu, 15 Jun 2023 12:27:14 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp11.migadu.com with LMTPS id 6IBAH4LnimSeUQEA9RJhRA (envelope-from ) for ; Thu, 15 Jun 2023 12:27:14 +0200 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id F2C173A80C for ; Thu, 15 Jun 2023 12:27:13 +0200 (CEST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9kBl-0002K0-9d; Thu, 15 Jun 2023 06:26:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1q9kBj-0002Jc-1H; Thu, 15 Jun 2023 06:26:47 -0400 Received: from ns13.heimat.it ([46.4.214.66]) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1q9kBg-0000A1-W4; Thu, 15 Jun 2023 06:26:46 -0400 Received: from localhost (ip6-localhost [127.0.0.1]) by ns13.heimat.it (Postfix) with ESMTP id 5C17630085C; Thu, 15 Jun 2023 10:26:42 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at ns13.heimat.it Received: from ns13.heimat.it ([127.0.0.1]) by localhost (ns13.heimat.it [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id hB6HfIY2i-Kk; Thu, 15 Jun 2023 10:26:40 +0000 (UTC) Received: from bourrache.mug.xelera.it (unknown [93.56.171.217]) (using TLSv1.2 with cipher ECDHE-ECDSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by ns13.heimat.it (Postfix) with ESMTPSA id C80AF30022F; Thu, 15 Jun 2023 10:26:40 +0000 (UTC) Received: from roquette.mug.biscuolo.net (roquette [10.38.2.14]) by bourrache.mug.xelera.it (Postfix) with SMTP id 346A226FB595; Thu, 15 Jun 2023 12:26:40 +0200 (CEST) Received: (nullmailer pid 17934 invoked by uid 1000); Thu, 15 Jun 2023 10:26:39 -0000 From: Giovanni Biscuolo To: Guillaume Le Vaillant Cc: Help Guix , guix-devel@gnu.org Subject: stateful caches (was Re: OBS Studio memory leak) In-Reply-To: <871qify1i8.fsf@kitej> Organization: Xelera.eu References: <87y1kozvny.fsf@robbyzambito.me> <874jnbn6mk.fsf@kitej> <871qify1i8.fsf@kitej> Date: Thu, 15 Jun 2023 12:26:38 +0200 Message-ID: <87y1kl2f8h.fsf@xelera.eu> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha512; protocol="application/pgp-signature" Received-SPF: pass client-ip=46.4.214.66; envelope-from=g@xelera.eu; helo=ns13.heimat.it X-Spam_score_int: -18 X-Spam_score: -1.9 X-Spam_bar: - X-Spam_report: (-1.9 / 5.0 requ) BAYES_00=-1.9, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+larch=yhetil.org@gnu.org Sender: guix-devel-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1686824834; a=rsa-sha256; cv=none; b=EgTq/yJcDML0SK2xKgj/sJGtEfHHc9Fb1Z5aDmmkevcWCFOeyTF6ttdo8HOA5x56BUuknB iUYDGaF0HYfMG+HJx8A44thbQechZXzN4Fem2Uf2GpOozeU9bBAwQTCextiHiwzFbCbZDC A1kF7URoZmQTlFBWWpWtX2QIQY/hSNuEzE0LBfI21A6BvA5D+TuLO0PAYh9i2fWhlQJ5o/ ylUR4ehycDJ6nFKd+dkplDusCabrey3oYV9nKt8CQDKL8Z/xqdoeDJ5hgd557JqxyX9yz0 TzDxBbN5VXH52KvIXfKoXokC4o9MUx/krpaGstnp/UAfsQdPMgsqjZ79+2SyKQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1686824834; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=BOVee/TqVcYeYrIth8Lxco2mcMa3RYL6dE/82rgbb2A=; b=jLczKOOFFF4bFZMOWfBaORSNM/C7DoVCFFjXNu8FtPlbSN0BaAS7nR7Eb+U1iCgPk/aH/e h+uCaU0G0im+ggcN+E/ygK1GXqkGeKWtyEm7IYz3IXXir0qFF9paRqd0kMSBihwKKPZS/q hRcI5aMk4TBXAGtTdFW/EcMUkDT2oDctL9t79hKnpz0Y6McvNBXpNgYXf2+sRJ0P3XsYjY WQI6JJGDNUwoaJwYIPwIGH0Dhu62TrW04K56fDd6O8RUNrQGfZro/3uRQsG8yfHUwUcP1q A+zx8wvfVw/1BAWqJ4Eu97lm7RfnfXAUtClzbgVLqhFuEVrss3/I/uwpbHFnMg== Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Scanner: scn0.migadu.com X-Migadu-Spam-Score: -4.93 X-Spam-Score: -4.93 X-Migadu-Queue-Id: F2C173A80C X-TUID: n0gz2H8f8TZO --=-=-= Content-Type: text/plain Content-Transfer-Encoding: quoted-printable Hi Guillaume Le Vaillant and Guix Devels, sorry for cross-posting but IMHO the workaround you found [1] for the memory leak affecting a number of media processing applications is of interest for many people potentially not subscribed to help-guix AFAIK this was not filed as a Guix bug Guillaume Le Vaillant writes: > Ott Joon skribis: > >> Hey >> >> Tried the same thing in VLC and it freezes on GPU accel and starts >> leaking memory while also becoming hard to kill. Maybe this also >> explains why some mpv GPU accel settings don't work also in the exact >> same way. I have an AMD RX 6900 XT on this machine. [...] > It looks like an issue with the shader cache of mesa. > After clearing it, I don't see the memory leak anymore. good catch: please can you tell us how you managed to spot that problem? Did you straced it or did yoy find a related mesa bug report? do you think this bug (is it a bug, right?) needs to be reported upstream? I'm asking this because I "feel" we (I mean Guix users) could do something to help upstream removing this "status mismanagement" > Could you try doing a "rm -r $HOME/.cache/mesa_shader_cache/*" and see > if it also solves the issue for you? AFAIU this is "just" another instance of the "mismanaged state" error class, like the one(s) discussed back in Oct 2019 [2] and probably periodically recurring since the beginning of some (many) the upstream applications lifecycle. Back then, Efraim Flashner was using this snippet [2] in his OS-config: =2D-8<---------------cut here---------------start------------->8--- ;; This directory shouldn't exist (file-system (device "none") (mount-point "/var/cache/fontconfig") (type "tmpfs") (flags '(read-only)) (check? #f)) =2D-8<---------------cut here---------------end--------------->8--- It seems that a similar snippet could also be useful for all "~/.cache/*" :-O Happy hacking! Gio' [1] message id:87y1kozvny.fsf@robbyzambito.me [2] message id:20191018073501.GB1224@E5400 =2D-=20 Giovanni Biscuolo Xelera IT Infrastructures --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQJABAEBCgAqFiEERcxjuFJYydVfNLI5030Op87MORIFAmSK514MHGdAeGVsZXJh LmV1AAoJENN9DqfOzDkSMh8P/3pKDOZkenHazHJInAjQj6+nYKZ4giAP10uI6FRe lW7BHBND4erLUI58jlT4rh/vwnFNAEQEcj4+rILMwcj0BtqTV8ypu9CbHAj0LF/y 8R3HZiD76pLF/Uh1mglvMaZZ1/ALzIkAy6GkbExNzKl8Zc4LqysM4Kd1GxSJZp2F gl2n88qDjI0oXNyoqUat2wXJxdskINeiCCsrpKyXtC358+sgzIpVIczOqVDLlmvB wE0RBSHxV1G14j0XjfyDlZysvxWVLL9Rln7OIXiiqkCtHLeGHY2z8ZHhz9Rb0vJS /oAxDUGxLE/vNA1j3TqVKBECvjSXZD9/qW0j85E4klS87c7HgLDk5XShVL0l1noq S3TowQpRMQR+PDejhGIwS4J2QqLq0c5X9cRbJH9huVLtpbewIWm4npdywkJ1yf8r BLcT9Tw5AugjFfPr/X4Z2GqDfFCtIFmHqHlI6jsneh7yI+v4tZ463oOUqjSam0Ca t1aqjPqX6ZxhhtefCf6TxqOq6w2rT2WmbKw6Dqzt9KSOI4TAnap2IRagMexLmqLQ jib1gbljTfuAXTHqwY5xpp/N5cpWDQXWtJgpEoyQjY5qWJmUBPGxd9zsTgbhJ19B T5vQfHPnSpJj52Q63T3Fai+bsaRZzIUuy7T0eSrCtBOJnDUTnTfeiPAuHYfbD98i I/8S =IuR5 -----END PGP SIGNATURE----- --=-=-=--