Bug 64649 - Anomaly 2 (Steam) exits with divide by 0 in r600g
Summary: Anomaly 2 (Steam) exits with divide by 0 in r600g
Status: RESOLVED MOVED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r600 (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-15 20:44 UTC by romulasry
Modified: 2019-09-18 19:03 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
full steam logfile (2.59 KB, text/plain)
2013-05-18 02:24 UTC, romulasry
Details
Full GDB backtrace for Anomaly 2 (5.98 KB, text/plain)
2013-05-20 15:26 UTC, Kai
Details
Full GDB backtrace for git mesa Anomaly 2 (7.16 KB, text/x-log)
2013-05-24 00:35 UTC, romulasry
Details
Full GDB backtrace for git mesa Anomaly 2 (7.16 KB, text/plain)
2013-05-24 00:38 UTC, romulasry
Details
Full GDB backtrace for Anomaly 2 (2013-10-02) (6.10 KB, text/plain)
2013-10-01 15:38 UTC, Kai
Details

Description romulasry 2013-05-15 20:44:09 UTC
Game update: AppID 236730 "Anomaly 2", ProcID 7610, IP 0.0.0.0:0
ERROR: ld.so: object 'gameoverlayrenderer.so' from LD_PRELOAD cannot be preloaded: ignored.
GLX_EXT_swap_control not supported, unable to set vertical sync.
Comment 1 Michel Dänzer 2013-05-16 07:30:45 UTC
> GLX_EXT_swap_control not supported, unable to set vertical sync.

Are you sure the problem is directly related to this message? If it is, it's not a driver specific problem, as GLX_EXT_swap_control is not implemented at all yet in Mesa AFAICT.

First of all though, why do you say it 'crashes'? Is there any evidence of a crash that you didn't include?
Comment 2 romulasry 2013-05-16 19:20:28 UTC
It then closes. It won't run without that extention, switched to GLX instead of a driver specific component.
Comment 4 bartosz.brzostek 2013-05-17 09:52:11 UTC
The swap control extension is not required by the game to function. The exit must be caused by something else. What exactly happens? Does it look like graceful exit or a segfault? What kind of GPU are you using?
Comment 5 romulasry 2013-05-18 02:21:30 UTC
01:00.0 VGA compatible controller: Advanced Micro Devices [AMD] nee ATI RV770 [Radeon HD 4870]
Comment 6 romulasry 2013-05-18 02:24:42 UTC
Created attachment 79488 [details]
full steam logfile
Comment 7 romulasry 2013-05-18 02:26:28 UTC
(In reply to comment #4)
>Does it look like agraceful exit or a segfault?
No segfault so a graceful exit.
Comment 8 Kai 2013-05-20 13:15:22 UTC
Hm, doesn't really look graceful to me, I see:
> traps: Renderer[14746] trap divide error ip:f5eea6aa sp:f03fedd0 error:0 in r600_dri.so[f5b82000+585000]
in dmesg output (nothing else) and "Floating point exception" on the console where Steam is running.

Additional information:
Game crashes after intro, which I can watch.
Warning: my Mesa/DRM stack is not up-to-date and I can't update it immediately, but since others are seeing this crash too, maybe this helps to find the reason. I'll try to get a recent Mesa/libdrm stack up here soon.
Comment 9 Alex Deucher 2013-05-20 13:25:47 UTC
(In reply to comment #8)
> Hm, doesn't really look graceful to me, I see:
> > traps: Renderer[14746] trap divide error ip:f5eea6aa sp:f03fedd0 error:0 in r600_dri.so[f5b82000+585000]
> in dmesg output (nothing else) and "Floating point exception" on the console
> where Steam is running.

Can you get a proper backtrace with gdb?
Comment 10 Kai 2013-05-20 15:26:35 UTC
Created attachment 79573 [details]
Full GDB backtrace for Anomaly 2

Yes, took two attempts, but attaching GDB while the intro is playing works (GAME_DEBUGGER=gdb doesn't seem to work, though I think it should?). The interesting part seems to be (on first glance):
>copy_height=<error reading variable: Could not find type for DW_OP_GNU_const_type>

Again, just to make sure you don't search for a bug that is maybe no longer in r600g: I don't have the latest master for Mesa/libdrm, and it'll take me at least a few days, before I can get around to build a new version. Hency you might want to confirm the backtrace with somebody who runs master.
Comment 11 Jordan Justen 2013-05-20 17:07:00 UTC
(In reply to comment #2)
> It then closes. It won't run without that extention, switched to GLX instead
> of a driver specific component.

The game runs for me with i965 on gen7.
Comment 12 Mathias Anselmann 2013-05-20 20:43:08 UTC
Same problem here, game crashes after intro, which I can watch.
Dmesg output here is:

traps: Renderer[1375] trap divide error ip:f4fedce4 sp:f09fee30 error:0 in r600_dri.so[f4b61000+1512000]

I'm using mesa 9.1.2 and kernel 3.9.3 (up to date arch system).
Comment 13 romulasry 2013-05-20 23:04:05 UTC
(In reply to comment #12)
> Same problem here, game crashes after intro, which I can watch.
> Dmesg output here is:
> 
> traps: Renderer[1375] trap divide error ip:f4fedce4 sp:f09fee30 error:0 in
> r600_dri.so[f4b61000+1512000]
> 
> I'm using mesa 9.1.2 and kernel 3.9.3 (up to date arch system).

Same issue in git: traps: Renderer[7610] trap divide error ip:f5eb56ba sp:f07fedd0 error:0 in r600_dri.so[f5b3e000+5f5000
Comment 14 Kai 2013-05-21 18:02:44 UTC
(In reply to comment #11)
> (In reply to comment #2)
> > It then closes. It won't run without that extention, switched to GLX instead
> > of a driver specific component.
> 
> The game runs for me with i965 on gen7.

Very likely (see attachment 79573 [details]). The title is wrong, GLX_EXT_swap_control is only requested by the Steam overlay and non-critical. I can see the GLX_EXT_swap_control with any game I launch through Steam (e.g. Oil Rush) and the others work well. It's just Anomaly that is hitting a bug in r600g (or a bug in Anomaly which isn't handled gracefully by r600g?). Anyway, the title should be changed to something more accurate.
Comment 15 romulasry 2013-05-22 04:57:04 UTC
> Again, just to make sure you don't search for a bug that is maybe no longer
> in r600g: I don't have the latest master for Mesa/libdrm, and it'll take me
> at least a few days, before I can get around to build a new version. Hency
> you might want to confirm the backtrace with somebody who runs master.

I will the backtrace, could you give me the exact command you used?
Comment 16 Kai 2013-05-22 15:00:40 UTC
(In reply to comment #15)
> > Again, just to make sure you don't search for a bug that is maybe no longer
> > in r600g: I don't have the latest master for Mesa/libdrm, and it'll take me
> > at least a few days, before I can get around to build a new version. Hency
> > you might want to confirm the backtrace with somebody who runs master.
> 
> I will the backtrace, could you give me the exact command you used?

The command is
gdb "~/.local/share/Steam/SteamApps/common/Anomaly 2/Anomaly2Linux" [ProcID]
but that alone isn't enough. First you need to install the debugging symbols for Mesa and libc (the 32 bit versions!). Then you need to start Steam and Anomaly 2 through Steam. While the intro is playing you need to tab to a console, determine the process ID (with ps) and then replace [ProcID] in the command above. After gdb has attached itself to Anomaly 2, you will see the gdb prompt where you need to type c (or continue). After that, you can tab back to the game and wait until you hit the crash. Then you should be back to your desktop (and console windows). There you have to type in
bt full
and
info registers

You can exit gdb (and the attached Anomaly 2) by typing in q (or quit).

If you want to redirect the output of the above commands to a file, use
set logging file /path/to/log-file
set logging on
before you type c (or continue).


If you have trouble getting through all commands before the intro ends, you might want to prepare them beforehand.

I hope this helps.
Comment 17 romulasry 2013-05-24 00:35:14 UTC
Created attachment 79726 [details]
Full GDB backtrace for git mesa Anomaly 2
Comment 18 romulasry 2013-05-24 00:38:16 UTC
Created attachment 79727 [details]
Full GDB backtrace for git mesa Anomaly 2
Comment 19 Kai 2013-10-01 15:38:30 UTC
Created attachment 86915 [details]
Full GDB backtrace for Anomaly 2 (2013-10-02)

Still an issue with current Git HEAD on an X.org 1.14.2 (ie. with OpenGL 3.1 available).

The stack is:
Kernel: 3.11.2
libdrm: 2.4.46
Mesa: master/aac75f877da1d106f6fd7bbd238d1d1d35a0c8e8
X.Org: 1.14.2

Current dmesg output is:
> traps: Renderer[12757] trap divide error ip:f53c1896 sp:f0bfede0 error:0 in r600_dri.so[f4f06000+11a0000]
Comment 20 GitLab Migration User 2019-09-18 19:03:06 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/mesa/mesa/issues/438.


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.