GNU bug report logs - #35683
wishlist: addessing statefulness of .cache(s)

Previous Next

Package: guix;

Reported by: Giovanni Biscuolo <g <at> xelera.eu>

Date: Sat, 11 May 2019 07:34:01 UTC

Severity: wishlist

To reply to this bug, email your comments to 35683 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 07:34:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Giovanni Biscuolo <g <at> xelera.eu>:
New bug report received and forwarded. Copy sent to bug-guix <at> gnu.org. (Sat, 11 May 2019 07:34:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: bug-guix <at> gnu.org
Subject: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 09:32:43 +0200
[Message part 1 (text/plain, inline)]
Hi Guix,

AFAIU issues like the two I point below are becoming a common pattern
and are *critical*

1. gnome session not starting due to state in $HOME/.cache
   http://lists.gnu.org/archive/html/guix-devel/2019-04/msg00177.html
   Message-ID: <87ef68ibfy.fsf <at> elephly.net>

Ricardo Wurmus:
--8<---------------cut here---------------start------------->8---
What should we do about this?  For gdm I think it would make sense to
add an activation service extension that clears the gdm user’s home
directory.  And more generally, maybe we should offer a generic cache
cleaner service.
--8<---------------cut here---------------end--------------->8---

2. X broken display transitioning from llvm6 to llvm7 in the mesa package
   http://lists.gnu.org/archive/html/guix-devel/2019-05/msg00223.html
   Message-ID: <20190511022009.nnu6szga6desvfwd <at> cf0>
   see also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35575

ison:
--8<---------------cut here---------------start------------->8---
Note that deleting both shader caches was required, and also if the caches get
rebuilt on a new generation and then I try to boot into an older previously
working generation then that generation will display graphics artifacts until
the caches are deleted again.

So switching between mesa compiled with llvm 6 and 7 on AMD RX 580 either
backward or forward requires manually deleting the shader caches.
--8<---------------cut here---------------end--------------->8---


AFAIU unfortunately we have application/library state all over .cache(s)
that sometimes crashes software *and* trying to fix this upstream it's
_not_ an option [1]

often users have to delete something in some .cache by guessing, "just"
to solve some strange software crash (this is common to all distros)

maybe an activation service extension proposed by Ricardo (see above)
is the right solution: I'll try to make a summary of prevoius
discussions on this topic on guix-devel to help address this (class of)
issue(s)... sorry I cannot help coding it

WDYT?

Thanks! Gio'



[1] I say this observing this class of issues since I started using free
software: am I wrong?


-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 07:45:02 GMT) Full text and rfc822 format available.

Message #8 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Julien Lepiller <julien <at> lepiller.eu>
To: Giovanni Biscuolo <g <at> xelera.eu>,35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 09:43:44 +0200
Le 11 mai 2019 09:32:43 GMT+02:00, Giovanni Biscuolo <g <at> xelera.eu> a écrit :
>Hi Guix,
>
>AFAIU issues like the two I point below are becoming a common pattern
>and are *critical*
>
>1. gnome session not starting due to state in $HOME/.cache
>   http://lists.gnu.org/archive/html/guix-devel/2019-04/msg00177.html
>   Message-ID: <87ef68ibfy.fsf <at> elephly.net>
>
>Ricardo Wurmus:
>--8<---------------cut here---------------start------------->8---
>What should we do about this?  For gdm I think it would make sense to
>add an activation service extension that clears the gdm user’s home
>directory.  And more generally, maybe we should offer a generic cache
>cleaner service.
>--8<---------------cut here---------------end--------------->8---
>
>2. X broken display transitioning from llvm6 to llvm7 in the mesa
>package
>   http://lists.gnu.org/archive/html/guix-devel/2019-05/msg00223.html
>   Message-ID: <20190511022009.nnu6szga6desvfwd <at> cf0>
>   see also https://debbugs.gnu.org/cgi/bugreport.cgi?bug=35575
>
>ison:
>--8<---------------cut here---------------start------------->8---
>Note that deleting both shader caches was required, and also if the
>caches get
>rebuilt on a new generation and then I try to boot into an older
>previously
>working generation then that generation will display graphics artifacts
>until
>the caches are deleted again.
>
>So switching between mesa compiled with llvm 6 and 7 on AMD RX 580
>either
>backward or forward requires manually deleting the shader caches.
>--8<---------------cut here---------------end--------------->8---
>
>
>AFAIU unfortunately we have application/library state all over
>.cache(s)
>that sometimes crashes software *and* trying to fix this upstream it's
>_not_ an option [1]
>
>often users have to delete something in some .cache by guessing, "just"
>to solve some strange software crash (this is common to all distros)
>
>maybe an activation service extension proposed by Ricardo (see above)
>is the right solution: I'll try to make a summary of prevoius
>discussions on this topic on guix-devel to help address this (class of)
>issue(s)... sorry I cannot help coding it
>
>WDYT?
>
>Thanks! Gio'
>
>
>
>[1] I say this observing this class of issues since I started using
>free
>software: am I wrong?

I wonder if we could mount a tmpfs on .cache? Would that be enough?




Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 07:51:01 GMT) Full text and rfc822 format available.

Message #11 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: 35683 <at> debbugs.gnu.org
Subject: Re: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 09:50:27 +0200
[Message part 1 (text/plain, inline)]
Giovanni Biscuolo <g <at> xelera.eu> writes:

> AFAIU issues like the two I point below are becoming a common pattern
> and are *critical*

linked bug report:

- bug#35669: Mesa is failing an assertion

[...]

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 11:46:02 GMT) Full text and rfc822 format available.

Message #14 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: bug-guix <at> gnu.org
Cc: 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 13:45:03 +0200
[Message part 1 (text/plain, inline)]
ehlo Giovanni,

Giovanni Biscuolo wrote:
> AFAIU unfortunately we have application/library state all over 
> .cache(s)
> that sometimes crashes software *and* trying to fix this 
> upstream it's
> _not_ an option [1]

Oh.  That's… disappointing to say the least, since these are both 
upstream bugs that Guix can't fix :-(

What exactly did you ask?  What was their response?

> often users have to delete something in some .cache by guessing, 
> "just"
> to solve some strange software crash (this is common to all 
> distros)

I have never had to do this, ever.

> maybe an activation service extension proposed by Ricardo (see 
> above)
> is the right solution: I'll try to make a summary of prevoius
> discussions on this topic on guix-devel to help address this 
> (class of)
> issue(s)... sorry I cannot help coding it

We can randomly delete whole caches in the user's stead but it's 
never the ‘right’ solution.  Only the application can manage its 
caches properly.  I still hope this is possible in both cases 
here.

Kind regards,

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 11:46:02 GMT) Full text and rfc822 format available.

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 11:52:02 GMT) Full text and rfc822 format available.

Message #20 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Tobias Geerinckx-Rice <me <at> tobias.gr>
To: Julien Lepiller <julien <at> lepiller.eu>
Cc: Giovanni Biscuolo <g <at> xelera.eu>, 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 13:51:15 +0200
[Message part 1 (text/plain, inline)]
Julien,

Julien Lepiller wrote:
> I wonder if we could mount a tmpfs on .cache? Would that be 
> enough?

Seems a shame to waste RAM like that, when we could (ab)use FUSE: 
<https://github.com/xrgtn/nullfs>.

;-)

T G-R
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sat, 11 May 2019 13:01:01 GMT) Full text and rfc822 format available.

Message #23 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Giovanni Biscuolo <g <at> xelera.eu>
To: Tobias Geerinckx-Rice <me <at> tobias.gr>, 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sat, 11 May 2019 14:59:49 +0200
[Message part 1 (text/plain, inline)]
Hello Tobias,

Tobias Geerinckx-Rice <me <at> tobias.gr> writes:

> Giovanni Biscuolo wrote:
>> AFAIU unfortunately we have application/library state all over 
>> .cache(s)
>> that sometimes crashes software *and* trying to fix this 
>> upstream it's
>> _not_ an option [1]
>
> Oh.  That's… disappointing to say the least, since these are both 
> upstream bugs that Guix can't fix :-(
>
> What exactly did you ask?  What was their response?

I did not ask upstream, sorry for the misunderstanding: I'm just sharing
my *personal* experience, and I confess I never tried to report this
class of bugs upstream, I just fixed the issue with "rm
<somewhere>/.cache/<something>"

AFAIO (as far as I'm observing) this is a common pattern, for some
current Guix bug reports too (see previously provided links)

to be clear: I'm not stating we should not report upstream and help them
:-)

>> often users have to delete something in some .cache by guessing, 
>> "just"
>> to solve some strange software crash (this is common to all 
>> distros)
>
> I have never had to do this, ever.

lucky? :-) or Very Stateless™ userland configuration?

I'm not saying I had to do this sort of cache cleaning every week, but I
had to do that Too Often™ to be accepteble to me, on multiple
installations in 10 years

[...]

> We can randomly delete whole caches in the user's stead but it's 
> never the ‘right’ solution.

I agree, but please consider that we have to manage some upstream
defects [1], sometimes :-S

> Only the application can manage its caches properly.  I still hope
> this is possible in both cases here.

OK, but meanwhile?
IMHO it's not acceptable to have critical Guix services (e.g. GDM)
blocked by similar issues

...and sometimes (often?) statefullness of .cache is not considered
upstream, so I suspect this class of upstream bugs are _not_ going to
end soon


Thank you for your contribution! Gio'



[1] having data in .cache that crashes applications and services is bad
design IMHO, let alone having configuration in .cache

-- 
Giovanni Biscuolo

Xelera IT Infrastructures
[signature.asc (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sun, 12 May 2019 09:33:02 GMT) Full text and rfc822 format available.

Message #26 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Danny Milosavljevic <dannym <at> scratchpost.org>
To: Giovanni Biscuolo <g <at> xelera.eu>
Cc: 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sun, 12 May 2019 11:32:42 +0200
[Message part 1 (text/plain, inline)]
> --8<---------------cut here---------------start------------->8---
> What should we do about this?  For gdm I think it would make sense to
> add an activation service extension that clears the gdm user’s home
> directory.  And more generally, maybe we should offer a generic cache
> cleaner service.

I don't like that workaround much.  I mean for the time being I guess it's
OK, but let's file bug reports upstream so they are aware of the problem.

Better would be if the cache directory contained a "cache-protocol-version"
file or something and make the client program heed it and make it clear the
cache if it's the wrong version, without any Guix special case (the problem
is not not Guix-specific anyway).

It's not exactly difficult.   Most of the time the bug reports just don't
get filed--and cache invalidation is always an afterthought when 
implementing a cache (sadly).

If they say no we can still keep the workaround.
[Message part 2 (application/pgp-signature, inline)]

Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Sun, 12 May 2019 21:31:02 GMT) Full text and rfc822 format available.

Message #29 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: swedebugia <swedebugia <at> riseup.net>
To: 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Sun, 12 May 2019 23:29:55 +0200
On 2019-05-11 14:59, Giovanni Biscuolo wrote:
> Hello Tobias,
> 
> Tobias Geerinckx-Rice <me <at> tobias.gr> writes:
...


>>> often users have to delete something in some .cache by guessing,
>>> "just"
>>> to solve some strange software crash (this is common to all
>>> distros)
>>
>> I have never had to do this, ever.

I have no memories having to do this either during the last 15 years.

...

> [1] having data in .cache that crashes applications and services is bad
> design IMHO, let alone having configuration in .cache

+1


-- 
Cheers
Swedebugia




Information forwarded to bug-guix <at> gnu.org:
bug#35683; Package guix. (Tue, 14 May 2019 07:49:02 GMT) Full text and rfc822 format available.

Message #32 received at 35683 <at> debbugs.gnu.org (full text, mbox):

From: Ludovic Courtès <ludo <at> gnu.org>
To: Danny Milosavljevic <dannym <at> scratchpost.org>
Cc: Giovanni Biscuolo <g <at> xelera.eu>, 35683 <at> debbugs.gnu.org
Subject: Re: bug#35683: wishlist: addessing statefulness of .cache(s)
Date: Tue, 14 May 2019 09:47:55 +0200
Hi Danny,

Danny Milosavljevic <dannym <at> scratchpost.org> skribis:

> Better would be if the cache directory contained a "cache-protocol-version"
> file or something and make the client program heed it and make it clear the
> cache if it's the wrong version, without any Guix special case (the problem
> is not not Guix-specific anyway).

I’d be surprised if applications and libraries using ~/.cache such as
Mesa didn’t have some versioning mechanism allowing them to detect stale
cache files.  Overall, Guix isn’t special in that respect.

The problem we experienced with Mesa shader caches are probably not
Guix-specific.  I think we should try to gather more info about the
stale .cache files that trigger a Mesa crash so that we can make a
useful bug report to the Mesa developers.

(I’m saying this as someone who did not experience the crash, heheh.  :-))

Thoughts?

Thanks,
Ludo’.




This bug report was last modified 6 years and 29 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.