Shotwell bug - Out of memory #5123

Bug #2080004 reported by Jon
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Shotwell
Fix Released
Unknown
shotwell (Debian)
Fix Released
Unknown
shotwell (Ubuntu)
Fix Released
High
Nathan Teodosio
Noble
Fix Released
High
Nathan Teodosio

Bug Description

Impact
------

A memory leak that will cause Shotwell process to increasingly eat memory constantly during a slideshow.

Test case
---------

*Start Shotwell and import a folder with about 10 photos; End Shotwell.

*Save this script and execute it:

--->
#!/bin/sh
shotwell &
pid=$!
statm=/proc/$pid/statm
time=0
inc=1
version=$(dpkg-query -f '${Version}' -W shotwell)

while test -e "$statm"; do
    #https://www.kernel.org/doc/html/latest/filesystems/proc.html
    stack=$(cut -f6 -d' ' "$statm")
    printf "%s %s\n" "$time" "$stack"
    sleep "$inc"
    time=$((time+inc))
done > "$version.dat"
<---

*Press F5 to start slideshow and keep pressing right arrow to cycle through the photo set about 3 times.

*End Shotwell.

Expected: The memory logged in the *.dat file stops increasing instead of steadily and indefinidetely increasing.

You can use "xmgrace -legend load *.dat" to get a plot of the behavior before and after the fix for easier visualization (see attached shotwell-stat.png).

Regression potential
--------------------

The changes are on a function that causes the Pixbuf cache to be regenerated and the UI updated, so it should suffice to observe that images are loaded alright in the slide show.

Further information
-------------------

Bug upstream: https://gitlab.gnome.org/GNOME/shotwell/-/issues/5123

Fix upstream: https://gitlab.gnome.org/GNOME/shotwell/-/commit/fa6884f73af83ccbc72b8fe0f7bc63a00630ee0b

Jon (jredinge)
description: updated
Changed in shotwell:
status: Unknown → Fix Released
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thank you for your bug report and pointing to the patch, that's one we should cherrypick indeed

Changed in shotwell (Ubuntu):
status: New → Triaged
importance: Undecided → High
tags: added: udeng-4471
Revision history for this message
Jon (jredinge) wrote :

Happy to help, Sebastien. I feel silly for asking, but how should I expect to get the patch now? Don't work too hard answering, just point me at the answer. :D

Thanks!

Jon

Revision history for this message
Sebastien Bacher (seb128) wrote :

You will get it through a standard update, the bug will be updated with details once the package is uploaded

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

Fix confirmed in 24.10.

description: updated
Changed in shotwell (Ubuntu):
assignee: nobody → Nathan Teodosio (nteodosio)
status: Triaged → In Progress
Revision history for this message
Nathan Teodosio (nteodosio) wrote :
description: updated
no longer affects: shotwell (Ubuntu Noble)
no longer affects: shotwell (Ubuntu Focal)
no longer affects: shotwell (Ubuntu Jammy)
Changed in shotwell (Ubuntu Noble):
importance: Undecided → High
assignee: nobody → Nathan Teodosio (nteodosio)
Revision history for this message
Sebastien Bacher (seb128) wrote :

I've added the launchpad bug reference to the changelog and uploaded to oracular

Changed in shotwell (Ubuntu):
status: In Progress → Fix Committed
Revision history for this message
Nathan Teodosio (nteodosio) wrote : 24.04

Thanks!

Also verified fix for 24.04, patch attached.

Changed in shotwell (Ubuntu Noble):
status: New → Fix Committed
Revision history for this message
Sebastien Bacher (seb128) wrote :

Thanks, I've uploaded to Noble also now

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shotwell - 0.32.7-1ubuntu3

---------------
shotwell (0.32.7-1ubuntu3) oracular; urgency=high

  [ Jens Georg ]
  * d/p/memory-leak: Fix memory leak in slideshow. (lp: #2080004)

 -- Nathan Pratta Teodosio <email address hidden> Thu, 26 Sep 2024 09:51:56 +0200

Changed in shotwell (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Robie Basak (racb) wrote : Please test proposed package

Hello Jon, or anyone else affected,

Accepted shotwell into noble-proposed. The package will build now and be available at https://launchpad.net/ubuntu/+source/shotwell/0.32.6-1ubuntu2 in a few hours, and then in the -proposed repository.

Please help us by testing this new package. See https://wiki.ubuntu.com/Testing/EnableProposed for documentation on how to enable and use -proposed. Your feedback will aid us getting this update out to other Ubuntu users.

If this package fixes the bug for you, please add a comment to this bug, mentioning the version of the package you tested, what testing has been performed on the package and change the tag from verification-needed-noble to verification-done-noble. If it does not fix the bug for you, please add a comment stating that, and change the tag to verification-failed-noble. In either case, without details of your testing we will not be able to proceed.

Further information regarding the verification process can be found at https://wiki.ubuntu.com/QATeam/PerformingSRUVerification . Thank you in advance for helping!

N.B. The updated package will be released to -updates after the bug(s) fixed by this package have been verified and the package has been in -proposed for a minimum of 7 days.

tags: added: verification-needed verification-needed-noble
Revision history for this message
Nathan Teodosio (nteodosio) wrote :

I installed Shotwell from noble-proposed (0.32.6-1ubuntu2), imported 8 photos into it, executed the script in the test plan, cycled through the photo set about 3 times and immediately terminated shotwell.

I verify that the stack memory hits a plateau (plot attached).

tags: added: verification-done verification-needed-done
removed: verification-needed verification-needed-noble
tags: added: verification-done-noble
removed: verification-needed-done
Revision history for this message
Jon (jredinge) wrote :

Running my own test case - shotwell version 0.32.6-1ubuntu2. Running slideshow of entire library (27k+ photos) advancing at one-second intervals. System monitor shows shotwell doesn't continue to consume and not release memory like it used to. Will report again in 24 hours to affirm shotwell is still running and memory utilization is stable.

Revision history for this message
Jon (jredinge) wrote :

Shotwell is still chugging along. 167GB disk read total, memory util is stable at about 600MB.

Ship it.

Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package shotwell - 0.32.6-1ubuntu2

---------------
shotwell (0.32.6-1ubuntu2) noble; urgency=medium

  [ Jens Georg ]
  * d/p/memory-leak: Fix memory leak in slideshow (LP: #2080004).

 -- Nathan Pratta Teodosio <email address hidden> Thu, 26 Sep 2024 11:06:33 +0200

Changed in shotwell (Ubuntu Noble):
status: Fix Committed → Fix Released
Revision history for this message
Andreas Hasenack (ahasenack) wrote : Update Released

The verification of the Stable Release Update for shotwell has completed successfully and the package is now being released to -updates. Subsequently, the Ubuntu Stable Release Updates Team is being unsubscribed and will not receive messages about this bug report. In the event that you encounter a regression using the package from -updates please report a new bug using ubuntu-bug and tag the bug report regression-update so we can easily find any regressions.

Revision history for this message
Nathan Teodosio (nteodosio) wrote :

This caused regression LP:2084777 so the package released to 24.04 is halted.

Changed in shotwell (Debian):
status: Unknown → New
Changed in shotwell (Debian):
status: New → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.