Ubuntu 24.04 - File operations on top of a CIFS mount leak memory

Ubuntu Version: 24.04 LTS

Problem Description:
We basically have the same issue as Ubuntu 24.04 - File operations on top of a CIFS mount leak memory. Unfortunately this topic has been closed automatically and I seem not to be able to respond to it.

The leak occurs also with newest kernel 6.8.0-60-generic and as stated in the original topic, there is no leak with kernel 6.8.0-31-generic.

Enforcing a periodic reboot seems like an awkward workaround. Same is true for pinning an outdated kernel.

This is the same CIFS bug that slipped in after 6.8.0-31: every time a file on a share is closed the client leaks the “lease key” object, so memory keeps growing. The fix is already in the newer noble kernels but hasn’t landed in the ordinary 24.04 update channel yet.

What you can do right now:

Jump to the proposed kernel that already contains the patch.

sudo apt install linux-image-generic -proposed \
                 linux-modules-extra-generic -proposed
sudo reboot

Kernel 6.8.0-64.10 (or newer) in -proposed includes the CIFS fix. You can stay on it until it moves to the normal -updates pocket, usually within a week or two.

Or temporarily roll back to the last good kernel.

sudo apt install linux-image-6.8.0-31-generic \
                 linux-modules-6.8.0-31-generic
sudo apt-mark hold linux-image-generic linux-headers-generic
sudo reboot

That stops the leak immediately. When you see 6.8.0-64 (or later) appear in the standard updates, run sudo apt-mark unhold … and upgrade.

If you’d rather wait, the patched kernel is already in Canonical’s QA pipeline and should hit the regular repositories soon—just watch apt list --upgradable for linux-image-6.8.0-64.x-generic.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.