Summary: | Mesa and LLVM 3.6+ break opengl for genymotion | ||
---|---|---|---|
Product: | Mesa | Reporter: | giuseppe <spupazza> |
Component: | Drivers/Gallium/radeonsi | Assignee: | Default DRI bug account <dri-devel> |
Status: | RESOLVED FIXED | QA Contact: | Default DRI bug account <dri-devel> |
Severity: | normal | ||
Priority: | medium | ||
Version: | 10.5 | ||
Hardware: | Other | ||
OS: | All | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
debug output while crashed
radeonsi: Cache LLVMTargetMachineRef in context instead of in screen Radeonsi bug attachment [DEBUG] successful launch |
Description
giuseppe
2015-03-24 10:44:17 UTC
I have the exactly the same issue here. radeonsi + llvm 3.6 gives the exact same error while radeon (and llvm 3.6 installed) or radeonsi + llvm 3.5 never had any issue. One remark though, it is possible to launch genymotion with the radeonsi + llvm 3.6 combinbation if one tries many times, sometimes it takes 3~5 retries and sometimes 30+. Once started it seems stable. Can you set the environment variable R600_DEBUG=ps,vs,gs when you run genymotion and then post the output. I found out that like Ming-Wei Shih reported, if you try several time, sooner or later you'll be able to get the machine started. Unfortunately even then it wasn't stable for me. Here's the output with the variables indicated by stellard (I ran genymotion with : './genymotion R600_DEBUG=ps,vs,gs' command ) [p@pop genymotion]$ ./genymotion Logging activities to file: /home/p/.Genymobile/genymotion.log Logging activities to file: /home/p/.Genymobile/genymotion.log Logging activities to file: /home/p/.Genymobile/Genymotion/deployed/Custom Phone - 4.2.2 - API 17 - 768x1280/genymotion-player.log OpenGL connected to 192.168.56.101:25000 Port 22468 will be used for OpenGL data connections Unknown TCPCLI command 1003 Logging activities to file: /home/p/.Genymobile/genymotion.log Logging activities to file: /home/p/.Genymobile/Genymotion/deployed/Custom Phone - 4.2.2 - API 17 - 768x1280/genymotion-player.log OpenGL connected to 192.168.56.101:25000 Port 22468 will be used for OpenGL data connections Unknown TCPCLI command 1003 Logging activities to file: /home/p/.Genymobile/genymotion.log Logging activities to file: /home/p/.Genymobile/Genymotion/deployed/Custom Phone - 4.2.2 - API 17 - 768x1280/genymotion-player.log OpenGL connected to 192.168.56.101:25000 Port 22468 will be used for OpenGL data connections Unknown TCPCLI command 1003 Unknown TCPCLI command 1003 radeon: Failed to allocate a buffer: radeon: size : 0 bytes radeon: alignment : 4096 bytes radeon: domains : 4 radeon: flags : 4 radeon: Failed to allocate a buffer: radeon: size : 0 bytes radeon: alignment : 4096 bytes radeon: domains : 4 radeon: flags : 4 LLVM failed to compile shader EE si_state_shaders.c:443 si_shader_select - Failed to build shader variant (type=0) -12 (In reply to giuseppe from comment #3) > (I ran genymotion with : './genymotion R600_DEBUG=ps,vs,gs' command ) I believe the suggestion was to run it was R600_DEBUG=ps,vs,gs ./genymotion That way R600_DEBUG is in genymotion's environment. You should expect to see a ton of output. Created attachment 114583 [details]
debug output while crashed
debugging output attached.
(In reply to Ming-Wei Shih from comment #5) > Created attachment 114583 [details] > debug output while crashed > > debugging output attached. Based on the output it looks like there may be multiple threads compiling shaders. Do you know if genymotion is multi-threaded? If it is, is there some way to force it to use only one thread? Created attachment 114629 [details] [review] radeonsi: Cache LLVMTargetMachineRef in context instead of in screen Does this patch help? Created attachment 114641 [details]
Radeonsi bug attachment
THis is the output when I ran:
R600_DEBUG=ps,vs,gs ./genymotion
(In reply to giuseppe from comment #8) > Radeonsi bug attachment Is that from running with the patch applied? Created attachment 114646 [details]
[DEBUG] successful launch
It not solved with #7, but things behave differently now. It's still hit and miss to get it running but when it fails it doesn't crash any more, just gives an error that it cannot connect to the vm. What's strange though is that when it fails I don't get any debugging at all, so that that means there is a problem with genymotion itself? But then why this never happens with llvm 3.5? As far as I can tell genymotion's player (the part using OpenGL) is multi-threaded and I can't find a way to disabled it. Attached a successful run in #10, don't know if that's helpful at all. My bad, the patch in #7 fixed the regression for me. I was having issues earlier because an other user had genymotion running and locked on the same machine, genymotion sometimes has issues to find the correct session and times out when there are multiple users (uid) using it. How do I apply the patch? Can anyone help me indicating the command pls? I don't know if here is the best place to do this, in short - download the patch - download mesa (either git or tarball), unpack, cd into that dir - patch -p1 < /path/to/the/patch - compile & install patch at #7 seemed to have solved the issue with genymotion for me too patch applied cleanly against 10.5.2, been running this for almost 2 days. Module: Mesa Branch: master Commit: d64adc3a79e419062432cfa8d1cbc437676a3fbd URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=d64adc3a79e419062432cfa8d1cbc437676a3fbd Author: Michel Dänzer <michel.daenzer@amd.com> Date: Thu Mar 26 11:32:59 2015 +0900 radeonsi: Cache LLVMTargetMachineRef in context instead of in screen Fixes a crash in genymotion with several threads compiling shaders concurrently. I think this goes along with my issue in this bug report https://bugs.freedesktop.org/show_bug.cgi?id=89685 Hi, not really sure if my issue is related to this one. The problem with genymotion occured to me while using DRI_PRIME=1 genymotion after updating drivers using oibaf ppa https://launchpad.net/~oibaf/+archive/ubuntu/graphics-drivers on Ubuntu 16.04. I have Dell Inspirion 7548 with Radeon Opal R7 M265. Genymotion on Intel 5500 Broadwell G2 still works. glxinfo OpenGL renderer: Gallium 0.4 on AMD OLAND (DRM 2.43.0 / 4.4.0-36-generic, LLVM 3.9.0) I know it is newer LLVM and probably problem was fixed in the past, not sure what version of LLVM is used in stock 16.04. While running genymotion with DRI_PRIME=1 I am getting these errors: libGL error: unable to load driver: radeonsi_dri.so libGL error: driver pointer missing libGL error: failed to load driver: radeonsi libGL error: unable to load driver: swrast_dri.so libGL error: failed to load driver: swrast I've searched around the web and added this to my .profile: export LD_PRELOAD='/usr/$LIB/libstdc++.so.6' export DISPLAY=:0 That helped with running steam but not genymotion. But actually I am not sure if this is related to the emulator issue itself, I might have been getting these error messages too before I've updated oibaf drivers. The genymotion main menu panel to run emulators work, but emulators won't display. The genymotion emulator log gives me: [Genymotion Player] [Warning] Unrecognized OpenGL version Darek, please open a separate bug for your issue. In general using "export LIBGL_DEBUG=verbose" and/or "export LD_DEBUG=libs" allows everyone to see a bit more about which libraries are picked and why things are failing. It's worth adding some of that in the report. |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.