Memory leak in X.org
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Ubuntu |
Expired
|
Undecided
|
Unassigned |
Bug Description
Hi, I think I've found a memory leek in X.org. The memory usage goes up and up (I was at ~3.4GB when I decided to open this bug report), and barely goes down when I close X clients (closing half of the windows brought me down to 3.3GB).
https:/
I'm using Ubuntu 20.04 LTS and I am kinda stuck with X.org for Wacom tablet support. This is quite annoying and made the system hang twice. (The system ran out of memory, which caused 100% CPU usage while Linux was trying not to kill anything, and a force reboot was required). I had to add more swap, because 8GB + the default 2GB of swap weren't enough.
From the debugging X wiki page http://
```
$ sudo cat /sys/kernel/
412 shrinkable [0 free] objects, 140279808 bytes
systemd-logind: 221 objects, 113086464 bytes (0 active, 0 inactive, 33603584 unbound, 0 closed)
Xorg: 221 objects, 113086464 bytes (0 active, 52482048 inactive, 33603584 unbound, 0 closed)
Xorg: 221 objects, 113086464 bytes (0 active, 0 inactive, 33603584 unbound, 0 closed)
Xorg: 857 objects, 274239488 bytes (0 active, 0 inactive, 146616320 unbound, 0 closed)
gnome-shell: 857 objects, 274239488 bytes (0 active, 127623168 inactive, 146616320 unbound, 0 closed)
gnome-shell: 857 objects, 274239488 bytes (0 active, 0 inactive, 146616320 unbound, 0 closed)
Xorg: 1 objects, 4096 bytes (0 active, 0 inactive, 4096 unbound, 0 closed)
```
After conversion, all bytes values are between 100 and 260MiB, which is large but not *that* large.
I know the basics of how to use GDB, but don't know how to find what's using the memory. I am willing to compile and test a patched package someone suggests a patch.
ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSign
Uname: Linux 5.4.0-56-generic x86_64
ApportVersion: 2.20.11-
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckR
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sat Dec 5 05:51:04 2020
DistUpgraded: Fresh install
DistroCodename: focal
DistroVariant: ubuntu
ExtraDebuggingI
GraphicsCard:
Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA controller])
Subsystem: Lenovo HD Graphics 5500 [17aa:2226]
InstallationDate: Installed on 2020-11-05 (29 days ago)
InstallationMedia: Ubuntu 20.04.1 LTS "Focal Fossa" - Release amd64 (20200731)
Lsusb:
Bus 001 Device 002: ID 8087:8001 Intel Corp.
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 003 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 002 Device 003: ID 5986:0366 Acer, Inc Integrated Camera
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
MachineType: LENOVO 20CLS28G02
ProcKernelCmdLine: BOOT_IMAGE=
SourcePackage: xorg
UpgradeStatus: No upgrade log present (probably fresh install)
dmi.bios.date: 12/08/2015
dmi.bios.vendor: LENOVO
dmi.bios.version: N10ET40W (1.19 )
dmi.board.
dmi.board.name: 20CLS28G02
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50510 WIN
dmi.chassis.
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.
dmi.modalias: dmi:bvnLENOVO:
dmi.product.family: ThinkPad X250
dmi.product.name: 20CLS28G02
dmi.product.sku: LENOVO_
dmi.product.
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.101-2
version.
version.
version.
version.
version.
version.
version.
description: | updated |
Leaks in the Xorg process are usually the fault of applications. Because application resources exist in the Xorg process and are allowed to outlive the application itself.
One known cause I can think of is LibreOffice. So please try logging out and in again and never starting LibreOffice. If that doesn't fix it then please follow the same steps with all your other big apps to try and find the cause.