Bug 6131 - exit in r200_texmem.c with Croquet
Summary: exit in r200_texmem.c with Croquet
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/DRI/r200 (show other bugs)
Version: 6.4
Hardware: Other Linux (All)
: high major
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-05 06:55 UTC by Santiago Gala
Modified: 2006-03-04 15:52 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
patch for crasher in Croquet (646 bytes, patch)
2006-03-05 06:58 UTC, Santiago Gala
Details | Splinter Review

Description Santiago Gala 2006-03-05 06:55:44 UTC
when using Croquet 0.3 (
http://www.opencroquet.org/Croquet_Technologies/downloads.html , extensive use
of OpenGL), I was seeing occasional exits with message DRM_RADEON_TEXTURE:
return = -11

if I change the exit(-1) by return, the app keeps working, with broken textures.
When I apply the patch I upload, changing

ret && errno == EAGAIN
by
ret == -EAGAIN
The problem disappears. Textures are loaded, no exit of the app.

I wonder where the bug is (it looks like thread safety of errno.

This code is also in r300 and radeon, so I guess if some form of the patch is
applied, it should be checked there too.
Comment 1 Santiago Gala 2006-03-05 06:58:38 UTC
Created attachment 4823 [details] [review]
patch for crasher in Croquet

Not sure why ret && errno == EAGAIN fails, but I'm getting this behaviour here.
Powerpc, 2.6.15 kernel, glibc 2.3.6, using PREEMPT_VOLUNTARY.
Comment 2 Roland Scheidegger 2006-03-05 10:52:13 UTC
This is fixed since some months in cvs, the reporter used squeak/croquet too, I
don't think there was a bug in bugzilla for it however. Looks like the fix
didn't make it to the mesa 6.4 stable branch though so it's not in xorg 6.9/7.0.
I'm going to fix that. The patch looks exactly like yours, btw (with the
exception that it still exits in case of error). The log message was:
revision 1.12
date: 2005-08-25 03:38:07 +0000;  author: anholt;  state: Exp;  lines: +1 -1
Attempt to fix the issue reported by Alan Grimes with DRM_RADEON_TEXTURE
erroring out when it shouldn't.  The errno could be changed by usleep() between
the ioctl call and the loop check, if a signal was received.  This could cause
an EAGAIN return from the DRM_RADEON_TEXTURE ioctl to not loop again.
Instead of checking errno, check thevalue of ret itself, since it is a saved
(and sign-flipped) copy of errno from the ioctl call.


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.