VMware Communities
ThomasHarte
Contributor
Contributor
Jump to solution

How to debug: Fusion 10 + Ubuntu 18.04.1 + hardware accelerated OpenGL = crashed virtual machine?

I am a developer. One of the programs I am developing uses OpenGL 3.2 for output.

I primarily develop on the Mac, but I also support Linux. So I have Ubuntu 18.04.1 installed in a virtual machine within Fusion 10.

I have two pipelines implemented in my code, relying on the same inputs — the same vertex arrays and the same sequence of calls. Just a different shader. Both work flawlessly on the Mac.

Over in Ubuntu-via-VMWare, in the first case everything works as it should. But in the second, VMWare announces that my machine has crashed and offers to restart it. Since the whole machine falls over, there's no core dump, and I'm not even entirely sure that everything I'm throwing at stdout is reaching me. Certainly the filing system sometimes starts up in a corrupt state, so writing there also isn't even necessarily a convincing option.

Is there any way to debug what's going on here? Any information I can get from VMWare Fusion, perhaps, that will allow me to introspect its OpenGL driver?

Alas, using software rendering doesn't seem to give me all the OpenGL features I need. Actually, that gives very strange behaviour — e.g. glCheckFramebufferStatus returns 0, which means "an error occurred" (other than the ordinary named ones) per the man page, but glGetError then also returns 0, which is the constant for "no error recorded".

So I'm at a bit of a loss here. I feel like VMWare Fusion probably shouldn't crash even if I've done something egregious, like trying to reference out-of-bounds elements in a vertex array, but given that it is I'd really like to know whether I've made an error.

Any ideas would be welcome.

EDIT: updates: somebody has tested this same code on a non-virtualised Linux without issue. So that possibly puts more suspicion on the Fusion 10 implementation of hardware OpenGL acceleration.

Tags (2)
0 Kudos
1 Solution

Accepted Solutions
RickShu
VMware Employee
VMware Employee
Jump to solution

Hi ,

Our dev team has just confirmed that on Fusion 11 we should have already fixed this issue, so would you please download a free trial of Fusion 11 and give it a try?

You can download it from this page.

Reminder, please well backup your data before you start the trial.

Regards,

-Rick

View solution in original post

0 Kudos
6 Replies
RickShu
VMware Employee
VMware Employee
Jump to solution

Hi ThomasHarte,

It would be great if you can attach the vmware.log to this thread, you can find it from your VM bundle folder.

Also, have you upgraded the Mesa to latest version?  Can you post the outcome message after run glxinfo | grep OpenGL

Thanks & Regards,

-Rick

0 Kudos
ThomasHarte
Contributor
Contributor
Jump to solution

Attached is the vmware.log from a crashed virtual machine. The exact message provided by VMWare, not that it reveals much is:

VMware Fusion has encountered an error and has shut down the virtual machine.

Click Restart to start the virtual machine again. Click Report to collect data and to request support from VMware.

... 'report' seems to harvest a lot of information about my machine — such as which other applications I have installed by trawling my /Applications folder — so I'll decline to provide that publicly.

Is "2019-02-24T21:43:46.040-05:00| svga| E105: PANIC: Unsupported vertex format SVGA3D_R16_SINT" perhaps the relevant complaint?

On the off chance it is, to try to be as clear as possible:

  • I have two pipelines here, one of which works and one of which doesn't;
  • both use the same vertex array and attribute bindings;
  • the vertex and fragment shaders are also 'similar' but the main difference is that the crashing pipeline does a little more than the regular one — it uses more varyings to do a more complicated calculation.

Attribute bindings are all provided explicitly to the OpenGL driver, per the fact that I'm using the same vertex array with multiple shaders. I check there for all relevant GL errors, so I'm sure I'm not crossing GL_MAX_VERTEX_ATTRIBS since that'd be reported. Similarly, I do all the proper checks for compilation errors on my shaders; none are reported.

Concretely, this is a shader that helps to simulate a CRT. As in, really simulate it. So each piece of geometry is a single raster scan, with an underlying signal. In the first case, the input is unfiltered RGB. So there's not a lot more to it than keeping track of the input texture coordinate. In the second case, the input is composite video. So additional varyings are information about phase and amplitude of the colour subcarrier, and a bunch of extra texture coordinates to allow for frequency-range filtering. Then the fragment shader is doing some trig and some windowed filtering.

If that's actually the problem, and it's really true that I've just found an instance where the GLSL compiler tries to use hardware that isn't available and has no final recourse but to declare an unrecoverable machine, any idea whether this is fixed in Fusion 11?

The host machine, should that prove to be helpful, is a first-generation Retina MacBook. So an Intel HD Graphics 5300.

Within the virtual machine glxinfo reports (after a reboot):

thomasharte@ubuntu:~$  glxinfo | grep OpenGL

OpenGL vendor string: VMware, Inc.

OpenGL renderer string: SVGA3D; build: RELEASE;  LLVM;

OpenGL core profile version string: 3.3 (Core Profile) Mesa 18.2.2

OpenGL core profile shading language version string: 3.30

OpenGL core profile context flags: (none)

OpenGL core profile profile mask: core profile

OpenGL core profile extensions:

OpenGL version string: 3.1 Mesa 18.2.2

OpenGL shading language version string: 1.40

OpenGL context flags: (none)

OpenGL extensions:

OpenGL ES profile version string: OpenGL ES 3.0 Mesa 18.2.2

OpenGL ES profile shading language version string: OpenGL ES GLSL ES 3.00

OpenGL ES profile extensions:

0 Kudos
RickShu
VMware Employee
VMware Employee
Jump to solution

Hi ThomasHarte,

Thank you for the information. Our dev team will work on this problem.

Sorry for any inconvenience caused.

Regards,

-Rick

ThomasHarte
Contributor
Contributor
Jump to solution

Fantastic, thanks!

And, again, if it turns out the problem is already fixed in Fusion 11, just let me know. I don't want to upgrade just on the off chance, but I don't mind purchasing an upgrade for relevant bug fixes.

0 Kudos
RickShu
VMware Employee
VMware Employee
Jump to solution

Hi ,

Our dev team has just confirmed that on Fusion 11 we should have already fixed this issue, so would you please download a free trial of Fusion 11 and give it a try?

You can download it from this page.

Reminder, please well backup your data before you start the trial.

Regards,

-Rick

0 Kudos
ThomasHarte
Contributor
Contributor
Jump to solution

Fantastic, Fusion 11 resolves this issue! Thanks for looking into it!

0 Kudos