rendering problem vtk 8.2 from centos 7 and tesla graphic card

Dear All,
I use vtk rendering filter to create images from some views.
The images are ok on fedora.
But on centos 7 and tesla graphic card, after the 2nd images, a crash appear. (Note: the 2 images are ok but I should have more)
The errors are :
X Error: BadDrawable
Request Major code 130 (MIT-SHM)
Request Minor code 3 ()
ResourceID 0x3000002
Error Serial #17
Current Serial #18
some information on the graphical node in Ps below.

Any ideas of this problem? more information?
thank you in advance,
Jérôme

Ps:

uname -a

Linux vdi-vm-gpu3-4-004 3.10.0-1127.10.1.el7.x86_64 #1 SMP Wed Jun 3 14:28:03 UTC

cat /proc/bus/pci/devices | grep VGA || lspci | grep VGA | colrm 1 4 ; \ cat /proc/cpuinfo | egrep “model name|MHz” ; \ xdpyinfo | egrep “version:|dimensions|depth of” ; \ glxinfo | egrep -A2 “rendering|OpenGL” ; \ lspci -nnk | grep -iA2 vga ;

model name : Intel(R) Xeon(R) Platinum 8167M CPU @ 2.00GHz
cpu MHz : 1999.997
dimensions: 1920x1080 pixels (508x285 millimeters)

depth of root window: 24 planes
direct rendering: Yes
server glx vendor string: NICE s.r.l.
server glx version string: 1.4
OpenGL vendor string: NVIDIA Corporation
OpenGL renderer string: Tesla V100-SXM2-16GB/PCIe/SSE2
OpenGL core profile version string: 4.6.0 NVIDIA 430.46
OpenGL core profile shading language version string: 4.60 NVIDIA
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL core profile extensions:
GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index,

GL_NV_path_rendering, GL_NV_path_rendering_shared_edge,
GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_primitive_restart,
GL_NV_query_resource, GL_NV_query_resource_tag, GL_NV_register_combiners,
GL_NV_shader_thread_shuffle, GL_NV_stereo_view_rendering,
GL_NV_texgen_reflection, GL_NV_texture_barrier,
GL_NV_texture_compression_vtc, GL_NV_texture_env_combine4,

OpenGL version string: 4.6.0 NVIDIA 430.46
OpenGL shading language version string: 4.60 NVIDIA
OpenGL context flags: (none)
OpenGL profile mask: (none)
OpenGL extensions:

 GL_AMD_multi_draw_indirect, GL_AMD_seamless_cubemap_per_texture,
 GL_AMD_vertex_shader_layer, GL_AMD_vertex_shader_viewport_index,
 GL_NV_path_rendering, GL_NV_path_rendering_shared_edge,
 GL_NV_pixel_data_range, GL_NV_point_sprite, GL_NV_primitive_restart,
 GL_NV_query_resource, GL_NV_query_resource_tag, GL_NV_register_combiners,
 GL_NV_shader_thread_shuffle, GL_NV_stereo_view_rendering,
 GL_NV_texgen_reflection, GL_NV_texture_barrier,
 GL_NV_texture_compression_vtc, GL_NV_texture_env_combine4,
 00:02.0 VGA compatible controller [0300]: Device [1234:1111] (rev 02)
 Subsystem: Red Hat, Inc. Device [1af4:1100]
 Kernel driver in use: bochs-drm

Hello, friend,

If your application is based on Qt, please, try this:
a) Edit /etc/environment (with sudo or as root);
b) Add this line:
QT_X11_NO_MITSHM=1
c) Save;
d) Reboot.

If this doesn’t apply nor solve your problem, do the basic checklist:
a) Do you have the latest CentOS 7 version?
b) Do you have the latest X.org version for your OS?
c) Do you have the latest graphics driver?
d) Are you on a virtual machine?
e) Are you over non-Unix remote access (e.g. Remote Desktop, XLaunch, etc.)?

regards,

Paulo

Hi Paulo,
Thank you for the advices.
For the 1st part, if I use export QT_X11_NO_MITSHM=1 and after my tool
It does not fix the problem.
I cannot update the file /etc/environment I’m not super user of the machine.
Note: the application does not use Qt but maybe the vtk to generate the images?

For the 2nd part, I have to check on the machine.
Today it’s not available.
Next week, I’ll answer questions.

Regards,
Jérôme

Hi, Jérôme,

If you are sure your application does not use Qt, then there is no point in setting QT_X11_NO_MITSHM. Then you have indeed to rule out environment issues.

take care,

Paulo

Hi, Paulo,

Thank you for your help.

We tried the QT option in /etc/environment without success. same error.

some information concerning the machine.
a) Do you have the latest CentOS 7 version?
Currently we are using:CentOS linux release 7.7.1908
b) Do you have the latest X.org version for your OS?
Currently we are using:X.Org X Server 1.20.4
X Protcol Version 11, Revision 0
c) Do you have the latest graphics driver?
Currently we are using:NVIDIA-SMI 430.46 Driver Version: 430.46 CUDA Version: 10.1
which version of Cent OS 7 and the graphic drivers has to use?
Could you tell us your recommendations? Or could you clarify “the latest” versions?
d) Are you on a virtual machine?
Yes
e) Are you over non-Unix remote access (e.g. Remote Desktop, XLaunch, etc.)?
Yes (NiceDCV from Windows machines. )

Thank you in advance for your feedback,
Regards,
Jerome

Can you run other 3D visualization software (e.g. ParaView)?

That’s not exactly what I asked. No, 7.7 is not the latest. Please, check with your IT support to provide updates to the mentioned software. Old software is a common cause of errors like that, especially the graphics driver.

regards,

Paulo

Hello,
Paraview runs well on this machine.
The vtk pipelines are ok using slices, integrate, threshold … only the multiple rendering crash.
Concerning centOS, I’m looking into it.

Thank you for your help,
regards,
Jérôme

Considering you can run ParaView, I don’t think upgrading CentOS, etc. will solve. I think the problem is how your application’s graphic backend is talking to the X service. If your application is not using Qt, what then?

Since you’re using remote access, it could also be permission related. Maybe you are running your application as one user and a X display is being created for your NiceDCV session with another user. You have to make sure this is not the case.

Hello,
Thank you for the feedback.
I agree with you :" I think the problem is how your application’s graphic backend is talking to the X service."
concerning X display I think it’s not the problem because I can generate one or more images but not all.

I requested the update on the /etc/environment to add QT_X11_NO_MITSHM=1, same behavior.

“If your application is not using Qt; what then?”
The tool has not User Graphic Interface. It uses vtk python and generate image/render (offscreen_rendering=true). I think using directly openGL.

I will try to use the llvm libraries instead of the graphic card libraries.
compile on centos 7… What is your point of view on this try?
Do you have any other ideas for tests?

Best regards,
Jerome

Hi,

IMO, your program in the end is still trying to get a GL context or a graphics window, hence the error. Please, follow this discussion thread: https://vtk.org/pipermail/vtkusers/2018-April/101557.html . There are some packages to install to enable offline VTK rendering. Also, take a look at this example: https://gist.github.com/pangyuteng/cf6345c4e5f8f77756064e4de9ef76c7 . Maybe you are missing some initialization/configuration code in the Python side.

In addition, according to this example (https://kitware.github.io/vtk-examples/site/Cxx/Utilities/OffScreenRendering/), VTK must have been compiled with the VTK_OPENGL_HAS_OSMESA option enabled.

So, you have to clear this checklist:

  1. Make sure you have the required Python packages;
  2. Make sure you have made the required VTK calls to prepare VTK for offscreen rendering;
  3. Make sure VTK was build with the VTK_OPENGL_HAS_OSMESA option set.

For further help, google for “headless VTK for unit tests”. Unit tests should ideally not open graphics windows since they are required to run unattended on CI/CD headless servers.

regards,

Paulo

Hello,

Thank you for this information.
I still have the problems, I continue the investigation.

regards,
Jerome

Hello,
Some news.
The problem seems to be related to the method vtkRenderWindowInteractor on centos7+tesla graphic card, without this method I can generate all the images.
Note: if I use interactive window (renderwindow OffScreenRendering=False + RenderWindowInteractor Start()) I can generate also all images without error but I need to close manually the image one by one.
I need the window interactor to manage axes on the images. Is it possible to treat axes without vtkRenderWindowInteractor, I don’t think so?
The way (workaround) to generate all the images is to make the images with OffScreenRendering=False without Start() method.

Regards,
Jerome

1 Like