Possible caja memory leak

Bug #1764727 reported by Taylor Conroy
36
This bug affects 8 people
Affects Status Importance Assigned to Milestone
caja (Ubuntu)
Expired
Undecided
Unassigned

Bug Description

Expected behavior:
> If no caja windows are open, caja memory usage should remain stable
> If caja windows are open, caja should use proportionally more memory based on how many windows are open, more complex folders being viewed, media files being previewed, etc.

Actual behavior:
See original discussion on https://ubuntu-mate.community/t/caja-memory-leak/16460

Caja gradually consumes more memory. When the caja process is started (e.g. system startup, restarting the process, etc.), it uses ~100 MB. However, after process startup the RAM usage begins creeping up. It happens at different rates, but a pretty typical example is ~0.5-1 MB/min. See the attached PNG for a graph of memory usage (scripts used to generate image included below). This continues, and eventually, will occupy almost 25% of the memory on my system (1.9 GB is the highest I have seen). The only thing I have been able to find to stop this is killing the caja process.

This increasing memory usage happens regardless of whether or not there are any caja windows open (although it does seem to happen faster when there are windows), and regardless of the number or type of files in the directory if a caja window is open.

Reinstalling the caja package did not resolve the issue.

System information:
- Ubuntu 17.10 (64-bit)
- Kernel version: 4.13.0.38-generic
- MATE package version: mate-desktop 1.18.0-1
- Caja package version: caja 1.18.4-0ubuntu2
- NVIDIA binary driver 390.25
- Customizations: show desktop icons enabled in MATE tweak, Compiz window manager, Adapta Nokto Eta GTK theme, Numix Circle icon theme, rotating desktop background slideshow using Variety (change every 10 min)
- Caja plugins: Send To, Wallpaper, Engrampa, Image Converter, User Share, libgtkhash-properties-caja, Share, Open terminal, xattr Tags, Atril properties, Gksu, Python-caja (deja, folder-color, caja-admin, caja-rename, syncthing-plugin-caja),

> Memory logging/graphing script derived from https://stackoverflow.com/questions/7998302/graphing-a-processs-memory-usage?utm_medium=organic&utm_source=google_rich_qa&utm_campaign=google_rich_qa
> Script used to log memory usage:
#!/bin/bash
#process_plot_caja.sh
while true; do
ps -p <caja PID> -o cmd=,%mem=,vsz= >> /tmp/mem_caja.log
gnuplot <path to gnuplot_caja.script>
sleep 1
done &

> Script used to plot memory output:
#!/bin/bash
#gnuplot_caja.script
set term png small size 800,600
set output "mem-graph-caja.png"

set ylabel "VSZ"
set y2label "%MEM"

set ytics nomirror
set y2tics nomirror in

set yrange [0:*]
set y2range [0:*]

plot "/tmp/mem_caja.log" using 3 with lines axes x1y1 title "VSZ", \
     "/tmp/mem_caja.log" using 2 with lines axes x1y2 title "%MEM"

ProblemType: Bug
DistroRelease: Ubuntu 17.10
Package: caja 1.18.4-0ubuntu2
ProcVersionSignature: Ubuntu 4.13.0-38.43-generic 4.13.16
Uname: Linux 4.13.0-38-generic x86_64
NonfreeKernelModules: nvidia_uvm nvidia_drm nvidia_modeset nvidia
ApportVersion: 2.20.7-0ubuntu3.8
Architecture: amd64
CurrentDesktop: MATE
Date: Tue Apr 17 07:44:41 2018
EcryptfsInUse: Yes
InstallationDate: Installed on 2017-01-09 (463 days ago)
InstallationMedia: Ubuntu-GNOME 16.10 "Yakkety Yak" - Release amd64 (20161012.1)
SourcePackage: caja
UpgradeStatus: Upgraded to artful on 2017-11-22 (146 days ago)

Revision history for this message
Taylor Conroy (greatheart111) wrote :
Revision history for this message
Cat Stevens (thebinaryminer) wrote :

I've also observed this. Over ~5 to 7 hours, caja version 1.20.2 memory usage reaches 2.5 or 3GB on Ubuntu 18.04 Bionic x86_64.

Killing the process causes it to free the memory, and it caja is restarted with no side-effects.

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

Status changed to 'Confirmed' because the bug affects multiple users.

Changed in caja (Ubuntu):
status: New → Confirmed
Revision history for this message
Slogger (slogger) wrote :

Just want to note I have a system with caja 1.20.2 where it's using 7.3 GiB after 15 days uptime.

Is there a correct way to restart caja?

Revision history for this message
Slogger (slogger) wrote :

Adding the obvious: `caja --quit` will make it restart.

Norbert (nrbrtx)
tags: removed: artful
tags: added: bionic
Revision history for this message
Martin Wimpress  (flexiondotorg) wrote :

Is this issue still present in Ubuntu MATE 22.04?

Changed in caja (Ubuntu):
status: Confirmed → Incomplete
Revision history for this message
Launchpad Janitor (janitor) wrote :

[Expired for caja (Ubuntu) because there has been no activity for 60 days.]

Changed in caja (Ubuntu):
status: Incomplete → Expired
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.