-
Notifications
You must be signed in to change notification settings - Fork 316
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GUI app exit with segmentfault in NVIDIA GPU driver #715
Comments
This issue caught my attention due Flutter apps crashing on exit, right after updating Windows to build 22598.200. I'm right now on 22610.1 and still any Flutter app, and the other apps mentioned above crash on exit with segmentation fault, so something related to OpenGL changed recently. To add more context about my development machine, here it is: wsl --version:
Experimented with Ubuntu versions |
Also, this bare bones OpenGL sample crashes in the very same way (either compiled with gcc or clang):
// This is a simple introductory program; its main window contains a static
// picture of a tetrahedron, whose top vertex is white and whose bottom
// vertices are red, green and blue. The program illustrates viewing by
// defining an object at a convenient location, then transforming it so that
// it lies within the view volume. This is a lousy way to do things (it's
// easier to use gluLookAt()), but it's nice to see how viewing is done at
// a very low level.
#ifdef __APPLE_CC__
#include <GLUT/glut.h>
#else
#include <GL/glut.h>
#endif
// Clears the window and draws the tetrahedron. The tetrahedron is easily
// specified with a triangle strip, though the specification really isn't very
// easy to read.
void display() {
glClear(GL_COLOR_BUFFER_BIT);
// Draw a white grid "floor" for the tetrahedron to sit on.
glColor3f(1.0, 1.0, 1.0);
glBegin(GL_LINES);
for (GLfloat i = -2.5; i <= 2.5; i += 0.25) {
glVertex3f(i, 0, 2.5); glVertex3f(i, 0, -2.5);
glVertex3f(2.5, 0, i); glVertex3f(-2.5, 0, i);
}
glEnd();
// Draw the tetrahedron. It is a four sided figure, so when defining it
// with a triangle strip we have to repeat the last two vertices.
glBegin(GL_TRIANGLE_STRIP);
glColor3f(1, 1, 1); glVertex3f(0, 2, 0);
glColor3f(1, 0, 0); glVertex3f(-1, 0, 1);
glColor3f(0, 1, 0); glVertex3f(1, 0, 1);
glColor3f(0, 0, 1); glVertex3f(0, 0, -1.4);
glColor3f(1, 1, 1); glVertex3f(0, 2, 0);
glColor3f(1, 0, 0); glVertex3f(-1, 0, 1);
glEnd();
glFlush();
}
// Sets up global attributes like clear color and drawing color, enables and
// initializes any needed modes (in this case we want backfaces culled), and
// sets up the desired projection and modelview matrices. It is cleaner to
// define these operations in a function separate from main().
void init() {
// Set the current clear color to sky blue and the current drawing color to
// white.
glClearColor(0.1, 0.39, 0.88, 1.0);
glColor3f(1.0, 1.0, 1.0);
// Tell the rendering engine not to draw backfaces. Without this code,
// all four faces of the tetrahedron would be drawn and it is possible
// that faces farther away could be drawn after nearer to the viewer.
// Since there is only one closed polyhedron in the whole scene,
// eliminating the drawing of backfaces gives us the realism we need.
// THIS DOES NOT WORK IN GENERAL.
glEnable(GL_CULL_FACE);
glCullFace(GL_BACK);
// Set the camera lens so that we have a perspective viewing volume whose
// horizontal bounds at the near clipping plane are -2..2 and vertical
// bounds are -1.5..1.5. The near clipping plane is 1 unit from the camera
// and the far clipping plane is 40 units away.
glMatrixMode(GL_PROJECTION);
glLoadIdentity();
glFrustum(-2, 2, -1.5, 1.5, 1, 40);
// Set up transforms so that the tetrahedron which is defined right at
// the origin will be rotated and moved into the view volume. First we
// rotate 70 degrees around y so we can see a lot of the left side.
// Then we rotate 50 degrees around x to "drop" the top of the pyramid
// down a bit. Then we move the object back 3 units "into the screen".
glMatrixMode(GL_MODELVIEW);
glLoadIdentity();
glTranslatef(0, 0, -3);
glRotatef(50, 1, 0, 0);
glRotatef(70, 0, 1, 0);
}
// Initializes GLUT, the display mode, and main window; registers callbacks;
// does application initialization; enters the main event loop.
int main(int argc, char** argv) {
glutInit(&argc, argv);
glutInitDisplayMode(GLUT_SINGLE | GLUT_RGB);
glutInitWindowPosition(80, 80);
glutInitWindowSize(800, 600);
glutCreateWindow("A Simple Tetrahedron");
glutDisplayFunc(display);
init();
glutMainLoop();
} |
I have the same issue.
|
i'm getting segfaults in
and
|
I have same issue, actually I got segfault when I exit any gui apps. |
I've made some upgrades recently:
Still crashing on exit in the very same way:
|
WSL version: 0.64.0.0
Anyone got any workarounds? I had to resort back to VcXsrv and disablw wslg :( |
Same issue with IntelliJ crashes on my NVIDIA laptop. On my AMD desktop I don't experience this. |
Another observation: if we use systemd bottle, genie / distrod, the segfault occurs for more apps / occasions. For example android emulator always segfaults for me when inside systemd. But outside systemd It open once or twice over ~20 tries. As the crush is happening from |
any progress here? I have the same problem. |
Same issue for my NVIDIA GeForce GTX 1650 card with driver version 516.94. |
same issue when I ran some backtraces, HTH
|
Hello, I am also running into segmentation fault when trying any of the graphics CUDA Sample files (e.g. fluidGL). The GUI window I also tried the same samples from Windows 11 using VS and they work. The graphics segmentation fault happens
Felix |
Having similar issues:
Running hotspot build from the recent source, when doing nothing but exit:
Got a segment fault... |
Hello Microsoft, How come no response from anyone at Microsoft, this is not an open source project in which contributors can fix issues. This issue is easy to reproduce and confirm that exists and a bug. Also reproduced using:
glxgears and glxinfo may be used to reproduce, nothing special is required, below is an example of Recent windows, ubuntu-22.04.
Regards, |
Hey, the issue seems disappear on my machine today, suddenly.
|
not fixed yet, verions:
just use following to avoid.
|
I have this same issue on my new Thinkpad P16S laptop running Ubuntu 22.04 in WSL on Windows 10.
Running from
|
I’m also seeing this issue. I’ve been forced to completely disable my Dell Precision 5550’s Quadro T1000 dGPU so I can do my job. My issue matches the reproduction steps and backtraces already posted. |
Still present for me as well.
|
Same issue glxinfo and glxgears both run, but always end with segmentation fault.
|
Could the investigation of this issue be related? It seems that Microsoft is looking at it right now. I hope they can look into our "Segmentation fault" issues too, as we cannot work with some GUI apps. |
It not related to hibernate in any way. |
Same issue, no OpenGL required -- just a simple display of an image using SDL2. On application exit there is the crash in the NVidia driver, at exactly the place shown in the
And error is literally:
I added some extra debugging to the program I was testing (just a quick&dirty bit to re-familiarize myself with SDL and get comfortable with SDL2 after a long period of doing a lot of systems work) and it reaches the final Note: I did add a breakpoint in |
Pretty much the same to what sarim posted. But I did find some differences on webgl caps when running chrome from host and from within wsl though: (host) (wsl) And the aquarium shows a major perf drop after the update -- with 30000 fishes it used to keep 60 fps just like running from host, now it dropped to 19 fps. |
Waiting on ... No crash on any test programs exit! Looks like this bug is truly fixed. Hurrah! Here's
And
|
@nedsociety interesting. I get similar bad result on the tests you linked too. But I'm not a graphics / game engine guy so don't have much insight/tools in hand to investigate further. You should open a new bug for this performance discrepancy. |
This worked for me, thank you! |
@dshadowwolf @sarim what nvidia driver do you have? If you do |
@andreear-23 I've been using the latest driver release using |
|
Thanks a lot, I have the same mesa driver and almost the same Nvidia driver but somehow still different OpenGL core version
What is stranger is that the only way I could get the Nvidia GPU for rendering on an Ubuntu machine was by using these settings: |
↪ ~ ➤ nvidia-smi
Tue Jul 11 21:07:53 2023
+---------------------------------------------------------------------------------------+
| NVIDIA-SMI 535.54.06 Driver Version: 536.40 CUDA Version: 12.2 |
|-----------------------------------------+----------------------+----------------------+
| GPU Name Persistence-M | Bus-Id Disp.A | Volatile Uncorr. ECC |
| Fan Temp Perf Pwr:Usage/Cap | Memory-Usage | GPU-Util Compute M. |
| | | MIG M. |
|=========================================+======================+======================|
| 0 NVIDIA GeForce RTX 2060 ... On | 00000000:08:00.0 On | N/A |
| 37% 41C P8 17W / 175W | 1250MiB / 8192MiB | 4% Default |
| | | N/A |
+-----------------------------------------+----------------------+----------------------+
+---------------------------------------------------------------------------------------+
| Processes: |
| GPU GI CI PID Type Process name GPU Memory |
| ID ID Usage |
|=======================================================================================|
| 0 N/A N/A 48 G /Xwayland N/A |
+---------------------------------------------------------------------------------------+
↪ ~ ➤ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
Version: 22.2.5
Accelerated: yes
Video memory: 24359MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 4.2
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.2 (Compatibility Profile) Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 22.2.5-0ubuntu0.1~22.04.3
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
↪ ~ ➤ |
@sarim I have exactly the same GPU. Could you tell me what is the Build version of your Windows OS? Also are you using Windows 11 or Windows 10? |
Windows 11. Build 10.0.22621.1928 |
This could be the reason, I have Windows 10, build 19044 |
Seems like segfault is back with latest wsl/wslg. ➤ wsl --version
WSL version: 2.1.1.0
Kernel version: 5.15.146.1-2
WSLg version: 1.0.60
MSRDC version: 1.2.5105
Direct3D version: 1.611.1-81528511
DXCore version: 10.0.25131.1002-220531-1700.rs-onecore-base2-hyp
Windows version: 10.0.22621.3078 ➤ glxinfo -B
name of display: :0
display: :0 screen: 0
direct rendering: Yes
Extended renderer info (GLX_MESA_query_renderer):
Vendor: Microsoft Corporation (0xffffffff)
Device: D3D12 (NVIDIA GeForce RTX 2060 SUPER) (0xffffffff)
Version: 23.0.4
Accelerated: yes
Video memory: 24344MB
Unified memory: no
Preferred profile: core (0x1)
Max core profile version: 4.2
Max compat profile version: 4.2
Max GLES1 profile version: 1.1
Max GLES[23] profile version: 3.1
OpenGL vendor string: Microsoft Corporation
OpenGL renderer string: D3D12 (NVIDIA GeForce RTX 2060 SUPER)
OpenGL core profile version string: 4.2 (Core Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL core profile shading language version string: 4.20
OpenGL core profile context flags: (none)
OpenGL core profile profile mask: core profile
OpenGL version string: 4.2 (Compatibility Profile) Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL shading language version string: 4.20
OpenGL context flags: (none)
OpenGL profile mask: compatibility profile
OpenGL ES profile version string: OpenGL ES 3.1 Mesa 23.0.4-0ubuntu1~22.04.1
OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.10
Segmentation fault |
Two weeks. and no one is looking to this? |
Same versions as you. Crashes with nvidia works with intel.
|
I just applied the latest
|
@hhoppe, I can confirm it looks good now. Thanks for the info.
|
yes, I can also confirm that both intel and nvidia working as expected, unlike previously tested[1] [1] #715 (comment) |
my wsl focal container fails with same segmentfault
Nvidia
AMD
stacktrace of failed command It looks like |
I am still facing the issue... not sure is it really fixed. Seeking help from others. glxinfo -B
nvidia-smi
wsl --version
|
I upgrade the latest GPU driver from AMD site and it appears to fix my problem. Previous GPU driver is provided by OEM, and it's WDDM 3.0, the latest AMD driver comes with WDDM 3.1. Can anyone else with AMD GPU confirm? |
I think this is really a mesa issue. After I update mesa to 24, everything works well. |
@PhyX-Meow @lwintermelon Would you mind sharing the tips on how to upgrade those drivers in WSL, especially for the mesa driver. I have run apt update for mesa, it said its already the latest. |
Basicly, there are 2 drivers involved if you want to use 3d acceleration in WSLg, one is Windows WDDM display driver runs on host windows,the other is Mesa driver runs on host WSL implemented OpenGL or Vulkan. As for driver update, for Mesa, try PPA mentioned above if you are using Ubuntu; for Windows display driver, follow WSL docs. |
@PhyX-Meow @lwintermelon Thanks both. As I have no admin right to install drivers, I only tried the PPA method to upgrade MESA. The result is positive. |
Version
Microsoft Windows [版本 10.0.22598.1]
WSL Version
Kernel Version
5.10.102.1
Distro Version
Debian 11
Other Software
默认分发: Debian
默认版本: 2
WSL 版本: 0.58.1.0
内核版本: 5.10.102.1
WSLg 版本: 1.0.33
MSRDC 版本: 1.2.2924
Direct3D 版本: 1.601.0
Windows 版本: 10.0.22598.1
Repro Steps
run
wsl
from cmd.run
glxinfo -B
from wsl.run
qtcreator
from wsl.Expected Behavior
glxinfo exits normally. And other GUI/qt app should work normally.
Actual Behavior
run
qtcreator
, close app, and getDiagnostic Logs
everything goes well before doing
wsl --update
, and after windows update(Windows 11 Insider Preview 22598.1 (ni_release)
).dmeg:
The text was updated successfully, but these errors were encountered: