memory leak in xorg-server 2:1.20.9-2ubuntu1.2~20.04.2

Bug #1930641 reported by Jan Newmarch
8
This bug affects 1 person
Affects Status Importance Assigned to Milestone
libreoffice (Ubuntu)
New
Undecided
Unassigned
xorg-server (Ubuntu)
Invalid
Undecided
Unassigned

Bug Description

Progressive memory leak in Xorg. With 16Gb RAM, memory use increases by about 1% each day according to top. Started at about 1%, now 24% after nearly 3 weeks. Video driver is i915, uname -m shows x86_64. Ubuntu 20.04, up to date as at 29 May 2021. HDMI connector.

ProblemType: Bug
DistroRelease: Ubuntu 20.04
Package: xorg 1:7.7+19ubuntu14
ProcVersionSignature: Ubuntu 5.4.0-73.82-generic 5.4.106
Uname: Linux 5.4.0-73-generic x86_64
.tmp.unity_support_test.0:

ApportVersion: 2.20.11-0ubuntu27.18
Architecture: amd64
BootLog:

CasperMD5CheckResult: skip
CompositorRunning: None
CurrentDesktop: GNOME-Flashback:GNOME
Date: Thu Jun 3 11:06:35 2021
DistUpgraded: 2021-04-26 20:35:01,095 ERROR got error from PostInstallScript ./xorg_fix_proprietary.py (g-exec-error-quark: Failed to execute child process “./xorg_fix_proprietary.py” (No such file or directory) (8))
DistroCodename: focal
DistroVariant: ubuntu
DkmsStatus:
 virtualbox, 6.1.16, 5.4.0-73-generic, x86_64: installed
 virtualbox-guest, 6.1.16, 5.4.0-73-generic, x86_64: installed (WARNING! Diff between built and installed module!) (WARNING! Diff between built and installed module!)
ExtraDebuggingInterest: Yes
GraphicsCard:
 Intel Corporation HD Graphics 5500 [8086:1616] (rev 09) (prog-if 00 [VGA controller])
   Subsystem: Gigabyte Technology Co., Ltd HD Graphics 5500 [1458:1000]
InstallationDate: Installed on 2017-05-31 (1463 days ago)
InstallationMedia: Ubuntu 17.04 "Zesty Zapus" - Release amd64 (20170412)
MachineType: GIGABYTE GB-BXi7-5500
ProcKernelCmdLine: BOOT_IMAGE=/boot/vmlinuz-5.4.0-73-generic root=UUID=6999d6bd-6356-4df2-b056-032c25b2dd60 ro quiet splash vt.handoff=7
SourcePackage: xorg
UpgradeStatus: Upgraded to focal on 2021-04-26 (37 days ago)
dmi.bios.date: 12/05/2014
dmi.bios.vendor: American Megatrends Inc.
dmi.bios.version: F2
dmi.board.asset.tag: To be filled by O.E.M.
dmi.board.name: MQLP7AP-00
dmi.board.vendor: GIGABYTE
dmi.board.version: 1.x
dmi.chassis.asset.tag: To Be Filled By O.E.M.
dmi.chassis.type: 3
dmi.chassis.vendor: To Be Filled By O.E.M.
dmi.chassis.version: To Be Filled By O.E.M.
dmi.modalias: dmi:bvnAmericanMegatrendsInc.:bvrF2:bd12/05/2014:svnGIGABYTE:pnGB-BXi7-5500:pvr1.x:rvnGIGABYTE:rnMQLP7AP-00:rvr1.x:cvnToBeFilledByO.E.M.:ct3:cvrToBeFilledByO.E.M.:
dmi.product.family: To be filled by O.E.M.
dmi.product.name: GB-BXi7-5500
dmi.product.sku: To be filled by O.E.M.
dmi.product.version: 1.x
dmi.sys.vendor: GIGABYTE
version.compiz: compiz 1:0.9.14.1+20.04.20200211-0ubuntu1
version.libdrm2: libdrm2 2.4.102-1ubuntu1~20.04.1
version.libgl1-mesa-dri: libgl1-mesa-dri 20.2.6-0ubuntu0.20.04.1
version.libgl1-mesa-glx: libgl1-mesa-glx 20.2.6-0ubuntu0.20.04.1
version.xserver-xorg-core: xserver-xorg-core 2:1.20.9-2ubuntu1.2~20.04.2
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

Revision history for this message
Jan Newmarch (jan-newmarch) wrote :
Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Thanks for the bug report. Memory leaks in the Xorg process are usually the fault of an application. Because in X11 the server owns the resources created by applications, and any leaks will appear in the server process 'Xorg'.

To help track down any offending applications, please run this command while the leak is happening:

  xrestop

and it will show the applications causing the most memory usage in Xorg.

affects: xorg (Ubuntu) → xorg-server (Ubuntu)
Changed in xorg-server (Ubuntu):
status: New → Incomplete
Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

xrestop - Display: localhost
          Monitoring 44 clients. XErrors: 0
          Pixmaps: 708248K total, Other: 120K total, All: 708369K total

res-base Wins GCs Fnts Pxms Misc Pxm mem Other Total PID Identifier
4600000 41 4 1 139 648 475983K 17K 476000K 192487 LibreOffice 6.4
1800000 18 5 2 20 1428 119656K 36K 119692K 190524 metacity
0c00000 8 4 1 30 383 43461K 10K 43471K 190467 gnome-flashback
4000000 0 1 0 5 17 24462K 432B 24463K ? <unknown>
3600000 3 0 1 0 22 12231K 1K 12233K ? Chromium clipboard
0000000 2 0 2 0 147 10800K 5K 10805K ? <unknown>
6400000 0 0 0 1 0 10800K 0B 10800K ? <unknown>
4200000 29 5 1 9 395 4001K 11K 4012K 192208 evolution
2c00000 23 2 1 1 70 3368K 3K 3371K ? Qt Selection Owner for VirtualBox
4a00000 4 4 1 2 248 1950K 7K 1957K 247305 pavucontrol
3000000 7 3 1 6 284 1161K 7K 1169K 191186 Terminal
2400000 14 4 0 4 284 248K 7K 255K 190649 Panel
3800000 5 4 0 24 176 124K 4K 128K 191260 chrome
2800000 2 3 0 0 48 5B 1K 1K 191201 update-notifier
2e00000 1 1 1 0 8 0B 1K 1K ? Qt Selection Owner for kdeconnectd
3400000 1 1 1 0 6 0B 1K 1K ? <unknown>
2000000 3 1 0 0 13 0B 408B 408B 190623 ibus-x11
2600000 1 1 0 0 9 0B 264B 264B 190668 nm-applet
0a00000 2 1 0 0 8 0B 264B 264B 190468 gnome-flashback-clipboard
5400000 1 1 0 0 8 0B 240B 240B 336471 xdg-desktop-portal-gtk
5200000 1 1 0 0 8 0B 240B 240B 580778 VirtualBox
4e00000 1 1 0 0 8 0B 240B 240B 312045 WebKitWebProcess
4c00000 1 1 0 0 8 0B 240B 240B 291315 WebKitWebProcess
4800000 1 1 0 0 8 0B 240B 240B 291316 WebKitWebProcess
4400000 1 1 0 0 8 0B 240B 240B 192244 WebKitWebProcess
3a00000 1 1 0 0 8 0B 240B 240B 343635 dropbox
3200000 1 1 0 0 8 0B 240B 240B 190703 kdeconnectd
2a00000 1 1 0 0 8 0B 240B 240B 190700 evolution-alarm-notify
...

Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

I restarted the server, monitored it for a few days. The results were inconclusive, so doing more careful logging over a longer period to see if I can find a clear culprit :-)

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

LibreOffice looks like the main offender.

Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

i don't think it is libreoffice. I last restarted X 4 days ago, and memory usage has gone from under 1% to 8%. Libreoffice has stayed unchanged at 459376K total (with 2 docs open). metacity has grown but not conclusively. So I'll give it another week

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

It might also be the compositor/WM causing leaks in Xorg. Certainly 'metacity' is second in your list, but it is meant to use a lot of memory because it has to keep copies of all windows. To check to see if it's the cause you would need to log into a different desktop environment that's not Flashback.

Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

Well, it's not libreoffice nor evolution mail client. And I also tried Unity with X instead of fallback, no better, so it doesn't look like metacity. I'll try more experiments tomorrow

Revision history for this message
Daniel van Vugt (vanvugt) wrote :

Sounds like you will need to "bisect" the issue. That means:

 * Log in with no apps running and see if the same problem occurs.

 * Log in with half the apps running and see if the same problem occurs.

 * Log in again with a quarter of the apps running and see if the problem still occurs...

Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

Yes, and since it could be the desktop env, the gnome terninal, anywhere really, I'm going to try real primitive: Tom's Window Mgr (twm) with an xterm.

Changed in xorg-server (Ubuntu):
status: Incomplete → Invalid
Revision history for this message
Jan Newmarch (jan-newmarch) wrote :

I swapped my environment (gnome-fallback, chromium-browser, evolution, libreoffice, gnome-terminal) for a vanilla env of ctwm, xterm and firefox. After 4 days the memory usage stayed at 0.6%. Confirm that it is not a bug in xorg but in one of the other apps, as suggested by Daniel. So I need to check all other apps to see which one is causing the memory use and report it to the offending one. I've changed the status of this bug report to invalid. Thanks Daniel!

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.