Skip to contentSkip to conversation

New: opengl apps crash at run

Bug 54057 [email protected] 1 participant 11 messages Aug 25, 2012 – Aug 28, 2012

lore
Share & tools
lore
#0 lore raw

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

Bug #: 54057
Summary: opengl apps crash at run
Classification: Unclassified
Product: Mesa
Version: git
Platform: x86-64 (AMD64)
OS/Version: Linux (All)
Status: NEW
Severity: critical
Priority: medium
Component: Drivers/Gallium/r300
AssignedTo: [email protected]
ReportedBy: [email protected]

Created attachment 66111
--> https://bugs.freedesktop.org/attachment.cgi?id=66111
xorg.log

Hardware : radeon 9600 agp
using mesa-git xorg-server-git pixman-git xf86-video-ati-git

Quoted 1 line

From few days I segfault when I run opengl app.

here is what valgrind says when run glxgears:

Running synchronized to the vertical refresh. The framerate should be approximately the same as the monitor refresh rate. ==16783== Warning: set address range perms: large range [0x394c9040, 0x594c9040) (undefined)
==16783== Invalid write of size 8
==16783== at 0x7D5DF2A: memory_pool_malloc (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5824D: rc_alloc_instruction (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D6C1DF: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D6CD8B: rc_emulate_loops (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D56E9D: rc_run_compiler_passes (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D56F46: rc_run_compiler (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D675AF: r3xx_compile_fragment_program (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5E6D9: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5F7E6: r300_pick_fragment_shader (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D51AF7: r300_update_derived_state (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D489B9: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7F7EE9A: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== Address 0x0 is not stack'd, malloc'd or (recently) free'd ==16783==
==16783==
==16783== Process terminating with default action of signal 11 (SIGSEGV) ==16783== Access not within mapped region at address 0x0
==16783== at 0x7D5DF2A: memory_pool_malloc (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5824D: rc_alloc_instruction (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D6C1DF: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D6CD8B: rc_emulate_loops (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D56E9D: rc_run_compiler_passes (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D56F46: rc_run_compiler (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D675AF: r3xx_compile_fragment_program (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5E6D9: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D5F7E6: r300_pick_fragment_shader (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D51AF7: r300_update_derived_state (in
/usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7D489B9: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)
==16783== by 0x7F7EE9A: ??? (in /usr/lib/xorg/modules/dri/r300_dri.so)

==16783==  If you believe this happened as a result of a stack
==16783==  overflow in your program's main thread (unlikely but
==16783==  possible), you can try to increase the size of the
==16783==  main thread stack using the --main-stacksize= flag.
==16783==  The main thread stack size used in this run was 8388608.

==16783==
==16783== HEAP SUMMARY:
==16783== in use at exit: 1,075,765,942 bytes in 2,709 blocks
==16783== total heap usage: 16,262 allocs, 13,553 frees, 1,078,507,740 bytes
allocated
==16783==
==16783== LEAK SUMMARY:
==16783== definitely lost: 1,136 bytes in 2 blocks
==16783== indirectly lost: 144 bytes in 2 blocks
==16783== possibly lost: 76,237 bytes in 1,069 blocks
==16783== still reachable: 1,075,688,425 bytes in 1,636 blocks
==16783== suppressed: 0 bytes in 0 blocks
==16783== Rerun with --leak-check=full to see details of leaked memory ==16783==
==16783== For counts of detected and suppressed errors, rerun with: -v ==16783== ERROR SUMMARY: 1 errors from 1 contexts (suppressed: 2 from 2) Memory protection fault

aslo I add my xorg.log

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.
#1 lore raw

[Bug 54057] opengl apps crash at run

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

--- Comment #1 from Tomasz P. <[email protected]> 2012-08-25 17:11:36 UTC --- opera with HW enabled crash:

TGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]

TGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]
opera [crash logging]: CRASH!!

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.
#2 lore raw

[Bug 54057] opengl apps crash at run

In reply to [email protected]

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

--- Comment #2 from Tomasz P. <[email protected]> 2012-08-25 17:12:25 UTC --- kwin logs:

TGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]

TGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_QUERY_COUNTER_BITS)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_VERTEX_UNITS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PALETTE_MATRICES_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_COLOR_MATRIX_STACK_DEPTH)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_MATRIX_PALETTE_STACK_DEPTH_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ENV_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_TEMPORARIES_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ATTRIBS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ADDRESS_REGISTERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_ADDRESS_REGISTERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ENV_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_LOCAL_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ALU_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_TEX_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_TEX_INDIRECTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_TEMPORARIES_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_ATTRIBS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_ALU_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_TEX_INSTRUCTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_TEX_INDIRECTIONS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_TEMPORARIES_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_PARAMETERS_ARB)
Mesa: User error: GL_INVALID_ENUM in glGetIntegerv(pname=GL_MAX_PROGRAM_NATIVE_ATTRIBS_ARB)

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.
#3 lore raw

[Bug 54057] opengl apps crash at run

In reply to [email protected]

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

--- Comment #3 from Tomasz P. <[email protected]> 2012-08-25 17:15:10 UTC --- gwenview with opengl animation on, the log was very long but I spotted this:

TTGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]

TGSI asm error: Expected `}' [13 : 51]

TGSI asm error: Syntax error [13 : 51]
Mesa: User error: GL_INVALID_ENUM in glGetBooleanv(pname=GL_FRAMEBUFFER_SRGB_CAPABLE_EXT)

hope this help to resolve...

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.
#4 lore raw

[Bug 54057] opengl apps crash at run

In reply to [email protected]

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

Andy Furniss <[email protected]> changed:

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

  Attachment #66111|application/octet-stream    |text/plain
          mime type|                            |
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.
#5 lore raw

[Bug 54057] opengl apps crash at run

In reply to [email protected]

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

--- Comment #4 from Andy Furniss <[email protected]> 2012-08-27 14:20:43 UTC --- (In reply to comment #0)

Quoted 6 lines

Created attachment 66111 [details]
xorg.log

Hardware : radeon 9600 agp
using mesa-git xorg-server-git pixman-git xf86-video-ati-git From few days I segfault when I run opengl app.

I have a box with a 9600 agp in so tested, but I am pure 32bit and using llvm 3.0.

Current ddx and mesa git worked Ok with Xorg git from June.

I built current Xorg git Today and haven't managed to get dri to work at all yet.

I don't segfault because I get permission denied when trying to run anything.

bash-3.2$ LIBGL_DEBUG=verbose glxinfo >/dev/null
libGL: OpenDriver: trying /home/andy/Src/Xorg-git/modular/lib/dri/r300_dri.so libGL error: failed to open drm device: Permission denied
libGL error: failed to load driver: r300
libGL: OpenDriver: trying /home/andy/Src/Xorg-git/modular/lib/dri/swrast_dri.so

My xorg log looks like AIGLX has loaded r300 OK, but I can't run anything indirect either -
bash-3.2$ LIBGL_ALWAYS_INDIRECT=1 LIBGL_DEBUG=verbose glxinfo >/dev/null X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext) Serial number of failed request: 17
Current serial number in output stream: 18

I may be seeing something totally different from you (what do you get with those commands)?

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 54057] opengl apps crash at run

In reply to [email protected]

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

--- Comment #5 from Tomasz P. <[email protected]> 2012-08-27 14:46:12 UTC --- here what I have got:
[root@fdgfdgd ~]# LIBGL_DEBUG=verbose glxinfo >/dev/null
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/r300_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/r300_dri.so
r300: DRM version: 2.17.0, Name: ATI RV350, ID: 0x4150, GB: 1, Z: 1
r300: GART size: 125 MB, VRAM size: 128 MB
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO
r300: DRM version: 2.17.0, Name: ATI RV350, ID: 0x4150, GB: 1, Z: 1
r300: GART size: 125 MB, VRAM size: 128 MB
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO [root@fdgfdgd ~]# LIBGL_ALWAYS_INDIRECT=1 LIBGL_DEBUG=verbose glxinfo

Quoted 1 line

/dev/null

X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext) Serial number of failed request: 15
Current serial number in output stream: 18
[root@tomek-pc ~]#

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 54057] opengl apps crash at run

In reply to [email protected]

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

--- Comment #6 from Andy Furniss <[email protected]> 2012-08-27 15:44:42 UTC --- (In reply to comment #5)

Quoted 10 lines

here what I have got:
[root@fdgfdgd ~]# LIBGL_DEBUG=verbose glxinfo >/dev/null
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/tls/r300_dri.so
libGL: OpenDriver: trying /usr/lib/xorg/modules/dri/r300_dri.so
r300: DRM version: 2.17.0, Name: ATI RV350, ID: 0x4150, GB: 1, Z: 1
r300: GART size: 125 MB, VRAM size: 128 MB
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO
r300: DRM version: 2.17.0, Name: ATI RV350, ID: 0x4150, GB: 1, Z: 1
r300: GART size: 125 MB, VRAM size: 128 MB
r300: AA compression RAM: YES, Z compression RAM: YES, HiZ RAM: NO

Running as root is cheating :-)

But I can get round my permission problem by doing it.

It seems to be working OK for me - no faults and valgrind is silent when running glxgears (claims 552 bytes lost on quit).

Maybe it is different llvm or 64 bit that is getting you, I also have more VRAM/GART - I am not a dev so don't have a clue really.

Quoted 8 lines

[root@fdgfdgd ~]# LIBGL_ALWAYS_INDIRECT=1 LIBGL_DEBUG=verbose glxinfo

Quoted 1 line

/dev/null

X Error of failed request: BadAlloc (insufficient resources for operation)
Major opcode of failed request: 153 (GLX)
Minor opcode of failed request: 3 (X_GLXCreateContext) Serial number of failed request: 15
Current serial number in output stream: 18
[root@tomek-pc ~]#

I don't know if this worked before on my r300 box as I don't normally test.

It works OK on my r600 box with Xorg from Feb + current ddx/mesa.

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.
#8 lore raw

[Bug 54057] r300g: opengl apps crash at run - possible build problem

In reply to [email protected]

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

Tom Stellard <[email protected]> changed:

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

            Summary|opengl apps crash at run    |r300g: opengl apps crash at
                   |                            |run - possible build
                   |                            |problem
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.
#9 lore raw

[Bug 54057] r300g: opengl apps crash at run - possible build problem

In reply to [email protected]

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

--- Comment #7 from Tom Stellard <[email protected]> 2012-08-28 01:05:04 UTC --- I can confirm that glxgears quickly uses all the system memory even with a clean clone from git on my RC410 laptop. The shaders it is trying to compile for glxgears look very strange and they have loops, which is not normal. My desktop machine with an RV515 is fine. I think that maybe there are some stale libraries on my laptop that Mesa is linking against.

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.
#10 lore raw

[Bug 54057] r300g: opengl apps crash at run - possible build problem

In reply to [email protected]

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

Tom Stellard <[email protected]> changed:

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

             Status|NEW                         |RESOLVED
         Resolution|                            |NOTABUG

--- Comment #8 from Tom Stellard <[email protected]> 2012-08-28 03:07:06 UTC --- The problem was that I had MLAA enabled in .drirc. Deleting my .drirc fixes the issue.

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.