From: Mike A. H. <mh...@re...> - 2001-06-16 08:37:01
|
I just recently recieved this bug report from an Alpha user. Description of Problem: The problem manifests itself in Mesa but this is really g_render.c trouble so it belongs to X. Various programs from "Mesa-demos" are consistently getting on Alpha a number of "unaligned trap" errors. Like this: cubemap(16472): unaligned trap at 0000020000590334: 000002000002a03c 27 2 cubemap(16472): unaligned trap at 0000020000590344: 000002000002a044 27 3 cubemap(16472): unaligned trap at 0000020000590348: 000002000002a04c 27 4 cubemap(16472): unaligned trap at 0000020000590350: 000002000002a054 27 5 With Mesa-3.4.1 recompiled for debugging and run from a shell which forces SIGBUS, instead of a fixup, on an unaligned trap 'gdb' reveals this: Starting program: /usr/bin/gears Program received signal SIGBUS, Bus error. __indirect_glFrustum (left=-1, right=1, bottom=-1, top=1, zNear=5, zFar=60) at g_render.c:2523 2523 __GLX_PUT_DOUBLE(12,right); Starting program: /usr/bin/bounce Program received signal SIGBUS, Bus error. __indirect_glOrtho (left=-8.0000002384185791, right=8.0000002384185791, bottom=-6, top=6, zNear=-6, zFar=6) at g_render.c:2590 2590 __GLX_PUT_DOUBLE(12,right); Starting program: /usr/bin/gamma Program received signal SIGBUS, Bus error. __indirect_glOrtho (left=-1, right=1, bottom=-1, top=1, zNear=-1, zFar=1) at g_render.c:2590 2590 __GLX_PUT_DOUBLE(12,right); Starting program: /usr/bin/cubemap GL_REFLECTION_MAP_ARB mode keys: SPACE - toggle animation CURSOR KEYS - rotation m - toggle texgen reflection mode Program received signal SIGBUS, Bus error. __indirect_glFrustum (left=-2, right=2, bottom=-2, top=2, zNear=6, zFar=20) at g_render.c:2523 2523 __GLX_PUT_DOUBLE(12,right); This is a backtrace for 'bounce' #0 __indirect_glOrtho (left=-8.0000002384185791, right=8.0000002384185791, bottom=-6, top=6, zNear=-6, zFar=6) at g_render.c:2590 #1 0x20000412588 in glOrtho (left=-8.0000002384185791, right=8.0000002384185791, bottom=-6, top=6, nearval=-6, farval=6) at glapitemp.h:938 #2 0x120001a8c in reshape (width=5889, height=172080) at bounce.c:92 #3 0x200001409f8 in processWindowWorkList (window=0x120105170) at glut_event.c:1193 #4 0x20000140cc8 in __glutProcessWindowWorkLists () at glut_event.c:1328 #5 0x20000140d74 in glutMainLoop () at glut_event.c:1349 #6 0x120002240 in main (argc=1, argv=0x11ffff7b8) at bounce.c:218 and this is for 'cubemap'. #0 __indirect_glFrustum (left=-2, right=2, bottom=-2, top=2, zNear=6, zFar=20) at g_render.c:2523 #1 0x2000040fc08 in glFrustum (left=-2, right=2, bottom=-2, top=2, nearval=6, farval=20) at glapitemp.h:513 #2 0x1200017a8 in reshape (width=300, height=300) at cubemap.c:144 #3 0x200001409f8 in processWindowWorkList (window=0x120104b40) at glut_event.c:1193 #4 0x20000140cc8 in __glutProcessWindowWorkLists () at glut_event.c:1328 #5 0x20000140d74 in glutMainLoop () at glut_event.c:1349 #6 0x120001cfc in main (argc=5889, argv=0x2000002a030) at cubemap.c:248 And this is the code in question, from __indirect_glFrustum, after macros were expanded: *((INT16 *) (pc + 0 )) = 52 ; *((INT16 *) (pc + 2 )) = 175 ; *((FLOAT64 *) (pc + 4 )) = left ; *((FLOAT64 *) (pc + 12 )) = right ; *((FLOAT64 *) (pc + 20 )) = bottom ; *((FLOAT64 *) (pc + 28 )) = top ; *((FLOAT64 *) (pc + 36 )) = zNear ; *((FLOAT64 *) (pc + 44 )) = zFar ; Unaligned access can be silent elsewhere but it is a performance drag on any architecture. Michal mi...@ha... ---------------------------------------------------------------------- Mike A. Harris Shipping/mailing address: OS Systems Engineer 190 Pittsburgh Ave., Sault Ste. Marie, Red Hat Inc. Ontario, Canada, P6C 5B3 http://www.redhat.com Phone: (705)949-2136 ---------------------------------------------------------------------- Latest XFree86 test RPMS: ftp://people.redhat.com/mharris/testing |
From: Brian P. <br...@va...> - 2001-06-18 15:48:33
|
"Mike A. Harris" wrote: > > I just recently recieved this bug report from an Alpha user. > > Description of Problem: > > The problem manifests itself in Mesa but this is really g_render.c > trouble so it belongs to X. > > Various programs from "Mesa-demos" are consistently getting on Alpha > a number of "unaligned trap" errors. Like this: > > cubemap(16472): unaligned trap at 0000020000590334: 000002000002a03c 27 2 > cubemap(16472): unaligned trap at 0000020000590344: 000002000002a044 27 3 > cubemap(16472): unaligned trap at 0000020000590348: 000002000002a04c 27 4 > cubemap(16472): unaligned trap at 0000020000590350: 000002000002a054 27 5 > > With Mesa-3.4.1 recompiled for debugging and run from a shell which > forces SIGBUS, instead of a fixup, on an unaligned trap 'gdb' reveals > this: > > Starting program: /usr/bin/gears > > Program received signal SIGBUS, Bus error. > __indirect_glFrustum (left=-1, right=1, bottom=-1, top=1, zNear=5, zFar=60) > at g_render.c:2523 > 2523 __GLX_PUT_DOUBLE(12,right); > > Starting program: /usr/bin/bounce > > Program received signal SIGBUS, Bus error. > __indirect_glOrtho (left=-8.0000002384185791, right=8.0000002384185791, > bottom=-6, top=6, zNear=-6, zFar=6) at g_render.c:2590 > 2590 __GLX_PUT_DOUBLE(12,right); > > Starting program: /usr/bin/gamma > > Program received signal SIGBUS, Bus error. > __indirect_glOrtho (left=-1, right=1, bottom=-1, top=1, zNear=-1, zFar=1) > at g_render.c:2590 > 2590 __GLX_PUT_DOUBLE(12,right); > > Starting program: /usr/bin/cubemap > GL_REFLECTION_MAP_ARB mode > keys: > SPACE - toggle animation > CURSOR KEYS - rotation > m - toggle texgen reflection mode > > Program received signal SIGBUS, Bus error. > __indirect_glFrustum (left=-2, right=2, bottom=-2, top=2, zNear=6, zFar=20) > at g_render.c:2523 > 2523 __GLX_PUT_DOUBLE(12,right); > > This is a backtrace for 'bounce' > > #0 __indirect_glOrtho (left=-8.0000002384185791, right=8.0000002384185791, > bottom=-6, top=6, zNear=-6, zFar=6) at g_render.c:2590 > #1 0x20000412588 in glOrtho (left=-8.0000002384185791, > right=8.0000002384185791, bottom=-6, top=6, nearval=-6, farval=6) > at glapitemp.h:938 > #2 0x120001a8c in reshape (width=5889, height=172080) at bounce.c:92 > #3 0x200001409f8 in processWindowWorkList (window=0x120105170) > at glut_event.c:1193 > #4 0x20000140cc8 in __glutProcessWindowWorkLists () at glut_event.c:1328 > #5 0x20000140d74 in glutMainLoop () at glut_event.c:1349 > #6 0x120002240 in main (argc=1, argv=0x11ffff7b8) at bounce.c:218 > > and this is for 'cubemap'. > > #0 __indirect_glFrustum (left=-2, right=2, bottom=-2, top=2, zNear=6, > zFar=20) > at g_render.c:2523 > #1 0x2000040fc08 in glFrustum (left=-2, right=2, bottom=-2, top=2, > nearval=6, > farval=20) at glapitemp.h:513 > #2 0x1200017a8 in reshape (width=300, height=300) at cubemap.c:144 > #3 0x200001409f8 in processWindowWorkList (window=0x120104b40) > at glut_event.c:1193 > #4 0x20000140cc8 in __glutProcessWindowWorkLists () at glut_event.c:1328 > #5 0x20000140d74 in glutMainLoop () at glut_event.c:1349 > #6 0x120001cfc in main (argc=5889, argv=0x2000002a030) at cubemap.c:248 > > And this is the code in question, from __indirect_glFrustum, after macros > were expanded: > > *((INT16 *) (pc + 0 )) = 52 ; > *((INT16 *) (pc + 2 )) = 175 ; > *((FLOAT64 *) (pc + 4 )) = left ; > *((FLOAT64 *) (pc + 12 )) = right ; > *((FLOAT64 *) (pc + 20 )) = bottom ; > *((FLOAT64 *) (pc + 28 )) = top ; > *((FLOAT64 *) (pc + 36 )) = zNear ; > *((FLOAT64 *) (pc + 44 )) = zFar ; > > Unaligned access can be silent elsewhere but it is a performance drag on > any architecture. > > Michal > mi...@ha... > The preprocessor token __GLX_ALIGN64 should fix that. The __GLX_PUT_DOUBLE() macro is defined as follows: #ifdef __GLX_ALIGN64 /* ** This can certainly be done better for a particular machine ** architecture! */ #define __GLX_PUT_DOUBLE(offset,a) \ __GLX_MEM_COPY(pc + offset, &a, 8) #else #define __GLX_PUT_DOUBLE(offset,a) \ *((FLOAT64 *) (pc + offset)) = a #endif The following patch should fix this: Index: Imakefile =================================================================== RCS file: /cvsroot/dri/xc/xc/lib/GL/glx/Imakefile,v retrieving revision 1.10 diff -r1.10 Imakefile 89a90,92 > #if defined(AlphaArchitecture) > GLX_DEFS = GlxDefines -D__GLX_ALIGN64 > #else 90a94,95 > #endif > -Brian |
From: Mike A. H. <mh...@re...> - 2001-06-19 22:11:10
|
On Mon, 18 Jun 2001, Brian Paul wrote: >The preprocessor token __GLX_ALIGN64 should fix that. The >__GLX_PUT_DOUBLE() macro is defined as follows: > >#ifdef __GLX_ALIGN64 >/* >** This can certainly be done better for a particular machine >** architecture! >*/ >#define __GLX_PUT_DOUBLE(offset,a) \ > __GLX_MEM_COPY(pc + offset, &a, 8) >#else >#define __GLX_PUT_DOUBLE(offset,a) \ > *((FLOAT64 *) (pc + offset)) = a >#endif > > >The following patch should fix this: > >Index: Imakefile >=================================================================== >RCS file: /cvsroot/dri/xc/xc/lib/GL/glx/Imakefile,v >retrieving revision 1.10 >diff -r1.10 Imakefile >89a90,92 >> #if defined(AlphaArchitecture) >> GLX_DEFS = GlxDefines -D__GLX_ALIGN64 >> #else >90a94,95 >> #endif >> Thanks Brian, I'll apply it to my next build. TTYL ---------------------------------------------------------------------- Mike A. Harris Shipping/mailing address: OS Systems Engineer 190 Pittsburgh Ave., Sault Ste. Marie, Red Hat Inc. Ontario, Canada, P6C 5B3 http://www.redhat.com Phone: (705)949-2136 ---------------------------------------------------------------------- Latest XFree86 test RPMS: ftp://people.redhat.com/mharris/testing |