Public bug reported:

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://paste.gnugen.ch/raw/oUhi

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://wiki.ubuntu.com/X/Reporting (last edited 
>in 2012) :
```
$ sudo cat /sys/kernel/debug/dri/0/i915_gem_objects
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
ProcVersionSignature: Ubuntu 5.4.0-56.62-generic 5.4.73
Uname: Linux 5.4.0-56-generic x86_64
ApportVersion: 2.20.11-0ubuntu27.13
Architecture: amd64
BootLog: Error: [Errno 13] Permission denied: '/var/log/boot.log'
CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: ubuntu:GNOME
Date: Sat Dec  5 05:51:04 2020
DistUpgraded: Fresh install
DistroCodename: focal
DistroVariant: ubuntu
ExtraDebuggingInterest: Yes
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=/boot/vmlinuz-5.4.0-56-generic 
root=UUID=356b9ac9-6bdb-4fd6-83a5-5fcec346ace9 ro quiet splash vt.handoff=7
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.asset.tag: Not Available
dmi.board.name: 20CLS28G02
dmi.board.vendor: LENOVO
dmi.board.version: SDK0E50510 WIN
dmi.chassis.asset.tag: 479364
dmi.chassis.type: 10
dmi.chassis.vendor: LENOVO
dmi.chassis.version: None
dmi.modalias: 
dmi:bvnLENOVO:bvrN10ET40W(1.19):bd12/08/2015:svnLENOVO:pn20CLS28G02:pvrThinkPadX250:rvnLENOVO:rn20CLS28G02:rvrSDK0E50510WIN:cvnLENOVO:ct10:cvrNone:
dmi.product.family: ThinkPad X250
dmi.product.name: 20CLS28G02
dmi.product.sku: LENOVO_MT_20CL_BU_Think_FM_ThinkPad X250
dmi.product.version: ThinkPad X250
dmi.sys.vendor: LENOVO
version.compiz: compiz N/A
version.libdrm2: libdrm2 2.4.101-2
version.libgl1-mesa-dri: libgl1-mesa-dri 20.0.8-0ubuntu1~20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx N/A
version.xserver-xorg-core: xserver-xorg-core 2:1.20.8-2ubuntu2.6
version.xserver-xorg-input-evdev: xserver-xorg-input-evdev N/A
version.xserver-xorg-video-ati: xserver-xorg-video-ati 1:19.1.0-1
version.xserver-xorg-video-intel: xserver-xorg-video-intel 
2:2.99.917+git20200226-1
version.xserver-xorg-video-nouveau: xserver-xorg-video-nouveau 1:1.0.16-1

** Affects: xorg (Ubuntu)
     Importance: Undecided
         Status: New


** Tags: amd64 apport-bug focal ubuntu

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1906906

Title:
  Memory leak in X.org

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/xorg/+bug/1906906/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to