← Back to issue list

Desktop extension doesn't update GDK pixbuf module cache when reverting

View original Launchpad issue

Metadata

Project
snapcraft (launchpad)
Number
#2041182
Type
issue
State
open
Author
~gbeuzeboc
Labels
—
Created
Updated
Closed
—

Current evaluation

Desktop extensions keep a revision-specific .last_revision while sharing its GDK pixbuf cache, so snap reverts can reuse loaders from another revision and crash; the maintainer-approved move is not implemented.

Suggested action: keep open

Reason: The current code still sources and writes .last_revision under SNAP_USER_DATA, while desktop-exports places the GDK pixbuf cache under SNAP_USER_COMMON and regenerates it based on needs_update. A maintainer explicitly agreed that moving the marker to SNAP_USER_COMMON and deleting any existing revision-specific marker is safer; no resolving commit or PR was found.

Evaluated by: mr-cal-bot

Impact: 68 Quick Win: 42 Complexity: 28 Confidence: 91 Actionability: 86

Issue body

The file .last_revision is stored under $SNAP_USER_DATA (revision specific)(https://github.com/snapcore/snapcraft/blob/main/extensions/desktop/common/init#L34), that is supposed to store the number of the revision. Only if the content of the file changed (which normally cannot happen since only the dedicated revision can access its dedicated $SNAP_USER_DATA) or if the file didn't exist (first start) the snap is going to "update". This update is especially generating the GDK pixbuf module file (the cache file, https://github.com/snapcore/snapcraft/blob/main/extensions/desktop/common/desktop-exports#L414) in the $SNAP_USER_COMMON (common to revisions). This cache file is holding hardcoded absolute path to libraries. The scenario that is causing the problem: - install rev 1   - launching it   - need update since no .last_revision file   - generating the cache file pointing to rev 1 lib   - writing the last_revision file - install rev 2   - launching it   - need update since no last_revision file   - generating the cache file pointing to rev 2 lib   - writing the .last_revision file - reverting to rev 1   - launching it   - .last_revision file already exist and contains the rev 1   - no need to regenerate the cache   - crash because we used the cache file pointing to rev2 libraries Because the .last_revision file is stored in a revision specific space, it cannot contain anything else than the revision it's supposed to hold. Hence, it is only used at the first launch. No update can happen otherwise. Having the cache stored in a revision common space and the file controlling its update in a revision specific space seems to be the issue. If the .last_revision file was placed in the $SNAP_USER_COMMON space it would allow a snap to "update" (thus regenerate the GDK pixbuf module file) after a revert. This issue seems to affect gnome extension for all core versions. Additionally, the electron-builder snap is also affected by it.

Evaluation history

Date Model Scores Action Summary
stealth/space-bunny-alpha
Impact: 68
Quick Win: 42
Complexity: 28
Confidence: 91
Actionability: 86
keep open Desktop extensions keep a revision-specific .last_revision while sharing its GDK pixbuf cache, so snap reverts can reuse loaders from another revision and crash; the maintainer-approved move is not implemented.
stealth/space-bunny-alpha
Impact: 52
Quick Win: 34
Complexity: 25
Confidence: 86
Actionability: 88
keep open Desktop extension stores .last_revision in revision-specific $SNAP_USER_DATA but writes the gdk-pixbuf cache to shared $SNAP_USER_COMMON, so reverting to a prior revision reuses stale loaders with hardcoded library paths and crashes. Maintainer agreed to move the file; not yet implemented.
stealth/space-bunny-alpha
Impact: 46
Quick Win: 26
Complexity: 36
Confidence: 88
Actionability: 90
needs triage Reverting a desktop-extension snap can leave a shared GDK pixbuf cache pointing to a newer revision, causing crashes. The reproducible report remains untriaged after 1064 days.
qwen3.6-35b-a3b-mtp-q6
Impact: 65
Quick Win: 29
Staleness: 85
Complexity: 55
Confidence: 35
Support Request: 15
needs triage Desktop extension GDK pixbuf cache not regenerated on snap revert, causing crashes. Open 1043 days with no maintainer engagement or labels.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 5
needs triage Bug in snapcraft desktop extension where reverting a snap revision crashes due to a stale GDK pixbuf cache. Unlabelled, zero maintainer comments, inactive for ~2.7 years.
qwen/qwen3.6-35b-a3b
Staleness: 95
Complexity: 60
Confidence: 80
Support Request: 5
close stale Desktop extension fails to regenerate GDK pixbuf cache on snap revert, causing crashes due to stale library paths. Unlabeled, 0 comments, inactive for ~2.7 years.
qwen3.6-35b-a3b-mtp-q6
Staleness: 95
Complexity: 60
Confidence: 85
Support Request: 5
close stale Desktop extension fails to regenerate GDK pixbuf cache on snap revert, causing crashes. Reported 2.7 years ago with no maintainer engagement or labels.

Update history

Date Change
created

Related issues

Issue Project State Summary Similarity
#2948 Regenerate the GDK pixbuf loaders cache file if for whatever reason it isn't there (LP: #1863801). snapcraft merged PR #2948 merged as commit cb101dfaf: desktop extension's common/desktop-exports now regenerates the GDK pixbuf loaders cache when the file is missing (fixes LP: #1863801, chromium snap GTK file chooser crashes). Backport of snapcraft-desktop-helpers 769110c.
77%