# Linux X issues

**URL:** https://discourse.paraview.org/t/linux-x-issues/80
**Category:** Dashboards
**Created:** [June 4, 2018, 5:13pm UTC](https://discourse.paraview.org/t/linux-x-issues/80 "2018-06-04T17:13:44Z")
**Posts on this page:** 20
**Page:** 2

<div class="post-metadata">

### Author: ![shawn.waldon](https://discourse.paraview.org/user_avatar/discourse.paraview.org/shawn.waldon/32/12_2.png) [@shawn.waldon](https://discourse.paraview.org/u/shawn.waldon)
#### Post date: [June 12, 2018, 2:25pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/21 "2018-06-12T14:25:09Z")

</div>

I have noticed that vall seems to slow down as more builds run… I’ll check the memory next time it breaks. What command did you use to get that table?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 12, 2018, 2:29pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/22 "2018-06-12T14:29:27Z")

</div>

`free -m`

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 12, 2018, 2:29pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/23 "2018-06-12T14:29:50Z")

</div>

So… something on the system is leaking memory? The graphics driver?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 12, 2018, 2:30pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/24 "2018-06-12T14:30:53Z")

</div>

could be, next time i see it i will stop service and modules until it drops.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 12, 2018, 7:02pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/25 "2018-06-12T19:02:06Z")

</div>

What do you think about reverting the change to the new Qt widget to see if that helps the dashboards stay alive? Right now we can’t trust anything `vall` or `luigi` report, and they are taking a long time to build, so other development is being slowed down.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 13, 2018, 4:36am UTC](https://discourse.paraview.org/t/linux-x-issues/80/26 "2018-06-13T04:36:53Z")

</div>

Reverting would not be necessary, we could just change a single line instead.

However I’m afraid that doing that will prevent us correcting the issue, since it requires multiple run before showing up.

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 13, 2018, 8:50pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/27 "2018-06-13T20:50:44Z")

</div>

> However I’m afraid that doing that will prevent us correcting the issue, since it requires multiple run before showing up.

Okay.

It looks like Luigi is experiencing difficulties now, so next time you can access it, could you try stopping services and modules?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 14, 2018, 8:31am UTC](https://discourse.paraview.org/t/linux-x-issues/80/28 "2018-06-14T08:31:12Z")

</div>

It was indeed the `nvidia` module eating up all the memory and probably causing the issues.  
Easy to temporarily fix with the following :

```auto
sudo service lightdm stop
sudo rmmod nvidia_uvm
sudo rmmod nvidia
sudo modprobe nvidia
sudo modprobe nvidia_uvm
sudo service lightdm start

```

we will investigate where it is coming from. In the meantime i will ensure luigi does not get clogged up and other merge request can run.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 14, 2018, 12:12pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/29 "2018-06-14T12:12:56Z")

</div>

I’m now monitoring memory usage on luigi with a simple script.

Tylo seems to be experiencing issues that may be related, with errors as follow :

```auto
ERROR: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 491
vtkSMTestDriver: ***** Test will fail, because the string: "ERROR:"
vtkSMTestDriver: ***** was found in the following output from the client:
"ERROR: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 491"
vtkShaderProgram (000000000B4EE7E0): Shader object was not initialized, cannot attach it.

Generic Warning: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 124
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

ERROR: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLVertexArrayObject.cxx, line 311
vtkOpenGLVertexArrayObject (000000001650DD50): attempt to add attribute when not ready for attribute ndCoordIn

Generic Warning: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLQuadHelper.cxx, line 60
Error binding ndCoords to VAO.

Generic Warning: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 124
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

Generic Warning: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 124
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

Generic Warning: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkOpenGLRenderTimer.cxx, line 124
vtkOpenGLRenderTimer::Stop called before vtkOpenGLRenderTimer::Start. Ignoring.

ERROR: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 491
vtkShaderProgram (0000000016304B50): Shader object was not initialized, cannot attach it.

ERROR: In C:\dashboards\buildbot\2000d565\source\VTK\Rendering\OpenGL2\vtkShaderProgram.cxx, line 446
vtkShaderProgram (0000000016304B50): 1: #version 150
2: #ifndef GL_ES
3: #define highp
4: #define mediump
5: #define lowp
6: #endif // GL_ES
7: #define attribute in
8: #define varying out
9: 
10: in vec2 vertexMC;
11: uniform mat4 WCDCMatrix;
12: uniform mat4 MCWCMatrix;
13: #ifdef haveColors
14: in vec4 vertexScalar;
15: out vec4 vertexColor;
16: #endif
17: #ifdef haveTCoords
18: in vec2 tcoordMC;
19: out vec2 tcoord;
20: #endif
21: #ifdef haveLines
22: in vec2 tcoordMC;
23: out float ldistance;
24: #endif
25: void main() {
26: #ifdef haveColors
27: vertexColor = vertexScalar;
28: #endif
29: #ifdef haveTCoords
30: tcoord = tcoordMC;
31: #endif
32: #ifdef haveLines
33: ldistance = tcoordMC.x;
34: #endif
35: vec4 vertex = vec4(vertexMC.xy, 0.0, 1.0);
36: gl_Position = vertex*MCWCMatrix*WCDCMatrix; }

```

It is to be noted that vtkOpenGLRenderTimer has some memory errors according to valgrind.

```auto
[glow@violet ~/work/paraview/paraviewThird/paraview_build]$ optirun valgrind ./bin/paraview
==13686== Memcheck, a memory error detector
==13686== Copyright (C) 2002-2017, and GNU GPL'd, by Julian Seward et al.
==13686== Using Valgrind-3.13.0 and LibVEX; rerun with -h for copyright info
==13686== Command: ./bin/paraview
==13686== 
--13686-- WARNING: unhandled amd64-linux syscall: 332
--13686-- You may be able to write your own handler.
--13686-- Read the file README_MISSING_SYSCALL_OR_IOCTL.
--13686-- Nevertheless we consider this a bug. Please report
--13686-- it at http://valgrind.org/support/bug_reports.html.
==13686== Conditional jump or move depends on uninitialised value(s)
==13686== at 0x473E2D1E: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x473E4AA1: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x46EFDCA3: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0xE933705: vtkOpenGLRenderTimer::Start() (vtkOpenGLRenderTimer.cxx:101)
==13686== by 0xE8A074A: vtkOpenGLFXAAFilter::StartTimeQuery(vtkOpenGLRenderTimer*) (vtkOpenGLFXAAFilter.cxx:422)
==13686== by 0xE89EA52: vtkOpenGLFXAAFilter::Execute(vtkOpenGLRenderer*) (vtkOpenGLFXAAFilter.cxx:103)
==13686== by 0xE94B724: vtkOpenGLRenderer::UpdateGeometry() (vtkOpenGLRenderer.cxx:339)
==13686== by 0xE94AAB0: vtkOpenGLRenderer::DeviceRender() (vtkOpenGLRenderer.cxx:247)
==13686== by 0x165E0B75: vtkRenderer::Render() (vtkRenderer.cxx:351)
==13686== by 0x165DE37B: vtkRendererCollection::Render() (vtkRendererCollection.cxx:51)
==13686== by 0x165FC952: vtkRenderWindow::DoStereoRender() (vtkRenderWindow.cxx:330)
==13686== by 0x165FC71D: vtkRenderWindow::Render() (vtkRenderWindow.cxx:291)
==13686== 
==13686== Conditional jump or move depends on uninitialised value(s)
==13686== at 0x473E39B4: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x473E3EC2: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x46EFDCA3: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0xE9338D4: vtkOpenGLRenderTimer::Stop() (vtkOpenGLRenderTimer.cxx:129)
==13686== by 0xE8A077C: vtkOpenGLFXAAFilter::EndTimeQuery(vtkOpenGLRenderTimer*) (vtkOpenGLFXAAFilter.cxx:433)
==13686== by 0xE89EA81: vtkOpenGLFXAAFilter::Execute(vtkOpenGLRenderer*) (vtkOpenGLFXAAFilter.cxx:106)
==13686== by 0xE94B724: vtkOpenGLRenderer::UpdateGeometry() (vtkOpenGLRenderer.cxx:339)
==13686== by 0xE94AAB0: vtkOpenGLRenderer::DeviceRender() (vtkOpenGLRenderer.cxx:247)
==13686== by 0x165E0B75: vtkRenderer::Render() (vtkRenderer.cxx:351)
==13686== by 0x165DE37B: vtkRendererCollection::Render() (vtkRendererCollection.cxx:51)
==13686== by 0x165FC952: vtkRenderWindow::DoStereoRender() (vtkRenderWindow.cxx:330)
==13686== by 0x165FC71D: vtkRenderWindow::Render() (vtkRenderWindow.cxx:291)
==13686== 
==13686== Conditional jump or move depends on uninitialised value(s)
==13686== at 0x473E2D1E: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x473E4AA1: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0x46EFDCA3: ??? (in /usr/lib/libnvidia-glcore.so.390.48)
==13686== by 0xE9338D4: vtkOpenGLRenderTimer::Stop() (vtkOpenGLRenderTimer.cxx:129)
==13686== by 0xE8A077C: vtkOpenGLFXAAFilter::EndTimeQuery(vtkOpenGLRenderTimer*) (vtkOpenGLFXAAFilter.cxx:433)
==13686== by 0xE89EA81: vtkOpenGLFXAAFilter::Execute(vtkOpenGLRenderer*) (vtkOpenGLFXAAFilter.cxx:106)
==13686== by 0xE94B724: vtkOpenGLRenderer::UpdateGeometry() (vtkOpenGLRenderer.cxx:339)
==13686== by 0xE94AAB0: vtkOpenGLRenderer::DeviceRender() (vtkOpenGLRenderer.cxx:247)
==13686== by 0x165E0B75: vtkRenderer::Render() (vtkRenderer.cxx:351)
==13686== by 0x165DE37B: vtkRendererCollection::Render() (vtkRendererCollection.cxx:51)
==13686== by 0x165FC952: vtkRenderWindow::DoStereoRender() (vtkRenderWindow.cxx:330)
==13686== by 0x165FC71D: vtkRenderWindow::Render() (vtkRenderWindow.cxx:291)

```

I’m trying to tag TJ Corona so he can take a look into tylo and let us know about current memory usage.

---

<div class="post-metadata">

### Author: ![shawn.waldon](https://discourse.paraview.org/user_avatar/discourse.paraview.org/shawn.waldon/32/12_2.png) [@shawn.waldon](https://discourse.paraview.org/u/shawn.waldon)
#### Post date: [June 14, 2018, 1:28pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/30 "2018-06-14T13:28:23Z")

</div>

I think tylo’s issue has to do with the power outage last night. It is not on a UPS and it doesn’t handle reboots well.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 15, 2018, 12:52pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/31 "2018-06-15T12:52:10Z")

</div>

Ok, thanks for the info.

I’ve characterized the problem.

 ![log](https://discourse.paraview.org/uploads/default/original/1X/2f028b7bd92dd26e457b41c09ce3b682aa5b00af.png)

There is one missing run at the beggining, but it has the same profile.  
During build, no problem at all  
During testing, GPU VRAM leak A LOT !, RAM actually does not leak.  
During testing, once GPU VRAM is full, RAM starts to loak  
(i used nvidia-smi and free to generate this data, please ask if you need the script)

So we consider the source of the problem to be a leak in the VRAM, so a leak in our usage of OpenGL.

We identified how to reproduce the leak with current ParaView master :

1. Open ParaView
2. Split the view, create a render view
3. Destroy the new view
4. Close ParaView

nvidia-smi before and after this usally shows 12Mb of VRAM leaked.

Step 3 is **very important** as :

- GPU VRAM usage jumps suspiciously when closing (around 20Mb)
- No leaks happens without it if closing directly ParaView

We tried tracing OpenGL calls with apitrace, but it does not report any leaks.

A careful examination of the new Widget/Window code does not yield any results yet.

We will keep investigating.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 17, 2018, 3:39pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/32 "2018-06-17T15:39:11Z")

</div>

BTW, I noticed that the cursor no longer changes to cross-hair when I end selection mode to make selection (on Linux, at least). Is that a new QVTKOpenGLWidget related issue too?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 20, 2018, 9:12am UTC](https://discourse.paraview.org/t/linux-x-issues/80/33 "2018-06-20T09:12:12Z")

</div>

> [@utkarsh.ayachit](#):
>
> BTW, I noticed that the cursor no longer changes to cross-hair when I end selection mode to make selection (on Linux, at least). Is that a new QVTKOpenGLWidget related issue too?

Yes it is. I’m adding it to the ever growing pile.

---

<div class="post-metadata">

### Author: ![utkarsh.ayachit](https://discourse.paraview.org/user_avatar/discourse.paraview.org/utkarsh.ayachit/32/39_2.png) [@utkarsh.ayachit](https://discourse.paraview.org/u/utkarsh.ayachit)
#### Post date: [June 20, 2018, 12:32pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/34 "2018-06-20T12:32:06Z")

</div>

> [@mwestphal](#):
>
> Yes it is. I’m adding it to the ever growing pile.

Sorry :). Such changes are often fraught withsuch smallish (and some biggish) issues. I am just glad we didn’t rush these changes in for 5.5. It’s always good to give ourselves plenty of time to stabilize.

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 21, 2018, 9:38am UTC](https://discourse.paraview.org/t/linux-x-issues/80/35 "2018-06-21T09:38:18Z")

</div>

Important news guys. It is not the driver leaking VRAM, but it probably is what @martink suggested by mail about shared OpenGL ressources between processes.

I say that because restarting Xorg seems free all the leaked memory, without the need for unloading the driver module as I stated previously

```auto
sudo service lightdm stop
sudo service ligthdm start

```

We do see that memory used by Xorg increasing over time. Just killing Xorg is also a fix

```auto
sudo kill -9 xorg_pid

```

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 21, 2018, 11:06am UTC](https://discourse.paraview.org/t/linux-x-issues/80/36 "2018-06-21T11:06:12Z")

</div>

Yet another breakthrough !

The leak is fixed by disabling effects (I supose **compositing** being the main one).

@shawn.waldon : could you confirm that on vall please ?

---

<div class="post-metadata">

### Author: ![mwestphal](https://discourse.paraview.org/user_avatar/discourse.paraview.org/mwestphal/32/17_2.png) [@mwestphal](https://discourse.paraview.org/u/mwestphal)
#### Post date: [June 22, 2018, 12:05pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/37 "2018-06-22T12:05:24Z")

</div>

Ok Guys, we have a bit of a Problem here.  
With the fix from @Joachim_Pouderoux, most issues are gone.

However, we still experience leaks on some computers and not on others!

Anyone with access to a linux with nvidia driver with a ParaView master built can help us identify more clearly the issue:

- Enable compositing if you have disabled it.
- Build ParaView master with VTK master (at least ff29c3dcc03650347168ccf82a4344a4521143a4) and testing.
- `nvidia-smi` : note the global memory usage
- ctest -R pv.UndoRedo2 --repeat-until-fail 20
- `nvidia-smi` : check the global memory usage and see if it has gone up

Please response to this message and include

- OS and OS Version (please include if it was installed in the current version or upgraded)
- Graphic Card model
- nvidia driver version
- Kernel version
- X -version
- Qt version
- Window manager and Desktop environnement used and version
- ParaView’s git tag
- Of course, the memory results

@shawn.waldon @cory.quammen @utkarsh.ayachit

Lots of thanks !

---

<div class="post-metadata">

### Author: ![cory.quammen](https://discourse.paraview.org/user_avatar/discourse.paraview.org/cory.quammen/32/11193_2.png) [@cory.quammen](https://discourse.paraview.org/u/cory.quammen)
#### Post date: [June 22, 2018, 2:24pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/38 "2018-06-22T14:24:13Z")

</div>

ParaView: 3494fe78  
VTK: 437188aa

| | |
| --- | --- |
| **Memory before test:** | **1856MiB** |
| /usr/lib/xorg/Xorg | 1127MiB |
| compiz | 388MiB |
| -token=… | 330MiB |

| | |
| --- | --- |
| **Memory after test:** | **2011MiB** |
| /usr/lib/xorg/Xorg | 1229MiB |
| compiz | 441MiB |
| -token=… | 330MiB |

**System specs**

- Ubuntu 16.04
- Quadro M4000
- Driver: 384.90
- Kernel: #46~16.04.1-Ubuntu SMP Mon Dec 4 15:57:59 UTC 2017
- [X.Org](http://X.Org) X Server: 1.19.5
- Qt: 5.9.1
- Compiz 0.9.12.2, Unity 7.4.0

Some more data: each time I run `ctest -R pv.UndoRedo2 --repeat-until-fail 20`, Xorg increases memory usage by about 110MB. I’m seeing that growth consistently after 4 invocations of this command.

---

<div class="post-metadata">

### Author: ![shawn.waldon](https://discourse.paraview.org/user_avatar/discourse.paraview.org/shawn.waldon/32/12_2.png) [@shawn.waldon](https://discourse.paraview.org/u/shawn.waldon)
#### Post date: [June 22, 2018, 3:22pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/39 "2018-06-22T15:22:24Z")

</div>

This is my local machine, not a dashboard.

Xubuntu 18.04, installed in its current version  
Quadro K620  
Driver version 390.48  
Kernel 4.15.0-23  
Xorg: 1.19.6  
Qt: 5.10.1 (from Qt5 website)  
Xfce 4.12

Memory usage from nvidia-smi:  
Before:  
Global: 228MiB / 1993MiB  
/usr/lib/xorg/Xorg 180MiB  
/usr/lib/firefox/firefox 43MiB

After  
Global: 270MiB / 1993MiB  
/usr/lib/xorg/Xorg 222MiB  
/usr/lib/firefox/firefox 43MiB

---

<div class="post-metadata">

### Author: ![Joachim\_Pouderoux](https://discourse.paraview.org/user_avatar/discourse.paraview.org/joachim_pouderoux/32/38_2.png) [@Joachim\_Pouderoux](https://discourse.paraview.org/u/Joachim_Pouderoux)
#### Post date: [June 22, 2018, 6:01pm UTC](https://discourse.paraview.org/t/linux-x-issues/80/40 "2018-06-22T18:01:45Z")

</div>

@cory.quammen @shawn.waldon Just to be sure. Did you performed this test on master or after applying my MR vtk!4431 or Mathieu’s paraview!2511?

[Previous page](https://discourse.paraview.org/t/linux-x-issues/80.md?page=1)

[Next page](https://discourse.paraview.org/t/linux-x-issues/80.md?page=3)
