Skip to contentSkip to conversation

radeon_cs_gem.c:181: cs_gem_write_reloc: Assertion »boi->space_accounted« failed, core dumped

Radeon RV280 Jochen Rollwagen 2 participants 7 messages Jul 25, 2014 – Aug 1, 2014

lore
Share & tools
lore
#0 lore raw

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt. Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

I think the problem is the driver hasn't called
radeon_cs_space_add_persistent_bo.

Marek

Quoted 28 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

Quoted 4 lines

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#2 lore raw

I think i probably hit a regression in the mesa libraries since older versions of mesa used to work. I'll try to downgrade from 10.1.6 and see what happens.

Am 27.07.2014 um 14:47 schrieb Marek Olšák:

Quoted 38 lines

I think the problem is the driver hasn't called
radeon_cs_space_add_persistent_bo.

Marek

Quoted 32 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#3 lore raw
In reply to Marek Olšák

I've built the latest libdrm and replaced the assertion in radeon_cs_gem.c. with

if (!boi->space_accounted) return -EINVAL;

I now get the following crash in the cutscene:

CS section size missmatch start at (r200_state_init.c,ctx_emit_cs,487) 28 vs 24
CS section end at (r200_state_init.c,ctx_emit_cs,520)
CS section size missmatch start at (r200_state_init.c,tex_emit_mm,572) 13 vs 11
CS section end at (r200_state_init.c,tex_emit_mm,588)
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

dmesg output is:

[ 1232.744676] [drm:radeon_cs_packet_next_reloc] *ERROR* No packet3 for relocati
on for packet at 34.
[ 1232.744691] [drm] ib[34]=0x00000712
[ 1232.744694] [drm] ib[35]=0x00010340
[ 1232.744698] [drm:r200_packet0_check] *ERROR* No reloc for ib[33]=0x1C40
[ 1232.744701] [drm] ib[32]=0x00000710
[ 1232.744704] [drm] ib[33]=0x00000000
[ 1232.744707] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

So it's really a mesa bug :-(

Am 27.07.2014 um 14:47 schrieb Marek Olšák:

Quoted 38 lines

I think the problem is the driver hasn't called
radeon_cs_space_add_persistent_bo.

Marek

Quoted 32 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Not in this case. You added a fail path to a function which isn't supposed to fail under these circumstances. No wonder Mesa couldn't cope with it. It really has nothing to do with your original issue.

Marek

Quoted 30 lines · Jochen Rollwagen

I've built the latest libdrm and replaced the assertion in radeon_cs_gem.c. with

if (!boi->space_accounted) return -EINVAL;

I now get the following crash in the cutscene:

CS section size missmatch start at (r200_state_init.c,ctx_emit_cs,487) 28 vs 24
CS section end at (r200_state_init.c,ctx_emit_cs,520)
CS section size missmatch start at (r200_state_init.c,tex_emit_mm,572) 13 vs 11
CS section end at (r200_state_init.c,tex_emit_mm,588)
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

dmesg output is:

[ 1232.744676] [drm:radeon_cs_packet_next_reloc] *ERROR* No packet3 for
relocati
on for packet at 34.
[ 1232.744691] [drm] ib[34]=0x00000712
[ 1232.744694] [drm] ib[35]=0x00010340
[ 1232.744698] [drm:r200_packet0_check] *ERROR* No reloc for ib[33]=0x1C40
[ 1232.744701] [drm] ib[32]=0x00000710
[ 1232.744704] [drm] ib[33]=0x00000000
[ 1232.744707] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !
Quoted 51 lines

So it's really a mesa bug :-(

Am 27.07.2014 um 14:47 schrieb Marek Olšák:

Quoted 44 lines

I think the problem is the driver hasn't called

radeon_cs_space_add_persistent_bo.

Marek

Quoted 35 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from
git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb
RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#5 lore raw

Does the attached libdrm patch fix the issue for you?

Marek

Quoted 4 lines · Marek Olšák

Not in this case. You added a fail path to a function which isn't supposed to fail under these circumstances. No wonder Mesa couldn't cope with it. It really has nothing to do with your original issue.

Quoted 84 lines

Marek

Quoted 81 lines · Jochen Rollwagen

I've built the latest libdrm and replaced the assertion in radeon_cs_gem.c. with

if (!boi->space_accounted) return -EINVAL;

I now get the following crash in the cutscene:

CS section size missmatch start at (r200_state_init.c,ctx_emit_cs,487) 28 vs 24
CS section end at (r200_state_init.c,ctx_emit_cs,520)
CS section size missmatch start at (r200_state_init.c,tex_emit_mm,572) 13 vs 11
CS section end at (r200_state_init.c,tex_emit_mm,588)
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

dmesg output is:

[ 1232.744676] [drm:radeon_cs_packet_next_reloc] *ERROR* No packet3 for
relocati
on for packet at 34.
[ 1232.744691] [drm] ib[34]=0x00000712
[ 1232.744694] [drm] ib[35]=0x00010340
[ 1232.744698] [drm:r200_packet0_check] *ERROR* No reloc for ib[33]=0x1C40
[ 1232.744701] [drm] ib[32]=0x00000710
[ 1232.744704] [drm] ib[33]=0x00000000
[ 1232.744707] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

So it's really a mesa bug :-(

Am 27.07.2014 um 14:47 schrieb Marek Olšák:

Quoted 44 lines

I think the problem is the driver hasn't called

radeon_cs_space_add_persistent_bo.

Marek

Quoted 35 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from
git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb
RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

From a9410a10d2b0986b93d76d1e14c545d64c4e70bd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Marek=20Ol=C5=A1=C3=A1k?= <[email protected]>
Date: Fri, 1 Aug 2014 13:30:50 +0200
Subject: [PATCH] radeon: allow write_reloc with unaccounted buffers to cope
with Mesa bug

---
 radeon/radeon_cs_gem.c | 9 +++++++++
 1 file changed, 9 insertions(+)
radeon/radeon_cs_gem.c +9 -0
index b87c6b1..bcfa05b 100644
@@ -178,6 +178,15 @@ static int cs_gem_write_reloc(struct radeon_cs_int *cs,
     uint32_t idx;
     unsigned i;
 
+    if (!boi->space_accounted) {
+        struct radeon_cs *rcs = (struct radeon_cs*)cs;
+        int r;
+
+        radeon_cs_space_add_persistent_bo(rcs, bo, read_domain, write_domain);
+        r = radeon_cs_space_check(rcs);
+        if (r)
+            return r;
+    }
     assert(boi->space_accounted);
 
     /* check domains */
Signature · 1 line
1.9.1

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel

#6 lore raw

The patch does indeed fix the crashes. The cutscenes run through now without problems.

Thank you very much.

Am 01.08.2014 um 13:36 schrieb Marek Olšák:

Quoted 90 lines

Does the attached libdrm patch fix the issue for you?

Marek

Quoted 85 lines · Marek Olšák

Not in this case. You added a fail path to a function which isn't supposed to fail under these circumstances. No wonder Mesa couldn't cope with it. It really has nothing to do with your original issue.

Marek

Quoted 78 lines · Jochen Rollwagen

I've built the latest libdrm and replaced the assertion in radeon_cs_gem.c. with

if (!boi->space_accounted) return -EINVAL;

I now get the following crash in the cutscene:

CS section size missmatch start at (r200_state_init.c,ctx_emit_cs,487) 28 vs 24
CS section end at (r200_state_init.c,ctx_emit_cs,520)
CS section size missmatch start at (r200_state_init.c,tex_emit_mm,572) 13 vs 11
CS section end at (r200_state_init.c,tex_emit_mm,588)
drmRadeonCmdBuffer: -22. Kernel failed to parse or rejected command stream. See dmesg for more info.

dmesg output is:

[ 1232.744676] [drm:radeon_cs_packet_next_reloc] *ERROR* No packet3 for
relocati
on for packet at 34.
[ 1232.744691] [drm] ib[34]=0x00000712
[ 1232.744694] [drm] ib[35]=0x00010340
[ 1232.744698] [drm:r200_packet0_check] *ERROR* No reloc for ib[33]=0x1C40
[ 1232.744701] [drm] ib[32]=0x00000710
[ 1232.744704] [drm] ib[33]=0x00000000
[ 1232.744707] [drm:radeon_cs_ib_chunk] *ERROR* Invalid command stream !

So it's really a mesa bug :-(

Am 27.07.2014 um 14:47 schrieb Marek Olšák:

Quoted 42 lines

I think the problem is the driver hasn't called

radeon_cs_space_add_persistent_bo.

Marek

Quoted 34 lines · Jochen Rollwagen

I've recently ported the peopsxgl OpenGL-GPU-Plugin for the pcsx Playstation1 Emulator to the Powerpc-architecture. When running certain games (for instance "Vagrant Stories") during longer cut-scenes i get a reproducible crash of the radeon drm driver (i.e. it always crashes at certain points in the scene) with the following message (in german):

pcsx: radeon_cs_gem.c:181: cs_gem_write_reloc: Zusicherung »boi->space_accounted« nicht erfüllt.
Abgebrochen (Speicherabzug geschrieben)

This happens with all the latest 3.10, 3.12 and 3.14 kernels.

Other than that i'm running the latest xorg-ati driver, libdrm and mesa from
git on a Mac Mini G4 (PowerPC).

OpenGL vendor string: Mesa Project
OpenGL renderer string: Mesa DRI R200 (RV280 5962) TCL DRI2 OpenGL version string: 1.3 Mesa 10.1.6 (git-42f86ef)

I guess the issue is memory/vm/swap-related since the machine only has 1 gb
RAM. The GPU has 64 MB VRAM.

Any ideas what i could do to avoid these crashes ?

_______________________________________________
dri-devel mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/dri-devel