Skip to content
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

UTM crashes when running glxgears #4856

Closed
osy opened this issue Dec 29, 2022 · 19 comments
Closed

UTM crashes when running glxgears #4856

osy opened this issue Dec 29, 2022 · 19 comments
Milestone

Comments

@osy
Copy link
Contributor

osy commented Dec 29, 2022

    @osy & @ktprograms, I was able to get SuperTuxKart also working on my M1 iPad Pro.

SuperTuxKart warned that OpenGL 3.x was not available and may have decreased performance but seemed to allow running on OpenGL 2.x and did not crash.

However, I'd still be concerned there might be a memory leak with the metal backend. I tried to run glxgears using the same setup, and it would run for a second or two and then UTM would crash. While glxgears did run, it ran very smoothly. Perhaps glxgears is using some OpenGL calls that SuperTuxKart is not. Yet, if UTM crashes with GL-acceleration on glxgears, I'd be concerned that it might crash on some other basic GL-accelerated programs not yet tested.

Can anyone else confirm whether they can run glxgears on UTM without it crashing? I apologize but for some reason my UTM won't produce a debug file after the crash for me to export for review.

The system I tested it on was:
M1 iPad Pro
UTM v.4.1.3 pre-release
ARM64
3G ram allocated to VM
Debian 11 LDXE from the UTM gallery
Display: virtio-gpu-gl-pci and virtio-ramfb-gl both similarly crash

(Of note, I also tested glxgears on two other debian-based distributions x86-64 distros [Sparkylinux & antiX], and they similarly crashed with glxgears)

glxgears is available in Debian 11 by the mesa-utils pkg in the Debian repository

Fyi

Originally posted by @SugarRayLua in #4846 (comment)

@osy
Copy link
Contributor Author

osy commented Dec 29, 2022

@SugarRayLua are you running the TrollStore build?

@fomalsd
Copy link

fomalsd commented Dec 29, 2022

Can confirm the VM freeze when running glxgears in UTM v.4.1.3 on Debian 11 x86-64 guest
AltStore, no jailbreak, paid dev account, A12X iPad Pro on 15.5

@fomalsd
Copy link

fomalsd commented Dec 29, 2022

Attaching a few logs, all tested using Debian 11 x86-64 guest with virtio-vga-gl

  • Metal backend, glxgears, VM freeze (UTM UI is responsive):
    debug.log

  • OpenGL backend, failed to start vm:
    debug (2).log

  • 'Default' backend, glxgears, VM freeze (UTM UI is responsive):
    debug (3).log

  • UTM still crashes when running DirectX games under wine, unfortunately (Trackmania in this case):
    debug (4).log

@Andy312432
Copy link

I’m able to reproduce this in 15.1 M1 ipad pro via trollstore.
But fore me, it looks more like a black screen instead of crashing…
And i also get random black screen similiar to this issue when select an non-gl video card when gl being selected in another screen(external monitor)

@SugarRayLua
Copy link

@osy, no, I am not using the trollstore build.

@osy osy added this to the v4.1 milestone Dec 29, 2022
@osy
Copy link
Contributor Author

osy commented Dec 29, 2022

@fomalsd when UTM crashes, please get a crash log and also open a new issue

@osy
Copy link
Contributor Author

osy commented Dec 29, 2022

Also FWIW, I wouldn't even bother using GL backend on iOS. It is extremely buggy for me.

@osy osy removed this from the v4.1 milestone Dec 31, 2022
@osy
Copy link
Contributor Author

osy commented Dec 31, 2022

2022-12-30 22:21:26.454874-0800 UTM[785:151273] Execution of the command buffer was aborted due to an error during execution. Caused GPU Address Fault Error (0000000b:kIOGPUCommandBufferCallbackErrorPageFault)

Seems like the GPU crashed due to an invalid address. Unfortunately, I don't think this can be fixed. At least not without significant work on virglrenderer/ANGLE.

However, I have noticed that this seems to be related to the DM that's being used. In my GNOME Debian 11 installation, glxgears works perfectly fine at full speed. In my Ubuntu 22.04 installation, it works but is really slow. Also firefox doesn't startup.

@osy osy closed this as not planned Won't fix, can't repro, duplicate, stale Dec 31, 2022
@SugarRayLua
Copy link

Interesting, @osy. I installed Debian 11 GNOME on my iPad Pro (x86_64) and utm crashed for me after running glx gears for a couple of seconds. (same setup as I used before, iPad Pro M1, 3G ram allocated). Fyi

@osy
Copy link
Contributor Author

osy commented Dec 31, 2022

Hmm I’m using gnome on arm64 with hypervisor so ymmv

@SugarRayLua
Copy link

SugarRayLua commented Jan 1, 2023

Thanks, and yes, I downloaded Debian 11 Arm64 Gnome, and it also crashed after running glxgears. Hypervisor might help.

@Andy312432
Copy link

Andy312432 commented Jan 1, 2023

Thanks, and yes, I downloaded Debian 11 Arm64 Gnome, and it also crashed after running glxgears. Hypervisor might help.

Will, for me, hypervisor doesn't...(still crashes)
Debian arm64 and m1 hypervisor.
But in my memory, glxgears in 4.0.x works 🤔

Update: 4.0.x works in Ubuntu 20.x but freezes(unable to enter system) in 22.x, and now utm can get into system in 20 and 22, but glxgears crashes in both system.
Maybe something introduced during these two version I think.

@fomalsd
Copy link

fomalsd commented Jan 1, 2023

I mean it's clearly a regression of some sort?
Because glxgears used to work just fine on x86-64 Debian 11 with i3wm emulated prior to UTM 4.1.3

So seems like 3d support on iOS only got worse for those who don't have a lucky specific combo of m1 + trollstore and cannot use virtualization...
I really hope this gets addressed in some way for non-hypervisor VMs

@osy
Copy link
Contributor Author

osy commented Jan 1, 2023

I’m pretty sure there’s multiple different issues here. But it would be good if someone can provide an example of this happening in something that’s not glxgears because realistically nobody needs to run that app.

@osy osy reopened this Jan 1, 2023
@osy
Copy link
Contributor Author

osy commented Jan 1, 2023

Otherwise, I humbly ask people to switch back to the GL backend (currently broken in latest beta will be available again next beta) if they really want to run glxgears.

@osy osy added this to the v4.1 milestone Jan 1, 2023
@osy osy closed this as completed in 213472b Jan 1, 2023
@fomalsd
Copy link

fomalsd commented Jan 8, 2023

unfortunately running glxgears causes UTM to crash even when using OpenGL backend. Tested with x86-64 Debian 11 with GNOME on a12x iPad Pro
opengl_glxgears_crash.log
ping me if you need a more detailed crash log

@SugarRayLua
Copy link

SugarRayLua commented Jan 8, 2023

@fomalsd, the newest pre-release (UTM 4.1.5) working for me with the OpenGL backend. I get appx 600 fps with smoothly running glxgears on my iPad Pro without crashing. However, I've got a slightly different set up:
X86-64 (same)
M1 iPad Pro (different)
Anti-X (Debian 11 based but different distro; unfortunately, I recently deleted by std Debian 11 VM)
Fyi

@fomalsd
Copy link

fomalsd commented Jan 8, 2023

actually it seems to depend on desktop environment, too… when running Debian 11 with i3wm and OpenGL backend glxgears does NOT crash the VM (600+ fps indeed), but with GNOME it does crash after quickly showing low memory popup
(no, my VM memory limits are set up fine and it still happens with minimal allocated RAM and after rebooting)
I suspect lower RAM of my device makes it more sensitive to memory leaks

@osy
Copy link
Contributor Author

osy commented Jan 8, 2023

It's not a memory leak. I've looked into it. It tries to quickly allocate as much RAM as possible and then get killed by iOS. I suspect it may be because of either the workaround timer implementation (it will always return 0 time has passed) or missing vsync support or something.

Anyways, I didn't spend too much time debugging it because again, I see no practical use for running glxgears.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants