Bug 110714 - Xorg crashes randomly because of memory leak
Summary: Xorg crashes randomly because of memory leak
Status: RESOLVED MOVED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/nouveau (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Nouveau Project
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-05-20 08:38 UTC by Peter Draganov
Modified: 2019-12-04 09:49 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Xorg.log and gdb of coredump (17.63 KB, text/plain)
2019-05-20 08:38 UTC, Peter Draganov
no flags Details
attachment-29996-0.html (3.04 KB, text/html)
2019-07-22 20:27 UTC, Peter Draganov
no flags Details
My Xorg log (62.71 KB, application/x-trash)
2019-09-06 16:26 UTC, John Lindgren
no flags Details
My Xorg.0.log.old (47.61 KB, application/x-trash)
2019-10-07 14:31 UTC, Andrey Sychev
no flags Details

Description Peter Draganov 2019-05-20 08:38:25 UTC
Created attachment 144304 [details]
Xorg.log and gdb of coredump

Xorg (xorg-x11-server-Xorg-1.20.4-3.fc30.x86_64, xorg-x11-drv-nouveau-1.0.15-7.fc30.x86_64) crashes randomly on NVIDIA Corporation GT216 [GeForce GT 220] (rev a2) with glamor out of memory segmentation fault:

[ 32704.411] (EE) glamor0: GL error: GL_OUT_OF_MEMORY in glTexSubImage
[ 32704.907] (WW) glamor: Failed to allocate 40x4 FBO due to GL_OUT_OF_MEMORY.
[ 32704.908] (WW) glamor: Expect reduced performance.
[ 32704.908] (EE) 
[ 32704.908] (EE) Backtrace:
[ 32704.954] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x13c) [0x55f8f11f175c]
[ 32704.978] (EE) 1: /lib64/libpthread.so.0 (funlockfile+0x50) [0x7ff9bb6ecebf]
[ 32704.980] (EE) 2: /usr/lib64/xorg/modules/libglamoregl.so (glamor_get_pixmap_texture+0x81) [0x7ff9bad74101]
[ 32704.981] (EE) 3: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x7c81) [0x7ff9bad86991]
[ 32704.982] (EE) 4: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x8054) [0x7ff9bad870e4]
[ 32704.983] (EE) 5: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x86af) [0x7ff9bad878bf]
[ 32704.985] (EE) 6: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0xa66c) [0x7ff9bad8b4ac]
[ 32704.985] (EE) 7: /usr/libexec/Xorg (DamageRegionAppend+0x6c0) [0x55f8f11734a0]
[ 32704.986] (EE) 8: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x11610) [0x7ff9bad99ac0]
[ 32704.987] (EE) 9: /usr/libexec/Xorg (AddTraps+0x4228) [0x55f8f116bca8]
[ 32704.987] (EE) 10: /usr/libexec/Xorg (SendErrorToClient+0x35e) [0x55f8f1092c6e]
[ 32704.988] (EE) 11: /usr/libexec/Xorg (InitFonts+0x3b4) [0x55f8f1096ce4]
[ 32704.989] (EE) 12: /lib/libc.so.6 (__libc_start_main+0xf3) [0x7ff9bb537f33]
[ 32704.989] (EE) 13: /usr/libexec/Xorg (_start+0x2e) [0x55f8f108081e]
[ 32704.989] (EE) 
[ 32704.989] (EE) Segmentation fault at address 0x0
[ 32704.989] (EE) 
Fatal server error:
[ 32704.990] (EE) Caught signal 11 (Segmentation fault). Server aborting
Comment 1 Karol Herbst 2019-05-20 10:03:33 UTC
this is already fixed upstream per https://gitlab.freedesktop.org/xorg/xserver/commit/74479a99ecf18fdfdafd033b5efd8d785dd12c28

please ask your distribution to backport it.

Please reopen if this is indeed a different bug (but I highly doubt that)
Comment 2 Ilia Mirkin 2019-05-20 11:08:53 UTC
Additionally you're not using xf86-video-nouveau. (If you were, you wouldn't be using glamor.)
Comment 3 Karol Herbst 2019-05-20 18:15:37 UTC
fyi: the patch was merged into the 1.20 xorg-server branch and should be in for 1.20.5
Comment 4 Peter Draganov 2019-07-03 06:37:55 UTC
The problem persists in xorg-x11-server-Xorg-1.20.5-3.fc30.x86_64:

[113930.196] (EE) glamor0: GL error: GL_OUT_OF_MEMORY in glTexSubImage
[113930.198] (WW) glamor: Failed to allocate 5x1 FBO due to GL_OUT_OF_MEMORY.
[113930.198] (WW) glamor: Expect reduced performance.
[113930.198] (EE) 
[113930.198] (EE) Backtrace:
[113930.235] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x13c) [0x5637893b8adc]
[113930.238] (EE) unw_get_proc_name failed: no unwind info found [-10]
[113930.238] (EE) 1: /lib64/libpthread.so.0 (?+0x0) [0x7f264909ee7f]
[113930.239] (EE) 2: /usr/lib64/xorg/modules/libglamoregl.so (glamor_get_pixmap_texture+0xa1) [0x7f2648726181]
[113930.240] (EE) 3: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x7b84) [0x7f2648738814]
[113930.241] (EE) 4: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x7f64) [0x7f2648738f84]
[113930.241] (EE) 5: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x85bf) [0x7f264873975f]
[113930.242] (EE) 6: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0xa57a) [0x7f264873d34a]
[113930.242] (EE) 7: /usr/libexec/Xorg (DamageRegionAppend+0x6c0) [0x56378933a670]
[113930.243] (EE) 8: /usr/lib64/xorg/modules/libglamoregl.so (glamor_create_gc+0x1150a) [0x7f264874b92a]
[113930.243] (EE) 9: /usr/libexec/Xorg (AddTraps+0x4238) [0x563789332eb8]
[113930.243] (EE) 10: /usr/libexec/Xorg (SendErrorToClient+0x354) [0x563789259d54]
[113930.243] (EE) 11: /usr/libexec/Xorg (InitFonts+0x3b4) [0x56378925de14]
[113930.244] (EE) unw_get_proc_name failed: no unwind info found [-10]
[113930.244] (EE) 12: /lib/libc.so.6 (?+0x0) [0x7f2648ee9e40]
[113930.244] (EE) 13: /usr/libexec/Xorg (_start+0x2e) [0x56378924786e]
[113930.244] (EE) 
[113930.244] (EE) Segmentation fault at address 0x0
[113930.244] (EE) 
Fatal server error:
[113930.244] (EE) Caught signal 11 (Segmentation fault). Server aborting
Comment 5 Peter Draganov 2019-07-03 06:55:04 UTC
@Ilia Mirkin
Additionally you're not using xf86-video-nouveau. (If you were, you wouldn't be using glamor.)
I am not sure about this, but here is the log for nouveau:
[   148.426] (II) modeset(0): [DRI2]   DRI driver: nouveau
[   148.426] (II) modeset(0): [DRI2]   VDPAU driver: nouveau
...
[   148.441] (II) Initializing extension GLX
[   148.473] (II) AIGLX: Loaded and initialized nouveau
[   148.473] (II) GLX: Initialized DRI2 GL provider for screen 0
Comment 6 Karol Herbst 2019-07-03 07:53:43 UTC
(In reply to Peter Draganov from comment #4)
> The problem persists in xorg-x11-server-Xorg-1.20.5-3.fc30.x86_64:
> 
> [113930.196] (EE) glamor0: GL error: GL_OUT_OF_MEMORY in glTexSubImage
> [113930.198] (WW) glamor: Failed to allocate 5x1 FBO due to GL_OUT_OF_MEMORY.
> [113930.198] (WW) glamor: Expect reduced performance.
> [113930.198] (EE) 
> [113930.198] (EE) Backtrace:
> [113930.235] (EE) 0: /usr/libexec/Xorg (OsLookupColor+0x13c) [0x5637893b8adc]
> [113930.238] (EE) unw_get_proc_name failed: no unwind info found [-10]
> [113930.238] (EE) 1: /lib64/libpthread.so.0 (?+0x0) [0x7f264909ee7f]
> [113930.239] (EE) 2: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_get_pixmap_texture+0xa1) [0x7f2648726181]
> [113930.240] (EE) 3: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_create_gc+0x7b84) [0x7f2648738814]
> [113930.241] (EE) 4: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_create_gc+0x7f64) [0x7f2648738f84]
> [113930.241] (EE) 5: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_create_gc+0x85bf) [0x7f264873975f]
> [113930.242] (EE) 6: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_create_gc+0xa57a) [0x7f264873d34a]
> [113930.242] (EE) 7: /usr/libexec/Xorg (DamageRegionAppend+0x6c0)
> [0x56378933a670]
> [113930.243] (EE) 8: /usr/lib64/xorg/modules/libglamoregl.so
> (glamor_create_gc+0x1150a) [0x7f264874b92a]
> [113930.243] (EE) 9: /usr/libexec/Xorg (AddTraps+0x4238) [0x563789332eb8]
> [113930.243] (EE) 10: /usr/libexec/Xorg (SendErrorToClient+0x354)
> [0x563789259d54]
> [113930.243] (EE) 11: /usr/libexec/Xorg (InitFonts+0x3b4) [0x56378925de14]
> [113930.244] (EE) unw_get_proc_name failed: no unwind info found [-10]
> [113930.244] (EE) 12: /lib/libc.so.6 (?+0x0) [0x7f2648ee9e40]
> [113930.244] (EE) 13: /usr/libexec/Xorg (_start+0x2e) [0x56378924786e]
> [113930.244] (EE) 
> [113930.244] (EE) Segmentation fault at address 0x0
> [113930.244] (EE) 
> Fatal server error:
> [113930.244] (EE) Caught signal 11 (Segmentation fault). Server aborting

huh, that's weird. Will try to look into it.
Comment 7 Ilia Mirkin 2019-07-03 12:42:10 UTC
(In reply to Peter Draganov from comment #5)
> @Ilia Mirkin
> Additionally you're not using xf86-video-nouveau. (If you were, you wouldn't
> be using glamor.)
> I am not sure about this, but here is the log for nouveau:
> [   148.426] (II) modeset(0): [DRI2]   DRI driver: nouveau
> [   148.426] (II) modeset(0): [DRI2]   VDPAU driver: nouveau
> ...
> [   148.441] (II) Initializing extension GLX
> [   148.473] (II) AIGLX: Loaded and initialized nouveau
> [   148.473] (II) GLX: Initialized DRI2 GL provider for screen 0

See how it says "modeset(0)" and not "NOUVEAU(0)"? That means you're not using xf86-video-nouveau.
Comment 8 Olivier Fourdan 2019-07-04 10:06:02 UTC
Out of curiosity, any hint on how to reproduce the issue?

 - What clients were running at the time the issue occurred
 - Any special x11 client that can reproduce?
 - Any particular action that triggers the issue?
 - which desktop environment/window manager?

Basically, anything that could help reproducing...
Comment 9 Peter Draganov 2019-07-05 12:20:03 UTC
 - What clients were running at the time the issue occurred
Skype, System Monitor, Firefox, Mate Terminal, Libre Office, Caja, TigerVNC, Virtualbox, Pluma
 - Any special x11 client that can reproduce?
have no idea
 - Any particular action that triggers the issue?
Usually crashes during the night, when a black screen saver is running, but it happened several times during the day, when I worked
 - which desktop environment/window manager?
LightDM/MATE

Basically, anything that could help reproducing...
Just leave X running long enough time - usually after 2-3 days without restart
Comment 10 Karol Herbst 2019-07-11 17:18:05 UTC
(In reply to Peter Draganov from comment #9)
>  - What clients were running at the time the issue occurred
> Skype, System Monitor, Firefox, Mate Terminal, Libre Office, Caja, TigerVNC,
> Virtualbox, Pluma
>  - Any special x11 client that can reproduce?
> have no idea
>  - Any particular action that triggers the issue?
> Usually crashes during the night, when a black screen saver is running, but
> it happened several times during the day, when I worked
>  - which desktop environment/window manager?
> LightDM/MATE
> 
> Basically, anything that could help reproducing...
> Just leave X running long enough time - usually after 2-3 days without
> restart

what GPU do you have? I am especially interested in the amount of VRAM it has.
Comment 11 Peter Draganov 2019-07-12 05:23:10 UTC
> what GPU do you have? I am especially interested in the amount of VRAM it has.
01:00.0 VGA compatible controller: NVIDIA Corporation GT218 [GeForce 210] (rev a2) (prog-if 00 [VGA controller])
	Subsystem: Micro-Star International Co., Ltd. [MSI] N210 [Geforce 210] PCIe graphics adapter
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR+ FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 31
	NUMA node: 0
	Region 0: Memory at fa000000 (32-bit, non-prefetchable) [size=16M]
	Region 1: Memory at d0000000 (64-bit, prefetchable) [size=256M]
	Region 3: Memory at ce000000 (64-bit, prefetchable) [size=32M]
	Region 5: I/O ports at ec00 [size=128]
	Expansion ROM at 000c0000 [disabled] [size=128K]
	Capabilities: [60] Power Management version 3
		Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
		Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
	Capabilities: [68] MSI: Enable+ Count=1/1 Maskable- 64bit+
		Address: 00000000fee02004  Data: 4026
	Capabilities: [78] Express (v2) Endpoint, MSI 00
		DevCap:	MaxPayload 128 bytes, PhantFunc 0, Latency L0s unlimited, L1 <64us
			ExtTag+ AttnBtn- AttnInd- PwrInd- RBE+ FLReset- SlotPowerLimit 75.000W
		DevCtl:	CorrErr- NonFatalErr- FatalErr- UnsupReq-
			RlxdOrd- ExtTag+ PhantFunc- AuxPwr- NoSnoop+
			MaxPayload 128 bytes, MaxReadReq 512 bytes
		DevSta:	CorrErr- NonFatalErr- FatalErr- UnsupReq- AuxPwr- TransPend-
		LnkCap:	Port #0, Speed 2.5GT/s, Width x16, ASPM L0s L1, Exit Latency L0s <256ns, L1 <4us
			ClockPM+ Surprise- LLActRep- BwNot- ASPMOptComp-
		LnkCtl:	ASPM Disabled; RCB 128 bytes Disabled- CommClk+
			ExtSynch- ClockPM- AutWidDis- BWInt- AutBWInt-
		LnkSta:	Speed 2.5GT/s (ok), Width x16 (ok)
			TrErr- Train- SlotClk+ DLActive- BWMgmt- ABWMgmt-
		DevCap2: Completion Timeout: Not Supported, TimeoutDis+, LTR-, OBFF Not Supported
			 AtomicOpsCap: 32bit- 64bit- 128bitCAS-
		DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-, LTR-, OBFF Disabled
			 AtomicOpsCtl: ReqEn-
		LnkCtl2: Target Link Speed: 2.5GT/s, EnterCompliance- SpeedDis-
			 Transmit Margin: Normal Operating Range, EnterModifiedCompliance- ComplianceSOS-
			 Compliance De-emphasis: -6dB
		LnkSta2: Current De-emphasis Level: -6dB, EqualizationComplete-, EqualizationPhase1-
			 EqualizationPhase2-, EqualizationPhase3-, LinkEqualizationRequest-
	Capabilities: [b4] Vendor Specific Information: Len=14 <?>
	Capabilities: [100 v1] Virtual Channel
		Caps:	LPEVC=0 RefClk=100ns PATEntryBits=1
		Arb:	Fixed- WRR32- WRR64- WRR128-
		Ctrl:	ArbSelect=Fixed
		Status:	InProgress-
		VC0:	Caps:	PATOffset=00 MaxTimeSlots=1 RejSnoopTrans-
			Arb:	Fixed- WRR32- WRR64- WRR128- TWRR128- WRR256-
			Ctrl:	Enable+ ID=0 ArbSelect=Fixed TC/VC=ff
			Status:	NegoPending- InProgress-
	Capabilities: [128 v1] Power Budgeting <?>
	Capabilities: [600 v1] Vendor Specific Information: ID=0001 Rev=1 Len=024 <?>
	Kernel driver in use: nouveau
	Kernel modules: nouveau

I was with another old NVidia card when crashes started, so I decided to replace it, but this did not help. I was with Fedora 22 intil April and started upgrading it every day. Crashes started when I reached Fedora 24-25-26 probably and continues until last Fedora 30, if this can help.
Comment 12 Olivier Fourdan 2019-07-12 08:38:58 UTC
Out of curiosity, can you also check with `xrestop`, after leaving your session running for some time, if any X11 client tend to be leaking or using an insane amount of X11 resources?
Comment 13 Peter Draganov 2019-07-12 11:26:18 UTC
After nearly 1 day and 3 hours:
xrestop - Display: localhost:0
          HMonitoring 51 clients. XErrors: 0
          Pixmaps: 1180312K total, Other:     221K total, All: 1180534K total

res-base Wins  GCs Fnts Pxms Misc   Pxm mem  Other   Total   PID Identifier    
6200000   227    4    1 1242 1801   800547K     48K 800596K  9592 Linux1.ods - LibreOffice Calc
0c00000    43    4    2   94 4175   204916K    100K 205017K  2275 marco
3200000   106   74    1   86  325   117024K     12K 117037K  3072 phpPgAdmin - Mozilla Firefox
5a00000    17    3    1    6   81    17307K      3K  17310K  3891 pdraganov@bgva-f-00:~
1000000     8    3    1   27   59    10417K      2K  10420K  2303 x-caja-desktop
4600000    30    2    1    3   93     9990K      3K   9993K  3008 7 [Running] - Oracle VM VirtualBox
3e00000     2    1    0    3   28     9400K    744B   9401K   ?   <unknown>
0000000     2    0    2    0  277     3413K      8K   3421K   ?   <unknown>
6000000     0    0    0    1    0     3413K      0B   3413K   ?   <unknown>

Probably LibreOffice is the problem? I have 18 documents opened at the moment.
Comment 14 Olivier Fourdan 2019-07-12 12:20:43 UTC
(In reply to Peter Draganov from comment #13)
> Probably LibreOffice is the problem? I have 18 documents opened at the
> moment.

Not necessarily the problem, no, unless it increases over time and never decreases... The values do not seem out of proportions either, I mean, I can get higher pixmap usage opening a few documents in LibreOffice here as well...

I'm just trying to figure if something is leaking, because maybe we look in the wrong place, fixing the root cause of GL_OUT_OF_MEMORY might be more efficient than trying to deal with the aftermaths.
Comment 15 Joel Polowin 2019-07-22 20:19:59 UTC
FWIW, I'm seeing the same symptoms -- I found this report while searching for
info about what was going on.  The only notable apps running, so far as I'm
aware, are VirtualBox and Firefox (along with various terminal and file windows).
I use OpenOffice, but infrequently.  I definitely didn't have any documents
open at the time of the most recent crash.

I'm running 5.1.15-300.fc30.x86_64 .  I'm willing to send info if it will help,
but I must warn you that I'm anything but a power user -- I'd need some coaching
to find files.
Comment 16 Joel Polowin 2019-07-22 20:21:13 UTC
(In reply to Joel Polowin from comment #15)
> I use OpenOffice, but infrequently.

Sorry -- LibreOffice.  Old habits.
Comment 17 Peter Draganov 2019-07-22 20:27:42 UTC
Created attachment 144844 [details]
attachment-29996-0.html

Thank you for your e-mail. I am out of the office and will return on 16th of August 2019. I will have no access to my e-mails during this time. If your e-mail requires urgent attention please e-mail service@taxback.com. Alternatively I will reply to your e-mail when I am back. Kind Regards, Peter Draganov ICT Systems Administrator Email: pdraganov@taxback.com Web: www.taxback.com<http://www.taxback.com><www.taxback.com%3chttp:/www.taxback.com%3e> Phone: +359 52 919190 Fax: +359 5268 6883 Mobile: +359 889 530589 Contact Us: Taxback.com is an ISO 9001 certified company with 25 offices in 20 countries. This email is confidential and intended solely for the use of the individual to whom it is addressed. Any views or opinions presented are solely those of the author and do not necessarily represent those of taxback.com. If you are not the intended recipient, be advised that you have received this email in error and that any use, dissemination, forwarding, printing, or copying of this email is strictly prohibited. If you have received this email in error please forward it to info@taxback.com.
Comment 18 Joel Polowin 2019-07-22 22:37:05 UTC
(In reply to Joel Polowin from comment #15)
> The only notable apps running, so far as I'm aware, are VirtualBox and Firefox
> (along with various terminal and file windows).

Hmm.  And Chromium, now that I think of it.
Comment 19 John Lindgren 2019-09-06 16:17:42 UTC
I just saw this same crash (Xorg 1.20.4 here still though).  I also had Firefox, VirtualBox, Evolution, and a few smaller applications running.  The computer had been running for most of the week already, so maybe a memory leak somewhere?

My card is:

01:00.0 VGA compatible controller: NVIDIA Corporation GM107GLM [Quadro M2000M] (rev a2)

I am using xf86-video-modesetting.  Should I be using xf86-video-nouveau instead?
Comment 20 John Lindgren 2019-09-06 16:26:24 UTC
Created attachment 145281 [details]
My Xorg log
Comment 21 Ilia Mirkin 2019-09-06 16:27:12 UTC
(In reply to John Lindgren from comment #19)
> I am using xf86-video-modesetting.  Should I be using xf86-video-nouveau
> instead?

I would definitely recommend -nouveau over -modesetting.
Comment 22 Andrey Sychev 2019-10-07 14:31:26 UTC
Created attachment 145675 [details]
My Xorg.0.log.old
Comment 23 Andrey Sychev 2019-10-07 14:32:28 UTC
I can confirm that bug still persists.

My OS: Debian (Buster)
Desktop: Xfce
Apps on which crash happens: Meld (frequently, but not every time). Libre office (rare)

In attepmt to fix crush
I have downloaded and installed

https://launchpad.net/ubuntu/+source/xorg-server/2:1.20.5+git20190820-0ubuntu3

but this does not help.

I can say that in my case crash does not happens after first message:

glamor0: GL error: GL_OUT_OF_MEMORY in glTexSubImage

Crash happens only after several similar messages.
Comment 24 Martin Peres 2019-12-04 09:49:42 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nouveau/issues/486.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.