Bug 99060

Summary: memory corruption after running INSIDE
Product: xorg Reporter: Grazvydas Ignotas <notasas>
Component: Server/GeneralAssignee: Xorg Project Team <xorg-team>
Status: RESOLVED MOVED QA Contact: Xorg Project Team <xorg-team>
Severity: normal    
Priority: medium CC: notasas, xorg-driver-ati
Version: git   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
valgrind output
none
Xorg.log none

Description Grazvydas Ignotas 2016-12-12 00:45:24 UTC
Created attachment 128422 [details]
valgrind output

There seems to be some memory corruption (use after free) after running windows version of INSIDE game demo through wine and Steam, which leads to random crashes. Crashes do not happen if I use modesetting_drv instead.

Valgrind output attached. I'm not entirely sure it's amdgpu's fault, as it only participates in some of the traces. I'm using my distro's version of Xorg (1.18.4-0ubuntu0.2), it would be bad if Ubuntu LTS is shipping broken Xorg, so I hope it's not that.
Comment 1 Grazvydas Ignotas 2016-12-12 00:46:13 UTC
Created attachment 128423 [details]
Xorg.log
Comment 2 Michel Dänzer 2016-12-12 02:36:46 UTC
Yeah, looks like an xserver present code issue, not a driver one, reassigning.

Please attach the output of valgrind with debugging symbols available for /usr/lib/xorg/Xorg (make sure the xserver-xorg-core-dbg package is installed).
Comment 3 Grazvydas Ignotas 2016-12-12 23:40:16 UTC
xserver-xorg-core-dbg is installed, but for some reason valgrind doesn't like those debug symbols (see it's complaints ant the beginning of the log).

I've tested this on iGPU with xf86-video-intel and it doesn't trigger the issue. As modesetting is also fine, it strongly suggests it's amdgpu that's somehow provoking it.

It looks like I'll have to live with modesetting for now...
Comment 4 Michel Dänzer 2016-12-13 09:23:08 UTC
(In reply to Grazvydas Ignotas from comment #3)
> xserver-xorg-core-dbg is installed, but for some reason valgrind doesn't
> like those debug symbols (see it's complaints ant the beginning of the log).

Looks like the xserver-xorg-core-dbg package is missing the debugging symbols for 
/usr/lib/xorg/Xorg.

Any chance you can build the xorg-server source package locally and replace /usr/lib/xorg/Xorg with the unstripped version from your build? It's hard to make sense of the valgrind output without line numbers for the Xorg entries.


> I've tested this on iGPU with xf86-video-intel and it doesn't trigger the
> issue.

Was DRI3 enabled when testing that as well?


> As modesetting is also fine, it strongly suggests it's amdgpu that's
> somehow provoking it.

valgrind doesn't complain either in that case?
Comment 5 Grazvydas Ignotas 2016-12-13 10:21:21 UTC
(In reply to Michel Dänzer from comment #4)
> 
> Any chance you can build the xorg-server source package locally and replace
> /usr/lib/xorg/Xorg with the unstripped version from your build? It's hard to
> make sense of the valgrind output without line numbers for the Xorg entries.

I'll try that after work.

> > I've tested this on iGPU with xf86-video-intel and it doesn't trigger the
> > issue.
> 
> Was DRI3 enabled when testing that as well?

Yes.

> > As modesetting is also fine, it strongly suggests it's amdgpu that's
> > somehow provoking it.
> 
> valgrind doesn't complain either in that case?

No, pretty much clean output.
Comment 6 Grazvydas Ignotas 2016-12-13 23:04:26 UTC
Today I'm no longer able to reproduce the issue.
I guess my GPU was in some bad state, as failed flips can be seen in Xorg.log from that day (see Comment 1), I think there were some VM faults in dmesg too.

Anyway it all works now, closing until I can reproduce this reliably again.
Comment 7 Michel Dänzer 2016-12-20 15:15:50 UTC
I was able to reproduce crashes like this by making the driver flip hook artificially return FALSE. I'll investigate more after the holidays if nobody beats me to it.
Comment 8 GitLab Migration User 2018-12-13 22:36:51 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/xorg/xserver/issues/511.

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.