Bug 29788 - Evergreen: xv leads to immediate segfault
Summary: Evergreen: xv leads to immediate segfault
Status: RESOLVED FIXED
Alias: None
Product: xorg
Classification: Unclassified
Component: Driver/Radeon (show other bugs)
Version: git
Hardware: x86-64 (AMD64) Linux (All)
: medium critical
Assignee: xf86-video-ati maintainers
QA Contact: Xorg Project Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-08-24 14:05 UTC by Matthew Cox
Modified: 2010-09-02 21:34 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
Backtrace of the crash (4.95 KB, text/plain)
2010-08-24 14:05 UTC, Matthew Cox
no flags Details
PATCH: Fix the segfault (1.53 KB, patch)
2010-08-24 14:23 UTC, Matthew Cox
no flags Details | Splinter Review
screenshot of mplayer -vo xv after commit 141cbc28.. (15.25 KB, image/png)
2010-08-29 16:55 UTC, Christian Authmann
no flags Details

Description Matthew Cox 2010-08-24 14:05:57 UTC
Created attachment 38130 [details]
Backtrace of the crash

I'm running Xorg server 1.9 with xf86-video-ati from git, specifically commit f170dddd3538a587f2363ef5fa10a4b484e762da of the evergreen_accel branch.

Attempting to start a client (mplayer) using Xv leads to immediate segfault of the X server.

I have attached a back trace. Only xf86-video-ati was built with debugging symbols; let me know if you require a backtrace with debugging symbols for additional packages.
Comment 1 Matthew Cox 2010-08-24 14:23:28 UTC
Created attachment 38131 [details] [review]
PATCH: Fix the segfault

I noticed that the segfault occurs between the initialization of the vs_const_conf structure. I moved the initialization of the variable which causes the segfault. This fixes the segfault, but the display is incorrect (mostly magenta with very little contrast, as if the red and blue channels have bloomed.)
Comment 2 Dave Witbrodt 2010-08-24 15:01:03 UTC
Hi Matt,

I'm getting GPU hangs on my HD 5750 even when my login manager (xdm) runs.  I see that you have gotten further than I did.  I lack some skills in the debugging area -- may I ask what technique you used to run the debugger in this case?  Was it on the same machine?  A different machine?  I'd like to get started on some reading and some practicing ASAP.

Thanks,
Dave W.
Comment 3 Alex Deucher 2010-08-24 15:02:52 UTC
fixed in 141cbc283fddeb67c2a6c47a0f0f5c2aa2bfb430
Comment 4 Christian Authmann 2010-08-29 16:54:01 UTC
reopening. The commit fixes the segfault, but xv is broken for me.

xv worked fine before this commit:
f170dddd3538a587f2363ef5fa10a4b484e762da evergreen: use vbo pool for constant buffers

That commit introduced the segfault, the next commit fixes it but leaves xv in a non-working state.

I'll attach a screenshot of a random video. There's usually one to three colored lines at the top, and a huge rectangle at the bottom in a different color. I suspect that the colours are parts from the video (based on the frequency of change and the colours I got with different videos).

Audio works, seeking works and the "picture" scales correctly when resizing the window or going fullscreen.

No messages appear in xorg.0.log, dmesg or mplayer's console output during video playback.

None of these things changed anything:
- switching to mesa software rendering (LIBGL_ALWAYS_SOFTWARE=1)
- RenderAccel "on" / "off" (although the latter is needed to take uncorrupted screenshots at the moment, will open another bug later)
- enabling or disabling kde 3's composition manager, kompmgr (xrender based)
- changing the window manager
- applying the patch attached by Matthew Cox

2.6.35-gentoo-r1 or -r6 on amd64 smp
X.Org X Server 1.7.7
HD 5770

Is there anything I can do to generate meaningful debug info?
Comment 5 Christian Authmann 2010-08-29 16:55:50 UTC
Created attachment 38272 [details]
screenshot of mplayer -vo xv after commit 141cbc28..
Comment 6 Matthew Cox 2010-08-29 17:08:32 UTC
I have the exact same image issue. I suspect that there's an issue with the geometry in the vertex shader.
Comment 7 Matthew Cox 2010-08-29 17:55:58 UTC
Review of attachment 38131 [details] [review]:

Please ignore this patch. It's incorrect.
Comment 8 Alex Deucher 2010-09-02 21:34:50 UTC
fixed in 7cc0d3311f23ad569af004e0e4a0e2efbac107e5


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.