Summary: | [IVB/HSW/BDW] DOTA2 segfaults unless Mesa is configured with (non-default) --enable-glx-tls | ||
---|---|---|---|
Product: | Mesa | Reporter: | zhoujian <jianx.zhou> |
Component: | Drivers/DRI/i965 | Assignee: | Ian Romanick <idr> |
Status: | RESOLVED FIXED | QA Contact: | Intel 3D Bugs Mailing List <intel-3d-bugs> |
Severity: | minor | ||
Priority: | low | CC: | christophe.prigent, eero.t.tamminen, lilix.cheng, mengmeng.meng, wendy.wang |
Version: | git | ||
Hardware: | All | ||
OS: | Linux (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Bug Depends on: | |||
Bug Blocks: | 77449 | ||
Attachments: |
dmesg.log
dota2.log Xorg.0.log Use drm_intel_bufmgr_gem_set_vma_cache_size() after initializing intel buffer manager |
Description
zhoujian
2013-12-20 08:46:30 UTC
Created attachment 91021 [details]
dmesg.log
Created attachment 91022 [details]
dota2.log
Created attachment 91023 [details]
Xorg.0.log
(In reply to comment #2) > Created attachment 91022 [details] > dota2.log --------------- [S_API FAIL] SteamAPI_Init() failed; no appID found. Either launch the game from Steam, or put the file steam_appid.txt containing the correct appID in your game folder. --------------- > 3. run dota2 in steam Did you run it *from* Steam? (In reply to comment #4) > (In reply to comment #2) > Created attachment 91022 [details] > dota2.log > --------------- [S_API FAIL] SteamAPI_Init() failed; no appID found. Either > launch the game from Steam, or put the file steam_appid.txt containing the > correct appID in your game folder. --------------- > 3. run dota2 in steam > Did you run it *from* Steam? Yes,run Steam,then launch the game. with debug build of Mesa I can see: GL_INVALID_OPERATION in unsupported function called (unsupported extension or deprecated function?) these come from some togl call in libtogl.so. (forgot to add that the errors might be unrelated to the crash though) DOTA2 seems to crash if "low" textures option is used. If the issue is that, you need to remove saved DOTA2 config file, to restore defaults. (In reply to comment #8) > DOTA2 seems to crash if "low" textures option is used. If the issue is > that, you need to remove saved DOTA2 config file, to restore defaults. Removed the saved DOTA2 config file,then the problem still existence. (dota2 cfg:/root/.steam/steam/SteamApps/common/dota\ 2\ beta/dota/cfg/config.cfg) (In reply to comment #5) > > 3. run dota2 in steam > > Did you run it *from* Steam? > Yes,run Steam,then launch the game. I didn't mean whether Steam was running before launching the game, but did you launch the game from the Steam UI, or e.g. from command line? (In reply to comment #10) > (In reply to comment #5) > > 3. run dota2 in steam > > Did you run it *from* > Steam? > Yes,run Steam,then launch the game. I didn't mean whether Steam > was running before launching the game, but did you launch the game from the > Steam UI, or e.g. from command line? Yes,launch the game from the Steam UI and command line,Have tried,but the problem still existencet. Keeps consistently crashing for me as well. The backtrace I'm getting is from the game binaries (no symbols). On which HW and OS this happens? Tapani's crash is with Fedora on IVB, but DOTA2 runs for me fine on Ubuntu 13.10 on HSW (GT3e). In Tapani's case DOTA2 doesn't crash immediately after clicking ”DAVION,THE DRAGON KNIGHT”, it takes quite a long loading things and increasing its memory usage until its virtual memory usage reaches ~2.5 GB (according to top), at which point it crashes. Zhou, does the same happen in your case? DOTA2 is 32-bit application. On my case DOTA2 uses 2.9 GB of RAM, after loading the tutorial has finished. No problems. 32-bit applications should be able to map 3GB of virtual memory (or 4GB depending on kernel config). However, this can be limited with "ulimit". In my case, I get: $ ulimit -a|grep memory max locked memory (kbytes, -l) 64 max memory size (kbytes, -m) unlimited virtual memory (kbytes, -v) unlimited What about your setups? (In reply to comment #13) > On which HW and OS this happens? DOTA2 crashes with Fedora/Ubuntu on IVB/HSW. My steps: 1.xinit& 2.gnome-session 3. lanuch steam->run dota2 in steam->Click “PLAY”->Click ”DAVION,THE DRAGON KNIGHT”->crashes. >In Tapani's case > DOTA2 doesn't crash immediately after clicking ”DAVION,THE DRAGON KNIGHT”, > it takes quite a long loading things and increasing its memory usage until > its virtual memory usage reaches ~2.5 GB (according to top), at which point > it crashes. Zhou, does the same happen in your case? Yes,it's the same as my side. Dota2 on Steam can works in Win8 on IVB,BTW,Win8 driver:9.18.10.3272 Someone interested in looking into this should probably check out trying variations on drm_intel_bufmgr_gem_set_vma_cache_size(intel->bufmgr, 512); immediately after setting up the bufmgr. (on i386-only; amd64 doesn't have this address space problem of course) (In reply to comment #16) Hi, do you mean set "drm_intel_bufmgr_gem_set_vma_cache_size" in mesa? Could you give us a patch for that? Created attachment 96144 [details] [review] Use drm_intel_bufmgr_gem_set_vma_cache_size() after initializing intel buffer manager zhoujian: you can try Eric's suggestion with this patch The problem also exists on 2014Q1 release testing. (In reply to comment #18) > Created attachment 96144 [details] [review] [review] > Use drm_intel_bufmgr_gem_set_vma_cache_size() after initializing intel > buffer manager > > zhoujian: you can try Eric's suggestion with this patch With above the patch, the problem also exist. On Mesa-10.2-rc2 testing, follow zhoujian's test steps, Dota 2 still crashes on HSW, and the issue also appear on BDW. Test both on Fedora & Ubuntu. Does it still crash on 10.2.1? (In reply to comment #22) Yes,the problem still exists on 10.2.1. The issue also exists on mesa-10.2.2. With latest Mesa, DOTA2 is crashing also for me on HSW (GT3e) after starting DOTA2 Tutorial. Toggling overlay off doesn't help, nor does changing graphics options from maximum to minimum. While this could be related to bug 82759, DOTA2 works for Tapani with latest Mesa so I think it unlikely. With Mesa v10.1 in Ubuntu 14.04, DOTA2 works fine (both from Steam & and command line), so my DOTA2 install itself is in working condition. Gdb doesn't show anything useful. Program counter points to zeroed memory (clearly invalid for code), and addresses in backtrace aren't addressible i.e. program seems to have jumped to invalid/wrong address and either that had corrupted the stack (as return address there is invalid), or stack corruption caused jump to wrong place. DOTA2 takes too much memory that I could run any of the memory debuggers (valgrind, duma). Building Mesa with GCC -fstack-protector-all option didn't help to catch the corruption earlier, DOTA2 still crashes in same place. After wasting few hours trying to find good commit for bisecting, testing Ubuntu package's patches on top of 10.1.3 tag and finally configure options, I found what allows DOTA2 to run without crashes. It's the "--enable-glx-tls" configure option (which is disabled by default in Mesa). Mengmeng and Zhoujian, does adding that option to Mesa build get rid of also your DOTA2 crashes? (In reply to comment #26) > Building Mesa with GCC -fstack-protector-all option didn't help to catch the > corruption earlier, DOTA2 still crashes in same place. > > After wasting few hours trying to find good commit for bisecting, testing > Ubuntu package's patches on top of 10.1.3 tag and finally configure options, > I found what allows DOTA2 to run without crashes. It's the > "--enable-glx-tls" configure option (which is disabled by default in Mesa). > > Mengmeng and Zhoujian, does adding that option to Mesa build get rid of also > your DOTA2 crashes? I am using '--enable-glx-tls' when I configure Mesa, otherwise there are missing symbols when running apps. (In reply to comment #26) > Building Mesa with GCC -fstack-protector-all option didn't help to catch the > corruption earlier, DOTA2 still crashes in same place. > > After wasting few hours trying to find good commit for bisecting, testing > Ubuntu package's patches on top of 10.1.3 tag and finally configure options, > I found what allows DOTA2 to run without crashes. It's the > "--enable-glx-tls" configure option (which is disabled by default in Mesa). > > Mengmeng and Zhoujian, does adding that option to Mesa build get rid of also > your DOTA2 crashes? DOTA2 will not crash after adding the option"--enable-glx-tls", but if I missed the precise click against the steam menus, I will never be able to click the steam menus again, which means I only can operate the steam menus via first menu precise click. > I am using '--enable-glx-tls' when I configure Mesa, otherwise there are
> missing symbols when running apps.
Tapani, with what applications you get problems and with what symbols?
(I haven't seen this problem)
I'm also using --enable-shared-glapi, in case that matters.
Zhoujian, what about you?
When looking at the Mesa code, '--enable-glx-tls' affects to where GLX pointer is stored, and to generation of GL function asm entry points.
(In reply to comment #29) > > I'm also using --enable-shared-glapi, in case that matters. > Zhoujian, what about you? Yes,I'm also using the option "--enable-shared-glapi". (In reply to comment #29) > > I am using '--enable-glx-tls' when I configure Mesa, otherwise there are > > missing symbols when running apps. > > Tapani, with what applications you get problems and with what symbols? > (I haven't seen this problem) I'm missing the dispatch for GL funcs, nowadays only `_glapi_tls_Dispatch' (IIRC used to be a few more funcs some months ago), a lot of apps affected including my own test cases (I guess anything with threads?). > I'm also using --enable-shared-glapi, in case that matters. I'm not using that one. I'm not convinced there is a bug, Mesa used here was just misconfigured. There is documentation about how the dispatch works here (which touches the tls topic): http://www.mesa3d.org/dispatch.html (In reply to comment #32) > I'm not convinced there is a bug, Mesa used here was just misconfigured. > > There is documentation about how the dispatch works here (which touches the > tls topic): http://www.mesa3d.org/dispatch.html E.g. pixman configure.ac seems to automatically detect & enable TLS when compiler supports it. Is there some reason why Mesa couldn't or shouldn't do the same? (In reply to Eero Tamminen from comment #33) > (In reply to comment #32) > > I'm not convinced there is a bug, Mesa used here was just misconfigured. > > > > There is documentation about how the dispatch works here (which touches the > > tls topic): http://www.mesa3d.org/dispatch.html > > E.g. pixman configure.ac seems to automatically detect & enable TLS when > compiler supports it. Is there some reason why Mesa couldn't or shouldn't > do the same? Ian? DOTA2 is nowadays 64-bit and "--enable-glx-tls" is enabled by default by commit b83153e77b08ac82160f6281424878abacd97e31, so issue shouldn't anymore happen (Vulkan & GL versions of DOTA2 work fine for me). I'm not sure what resolution is appropriate, so I just set this as FIXED. |
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.