Skip to contentSkip to conversation

New: piglit glean/vertProg1 core dumps with RV790

Bug 27141 [email protected] 1 participant 8 messages Mar 17, 2010 – Sep 11, 2012

lore
Share & tools
lore
#0 lore raw

http://bugs.freedesktop.org/show_bug.cgi?id=27141

Summary: piglit glean/vertProg1 core dumps with RV790
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: major
Priority: medium
Component: Drivers/DRI/R600
AssignedTo: [email protected]
ReportedBy: [email protected]

The vertProg1 test core dumps because ctx->DrawBuffer is NULL in the radeonFlush() function:

Core was generated by `bin/glean -r foo -t vertProg1'.
Program terminated with signal 11, Segmentation fault.
#0 0x00007f7f4f7ed36a in radeonFlush (ctx=0x1cd9b30) at radeon_common.c:1129
1129 if ((ctx->DrawBuffer->Name == 0) && radeon->front_buffer_dirty)
{
Missing separate debuginfos, use: debuginfo-install expat-2.0.1-8.fc12.x86_64 glibc-2.11.1-1.x86_64 libICE-1.0.6-1.fc12.x86_64 libSM-1.1.0-7.fc12.x86_64 libX11-1.3-1.fc12.x86_64 libXau-1.0.5-1.fc12.x86_64 libXdamage-1.1.2-1.fc12.x86_64 libXext-1.1-2.fc12.x86_64 libXfixes-4.0.4-1.fc12.x86_64 libXi-1.3-2.fc12.x86_64 libXmu-1.0.5-1.fc12.x86_64 libXt-1.0.7-1.fc12.x86_64 libXxf86vm-1.1.0-1.fc12.x86_64 libdrm-2.4.18-0.1.fc12.x86_64 libgcc-4.4.3-4.fc12.x86_64 libjpeg-6b-46.fc12.x86_64 libstdc++-4.4.3-4.fc12.x86_64 libtiff-3.9.2-3.fc12.x86_64 libuuid-2.16.2-7.fc12.x86_64 libxcb-1.5-1.fc12.x86_64 zlib-1.2.3-23.fc12.x86_64 (gdb) print ctx
$1 = (GLcontext *) 0x1cd9b30
(gdb) print ctx->DrawBuffer
$2 = (GLframebuffer *) 0x0

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#1 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

http://bugs.freedesktop.org/show_bug.cgi?id=27141

--- Comment #1 from Chris Rankin <[email protected]> 2010-03-17 15:46:41 PST --- This same bug seems to be triggered by "bin/vp-bad-program -auto".

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#2 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

http://bugs.freedesktop.org/show_bug.cgi?id=27141

--- Comment #2 from Chris Rankin <[email protected]> 2010-03-18 07:47:02 PST --- The problem happens when destroying the GLContext:

- we call _mesa_free_context_data(), which sets ctx->DrawBuffer = NULL
- _mesa_free_context_data() then calls _mesa_free_texture_data()
- _mesa_free_texture_data() calls r600DeleteTexture()
- r600DeleteTexture() calls radeonFlush() via radeon_firevertices()
- radeonFlush() tries to dereference ctx->DrawBuffer, which has just been set to NULL
- BANG!

Adding a simple (ctx->DrawBuffer != NULL) check to radeonFlush() makes 43 of the vertProg1 piglit tests pass, with 2 failures:

Program: RSQ test 2 (reciprocal square root of negative value) Expected color: -1, 0.1, 0.447, 1
Observed color: 0, 0, 0, 0

Program: LIT test 2 (degenerate case: 0 ^ 0 -> 1) Expected color: 1, 0.65, 1, 1
Observed color: 1, 0.65098, 0, 1

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#3 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

http://bugs.freedesktop.org/show_bug.cgi?id=27141

--- Comment #3 from Pauli <[email protected]> 2010-03-18 12:28:50 PST --- Patches are welcome :)

You can send the fix to [email protected]. git commands format-patch and send-email are very easy tools to send patches to the mailing list.

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#4 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

http://bugs.freedesktop.org/show_bug.cgi?id=27141

--- Comment #4 from Chris Rankin <[email protected]> 2010-03-18 12:38:07 PST --- (In reply to comment #3)

Quoted 1 line

Patches are welcome :)

Actually, I would describe this as "the cause" rather than "the fix". I was hoping that someone who understands what the code *should* be doing would step in at this point. Maybe Mesa shouldn't be calling radeonFlush() in the first place here? Or maybe ctx->DrawBuffer shouldn't be unreferenced so early in the clean-up sequence? I have no intention of papering over this bug with an off-hand NULL check at this stage.

Signature · 11 lines
Configure bugmail: http://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
--
#5 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=27141

--- Comment #5 from Henri Verbeet <[email protected]> 2010-07-16 05:20:15 PDT --- I think this may have been fixed by fef9b532cd1631cc53056b9eba4369d1310b88df. For reference, the bug that patch fixes happens when a context is destroyed that's not the current context. For example because the current context has already been set to NULL.

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#6 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=27141

Dmitry Dzhus <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------
CC| |[email protected]

--- Comment #6 from Dmitry Dzhus <[email protected]> 2010-07-19 01:09:35 PDT --- *** Bug 28260 has been marked as a duplicate of this bug. ***

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
#7 lore raw

[Bug 27141] piglit glean/vertProg1 core dumps with RV790

In reply to [email protected]

https://bugs.freedesktop.org/show_bug.cgi?id=27141

Andreas Boll <[email protected]> changed:

What |Removed |Added
----------------------------------------------------------------------------

             Status|NEW                         |RESOLVED
         Resolution|                            |WORKSFORME

--- Comment #7 from Andreas Boll <[email protected]> 2012-09-11 11:07:28 UTC ---
Note: classic r600 driver has been abandoned.

all glean/vertProg1 tests pass with r600g (gallium driver) on my rv770 tested with mesa git master e81ee67b51651e99e7e8e52c1ccafc66835d57cd and mesa 8.0.4

Signature · 3 lines
Configure bugmail: https://bugs.freedesktop.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.