Bug 42622 - [r300g] mupen64plus invalid command stream
Summary: [r300g] mupen64plus invalid command stream
Status: RESOLVED FIXED
Alias: None
Product: Mesa
Classification: Unclassified
Component: Drivers/Gallium/r300 (show other bugs)
Version: 7.11
Hardware: x86-64 (AMD64) Linux (All)
: medium normal
Assignee: Default DRI bug account
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-05 06:32 UTC by kowalski marcin
Modified: 2012-12-05 16:14 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
patch (1.52 KB, patch)
2011-12-18 21:43 UTC, Scott Moreau
Details | Splinter Review

Description kowalski marcin 2011-11-05 06:32:15 UTC
I've just built mupen64 plus emulator and it crashed after a few seconds (after emulator intro screen).

When running it, i get something like this :

Core: R4300: starting 64-bit dynamic recompiler at: 0xbc0200
radeon: The kernel rejected CS, see dmesg for more information.

inspecting dmesg gives this output:

[ 4250.120602] [drm:r100_cs_packet_next_reloc] *ERROR* No packet3 for relocation for packet at 1140.
[ 4250.120607] [drm] ib[1140]=0x000013C6
[ 4250.120609] [drm] ib[1141]=0x00000001
[ 4250.120611] [drm:r100_packet3_load_vbpntr] *ERROR* No reloc for packet3 47
[ 4250.120613] [drm] ib[1131]=0xC0052F00
[ 4250.120615] [drm] ib[1132]=0x00000003
[ 4250.120617] [drm] ib[1133]=0x0A020804
[ 4250.120618] [drm] ib[1134]=0x103A0980
[ 4250.120620] [drm] ib[1135]=0x00000000
[ 4250.120622] [drm] ib[1136]=0x00000A02
[ 4250.120623] [drm] ib[1137]=0x00000000
[ 4250.120625] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !


the same behavior is on current mesa git.

hardware is RV515 (x1300 pro) on 64bit system. 

i'd like to know if that's a program issue, or mesa bug?
Comment 1 Scott Moreau 2011-12-18 13:27:37 UTC
I am having the same issue with r300g on rv350 (Radeon 9600). m64+ segfaults with this output:

Core: Starting R4300 emulator: Dynamic Recompiler
radeon: The kernel rejected CS, see dmesg for more information.
Segmentation fault

The relevant portion from dmesg:

[ 5295.048418] [drm:r100_cs_packet_next_reloc] *ERROR* No packet3 for relocation for packet at 1044.
[ 5295.048425] [drm] ib[1044]=0x000013C6
[ 5295.048427] [drm] ib[1045]=0x00000001
[ 5295.048430] [drm:r100_packet3_load_vbpntr] *ERROR* No reloc for packet3 47
[ 5295.048433] [drm] ib[1037]=0xC0032F00
[ 5295.048436] [drm] ib[1038]=0x00000002
[ 5295.048438] [drm] ib[1039]=0x0A020804
[ 5295.048441] [drm] ib[1040]=0xC0213700
[ 5295.048443] [drm] ib[1041]=0x00000000
[ 5295.048446] [drm:radeon_cs_ioctl] *ERROR* Invalid command stream !

This happens with latest mesa git master.
Comment 2 Fabio Pedretti 2011-12-18 13:31:44 UTC
Which kernel version do you have?
Comment 3 Scott Moreau 2011-12-18 21:43:34 UTC
Created attachment 54566 [details] [review]
patch

I went ahead and bisected mesa. Here's what I came up with:

12fa91b6753dccbd3aa12c570d1f1e55c7dc0582 is the first bad commit
commit 12fa91b6753dccbd3aa12c570d1f1e55c7dc0582
Author: Thomas Hellstrom <thellstrom@vmware.com>
Date:   Mon Mar 7 11:24:43 2011 +0100

    st/mesa: Fix an incorrect user vertex buffer reference
    
    st->user_vb[attr] was always pointing to the same user vb, regardless
    of the value of attr. Together with reverting the temporary workaround
    for bug 34378, and a fix in the svga driver, this fixes googleearth on svga.
    
    Signed-off-by: Thomas Hellstrom <thellstrom@vmware.com>

:040000 040000 ca575588faeb8fe79c3d768ff28a7a808a64afac 2b9a78c9034e26ee411981d8d0cd06b72133beab M	src


The previous commit works. I've attached a patch that simply reverts the relevant bits.
Comment 4 Scott Moreau 2011-12-18 21:48:12 UTC
(In reply to comment #2)
> Which kernel version do you have?

I've tested on 2.6.38 and 3.0.0 both 32bit.
Comment 5 kowalski marcin 2012-03-19 02:54:21 UTC
the problem does not exist anymore on current mesa git and current stable kernel.
Comment 6 kowalski marcin 2012-03-19 02:56:24 UTC
i'll try this on another set of hardware soon to make sure. i might have been a bit hasty with that comment.


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.