Bug 75361 - freeze in Mass Effect 3 (wine)
Summary: freeze in Mass Effect 3 (wine)
Status: RESOLVED DUPLICATE of bug 75276
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/radeonsi (show other bugs)
Version: git
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 75276
Blocks:
  Show dependency treegraph
 
Reported: 2014-02-22 10:19 UTC by wdr
Modified: 2014-05-24 05:38 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
R600_DEBUG=fs,vs,gs,ps,cs dump (878.89 KB, application/x-tar)
2014-02-22 10:19 UTC, wdr
Details
dmesg (26.71 KB, text/plain)
2014-02-24 12:40 UTC, wdr
Details
Xorg.0.log (35.49 KB, text/plain)
2014-02-24 12:40 UTC, wdr
Details
glxinfo (57.09 KB, text/plain)
2014-02-24 12:41 UTC, wdr
Details
gdb backtrace (1.11 KB, text/plain)
2014-02-26 17:16 UTC, wdr
Details
dmesg wich errors (26.86 KB, text/plain)
2014-04-30 12:45 UTC, wdr
Details
mesa-git + llvm (si-spill-fixes-v3) + kernel 3.15-rc3 = gpu hung (25.93 KB, text/plain)
2014-04-30 14:17 UTC, wdr
Details
Dmesg (25.09 KB, text/plain)
2014-05-24 05:32 UTC, wdr
Details
R600_DEBUG=fs,vs,gs,ps,cs dump + si-spill-fixes-v4 (1.47 MB, application/x-tar)
2014-05-24 05:38 UTC, wdr
Details

Note You need to log in before you can comment on or make changes to this bug.
Description wdr 2014-02-22 10:19:14 UTC
Created attachment 94560 [details]
R600_DEBUG=fs,vs,gs,ps,cs dump

Kernel:3.13.1/3.14_rc2
libdrm:git (21 february)
mesa:git   (21 february)
llvm:svn   (21 february)
card: 01:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Pitcairn XT [Radeon HD 7870 GHz Edition]

R600_DEBUG=hyperz and R600_DEBUG=nohyperz no effect

Freeze in game. If use another video card (GF8800 on nouveau git) - work fine.

Need dump apitrace?

Let me know if you need further information.
Comment 1 wdr 2014-02-22 10:21:13 UTC
This my first bug. sorry attachment this tar.bz2 arhive

(sorry for my english)
Comment 2 Michel Dänzer 2014-02-24 05:59:32 UTC
Please attach /var/log/Xorg.0.log and the output of glxinfo and dmesg.

What exactly are the symptoms? What does 'Завершено' mean at the end of the attachment?

(In reply to comment #2)
> Need dump apitrace?

That might be useful.
Comment 3 wdr 2014-02-24 12:40:12 UTC
Created attachment 94650 [details]
dmesg
Comment 4 wdr 2014-02-24 12:40:58 UTC
Created attachment 94651 [details]
Xorg.0.log
Comment 5 wdr 2014-02-24 12:41:25 UTC
Created attachment 94652 [details]
glxinfo
Comment 6 wdr 2014-02-24 12:46:51 UTC
In game menu work. Freeze on load after menu. Ctrl+Alt+F1 and kill MassEffect - work. 

'Завершено' - 'Finished' - this output ok command kill MassEffect proccess (kill -9 "pid")
Comment 7 wdr 2014-02-24 16:34:21 UTC
apitrace dump (600Mb in tar.bz2 archive)
https://bft.usu.edu/xkb8y
Comment 8 Michel Dänzer 2014-02-25 07:26:20 UTC
(In reply to comment #7)
> apitrace dump (600Mb in tar.bz2 archive)

Does replaying this trace reproduce the problem on your system? It seems to play back fine without freeze here.

(In reply to comment #6)
> In game menu work. Freeze on load after menu. Ctrl+Alt+F1 and kill
> MassEffect - work. 

And the X session continues working fine after that? Does the MassEffect process hog the CPU during the freeze?
Comment 9 wdr 2014-02-25 17:41:59 UTC
apitrace replay freeze w at the end trace when obscure screen with ships and planet. Absolutely also as game.
100% reproducible
After kill game process - Xorg 100% working.
Comment 10 Michel Dänzer 2014-02-26 07:14:25 UTC
(In reply to comment #9)
> apitrace replay freeze w at the end trace when obscure screen with ships and
> planet. Absolutely also as game.

Hmm. I do see a little freeze at the end of the trace, but only for about three seconds, then it exits normally.


> After kill game process - Xorg 100% working.

So, does the freezing process hog the CPU?

If you don't kill the freezing process, does it remain frozen forever, or does it recover or fail somehow after a while?

Can you attach gdb to the freezing process and get a backtrace? Probably best to attempt this from ssh, but switching to console and doing it from there might be fine as well.


Does it still happen with current LLVM SVN and Mesa Git? What configure options do you use for building LLVM and Mesa?
Comment 11 wdr 2014-02-26 17:16:04 UTC
I'm use gentoo x11 overlay for git mesa:
[ebuild   R   #] media-libs/mesa-9999::x11  USE="debug egl gallium gbm gles2 llvm llvm-shared-libs nptl -bindist -classic -gles1 -opencl -openmax -openvg -osmesa -pax_kernel -pic -r600-llvm-compiler (-selinux) -vdpau -wayland -xa -xvmc" VIDEO_CARDS="radeon radeonsi (-freedreno) -i915 -i965 -ilo -intel -nouveau -r100 -r200 -r300 -r600 -vmware" 0 kB

./configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --disable-silent-rules --disable-dependency-tracking --enable-dri --enable-glx --enable-shared-glapi --enable-texture-float --enable-debug --enable-egl --enable-gbm --disable-gles1 --enable-gles2 --enable-glx-tls --disable-osmesa --enable-asm --enable-llvm-shared-libs --with-dri-drivers= --with-gallium-drivers=,swrast,radeonsi,r300,r600 PYTHON2=/usr/bin/python2.7 --with-egl-platforms=x11,drm --enable-gallium-llvm --disable-openvg --disable-gallium-egl --disable-omx --disable-r600-llvm-compiler --disable-vdpau --disable-xa --disable-xvmc

[ebuild   R   *] sys-devel/llvm-9999:0/9999  USE="debug libffi static-analyzer xml -clang -doc -gold -multitarget -ncurses -ocaml -python {-test} -udis86" PYTHON_TARGETS="python2_7 -pypy2_0 -python2_6" VIDEO_CARDS="radeon" 0 kB

/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --disable-timestamps --enable-keep-symbols --enable-shared --with-optimize-option= --disable-optimized --enable-assertions --enable-expensive-checks --disable-terminfo --enable-libffi ac_cv_prog_XML2CONFIG= --enable-targets=host,cpp,r600 --enable-bindings=none


If i do not kill the freezing process, it freeze forever. Cpu usage ~10%.
i am use latest mesa git and latest llvm from svn (26 february)
Comment 12 wdr 2014-02-26 17:16:44 UTC
Created attachment 94775 [details]
gdb backtrace
Comment 13 Michel Dänzer 2014-02-27 07:21:47 UTC
(In reply to comment #12)
> Created attachment 94775 [details]
> gdb backtrace

Unfortunately, this backtrace is useless because it doesn't show any symbol names.

It might be easier to do this with glretrace than with Wine.


(In reply to comment #11)
> --with-optimize-option= --disable-optimized --enable-expensive-checks

Does building LLVM without these options help, or maybe with --enable-optimized instead of them?
Comment 14 wdr 2014-02-27 16:32:40 UTC
I am build llvm with:
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/configure --prefix=/usr --build=i686-pc-linux-gnu --host=i686-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib --disable-timestamps --enable-keep-symbols --enable-shared --enable-optimized --enable-assertions --disable-terminfo --enable-libffi ac_cv_prog_XML2CONFIG= --enable-targets=host,cpp,r600 --enable-bindings=none

no effect

new apitrace trace (170 MB):
https://bft.usu.edu/3hkhw

glretrace -w -v /tmp/me3_new.trace > tmp/me3
28591: warning: unsupported glXSwapIntervalMESA call
28929: warning: unsupported glXSwapIntervalMESA call
54241: warning: unsupported glXSwapIntervalMESA call
54579: warning: unsupported glXSwapIntervalMESA call
79891: warning: unsupported glXSwapIntervalMESA call
80229: warning: unsupported glXSwapIntervalMESA call
118028: warning: unsupported glXSwapIntervalMESA call
118366: warning: unsupported glXSwapIntervalMESA call
118704: warning: unsupported glXSwapIntervalMESA call
119060: warning: unsupported glXSwapIntervalMESA call
158337: warning: unsupported glXSwapIntervalMESA call
158675: warning: unsupported glXSwapIntervalMESA call
apitrace: warning: caught signal 11
6523336: error: caught an unhandled exception
apitrace: info: taking default action for signal 11
Ошибка сегментирования

https://bft.usu.edu/bf8x6


it's correctly?
Comment 15 Michel Dänzer 2014-03-04 06:51:38 UTC
(In reply to comment #14)
> new apitrace trace (170 MB):
> https://bft.usu.edu/3hkhw

That runs into shader register allocation issues for me. Keep an eye on bug 75276, though right now the LLVM Git branch referenced there doesn't manage to replay your second apitrace yet.
Comment 16 wdr 2014-03-04 15:40:15 UTC
i am build llvm from http://cgit.freedesktop.org/~tstellar/llvm/log/?h=si-spill-fixes , and latest mesa-git

game also freeze. 

output:
/var/tmp/portage/sys-devel/llvm-9999/work/llvm-9999/lib/CodeGen/RegAllocGreedy.cpp:2096: unsigned int {anonymous}::RAGreedy::selectOrSplitImpl(llvm::LiveInterval&, llvm::SmallVectorImpl<unsigned int>&, {anonymous}::RAGreedy::SmallVirtRegSet&, unsigned int): Проверочное утверждение «NewVRegs.empty() && "Cannot append to existing NewVRegs"»

I like more help?
Comment 17 Tom Stellard 2014-04-17 19:29:40 UTC
Can you try this LLVM patch: https://bugs.freedesktop.org/attachment.cgi?id=97522
Make sure you have latest LLVM and Mesa from git.
Comment 18 Tom Stellard 2014-04-17 21:48:18 UTC
(In reply to comment #17)
> Can you try this LLVM patch:
> https://bugs.freedesktop.org/attachment.cgi?id=97522
> Make sure you have latest LLVM and Mesa from git.

That patch won't build try this instead:
https://bugs.freedesktop.org/attachment.cgi?id=97539
Comment 19 Michel Dänzer 2014-04-18 08:51:49 UTC
(In reply to comment #18)
> That patch won't build try this instead:
> https://bugs.freedesktop.org/attachment.cgi?id=97539

With that I get this from the apitrace referenced in comment #14:

LLVM triggered Diagnostic Handler: SIInstrInfo::storeRegToStackSlot - Can't spill VGPR!
glretrace: /home/daenzer/src/llvm-git/llvm/include/llvm/CodeGen/SlotIndexes.h:572: llvm::SlotIndex llvm::SlotIndexes::insertMachineInstrInMaps(llvm::MachineInstr*, bool): Assertion `mi2iMap.find(mi) == mi2iMap.end() && "Instr already indexed."' failed.
Comment 20 wdr 2014-04-19 07:59:22 UTC
with mesa-git and llvm-git  with/without patch game not start.

I'am find bad commit.
Comment 21 Tom Stellard 2014-04-28 20:52:50 UTC
Can you test this branch:

http://cgit.freedesktop.org/~tstellar/llvm/log/?h=si-spill-fixes-v2
Comment 22 Tom Stellard 2014-04-29 21:38:12 UTC
Updated v3 branch here:
http://cgit.freedesktop.org/~tstellar/llvm/log/?h=si-spill-fixes-v3
Comment 23 wdr 2014-04-30 12:44:15 UTC
mesa-git + llvm (si-spill-fixes-v3) + kernel 3.14 = gpu hung
Comment 24 wdr 2014-04-30 12:45:21 UTC
Created attachment 98238 [details]
dmesg wich errors
Comment 25 wdr 2014-04-30 14:17:12 UTC
Created attachment 98242 [details]
mesa-git + llvm (si-spill-fixes-v3) + kernel 3.15-rc3 = gpu hung
Comment 26 Tom Stellard 2014-05-16 19:29:51 UTC
Can you try this LLVM patch:

https://bugs.freedesktop.org/attachment.cgi?id=99169
Comment 27 Tom Stellard 2014-05-17 03:02:14 UTC

*** This bug has been marked as a duplicate of bug 75276 ***
Comment 28 wdr 2014-05-24 05:31:51 UTC
mesa-git + llvm-git (+0002-VER-5-emit-Error-when-attempting-to-spill-or-load-a-.patch) = no compile

mesa-git + llvm (si-spill-fixes-v4) + kernel 3.14.4 = gpu reset, xorg crash, ssh work
Comment 29 wdr 2014-05-24 05:32:56 UTC
Created attachment 99689 [details]
Dmesg
Comment 30 wdr 2014-05-24 05:38:02 UTC
Created attachment 99690 [details]
R600_DEBUG=fs,vs,gs,ps,cs dump   +  si-spill-fixes-v4


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.