Summary: | 64 Bit mesa-6.4.2 crashes on Solaris 9 compiled with gcc 4.0.2 | ||
---|---|---|---|
Product: | Mesa | Reporter: | Roland Egger <spark74> |
Component: | Mesa core | Assignee: | mesa-dev |
Status: | RESOLVED WORKSFORME | QA Contact: | |
Severity: | critical | ||
Priority: | highest | ||
Version: | 6.4 | ||
Hardware: | SPARC | ||
OS: | Solaris | ||
Whiteboard: | |||
i915 platform: | i915 features: |
Description
Roland Egger
2006-04-04 00:16:19 UTC
I compiled 64 bit mesa now with gcc 3.4.2 from sunfreeware and it crashes, too but with other errors. ./gears One time I get an assertion: 146 frames in 5.007 seconds = 29.159 FPS Assertion failed: a[j].inputstride == vptr->stride, file tnl/t_vertex.c, line 382 Abort (core dumped) Loaded symbols for /usr/platform/SUNW,Sun-Blade-1500/lib/sparcv9/libc_psr.so.1 #0 0xffffffff7e4a8cbc in _libc_kill () from /usr/lib/64/libc.so.1 (gdb) bt #0 0xffffffff7e4a8cbc in _libc_kill () from /usr/lib/64/libc.so.1 #1 0xffffffff7e43e440 in abort () from /usr/lib/64/libc.so.1 #2 0xffffffff7e43e744 in _assert () from /usr/lib/64/libc.so.1 #3 0xffffffff7e9a0a30 in _tnl_build_vertices (ctx=0x100120df0, start=0, end=164, newinputs=2124021760) at tnl/t_vertex.c:382 #4 0xffffffff7e98e014 in run_render (ctx=0x100120df0, stage=0x100399598) at tnl/t_vb_render.c:295 #5 0xffffffff7e974728 in _tnl_run_pipeline (ctx=0x100120df0) at tnl/t_pipeline.c:158 #6 0xffffffff7e981ae4 in _tnl_playback_vertex_list (ctx=0x100120df0, data=0xf) at tnl/t_save_playback.c:209 #7 0xffffffff7e89edc4 in execute_list (ctx=0x100120df0, list=8063928) at main/dlist.c:5681 #8 0xffffffff7e89f814 in _mesa_CallList (list=4097) at main/dlist.c:6749 #9 0x0000000100002ec4 in draw () at gears.c:189 #10 0xffffffff7f023ba0 in processWindowWorkList (window=0x100110b40) at glut_event.c:1297 #11 0xffffffff7f023f88 in glutMainLoop () at glut_event.c:1344 #12 0x000000010000394c in main (argc=1, argv=0xffffffff7ffff0a8) at gears.c:379 (gdb) f 3 #3 0xffffffff7e9a0a30 in _tnl_build_vertices (ctx=0x100120df0, start=0, end=164, newinputs=2124021760) at tnl/t_vertex.c:382 382 assert(a[j].inputstride == vptr->stride); (gdb) print j No symbol "j" in current context. (gdb) print vptr $1 = (GLvector4f *) 0x10039c530 (gdb) print vptr->stride $2 = 0 Normally an bus error occurs #0 0xffffffff7e98fcc0 in run_vertex_stage (ctx=0x1003bfd9f, stage=0x10039c4e0) at tnl/t_vb_vertex.c:194 194 if (ctx->Transform.ClipPlanesEnabled) { (gdb) bt #0 0xffffffff7e98fcc0 in run_vertex_stage (ctx=0x1003bfd9f, stage=0x10039c4e0) at tnl/t_vb_vertex.c:194 #1 0xffffffff7e974728 in _tnl_run_pipeline (ctx=0x100120df0) at tnl/t_pipeline.c:158 #2 0xffffffff7e981ae4 in _tnl_playback_vertex_list (ctx=0x100120df0, data=0xf) at tnl/t_save_playback.c:209 #3 0xffffffff7e89edc4 in execute_list (ctx=0x100120df0, list=8136520) at main/dlist.c:5681 #4 0xffffffff7e89f814 in _mesa_CallList (list=4097) at main/dlist.c:6749 #5 0x0000000100002fec in draw () at gears.c:201 #6 0xffffffff7f023ba0 in processWindowWorkList (window=0x100110b40) at glut_event.c:1297 #7 0xffffffff7f023f88 in glutMainLoop () at glut_event.c:1344 #8 0x000000010000394c in main (argc=1, argv=0xffffffff7ffff0a8) at gears.c:379 (gdb) print ctx $1 = (GLcontext *) 0x1003bfd9f (gdb) print ctx->Transform $2 = {MatrixMode = 0, EyeUserPlane = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, _ClipUserPlane = {{0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}, {0, 0, 0, 0}}, ClipPlanesEnabled = 0, Normalize = 0 '\0', RescaleNormals = 0 '\0', RasterPositionUnclipped = 0 '\0', CullVertexFlag = 0 '\0', CullEyePos = {0, 0, 0, 0}, CullObjPos = {0, 0, 0, 0}} (gdb) p ctx->Transform.ClipPlanesEnabled $3 = 0 Maybe the memory has a wrong alignment and trying to read from this misaligned memory sends an bus error. ldd gears libX11.so.4 => /usr/lib/64/libX11.so.4 libglut.so => /opt64/mesa-6.4.2/lib/libglut.so libGLU.so => /opt64/mesa-6.4.2/lib/libGLU.so libGL.so => /opt64/mesa-6.4.2/lib/libGL.so libm.so.1 => /usr/lib/64/libm.so.1 libc.so.1 => /usr/lib/64/libc.so.1 libXext.so.0 => /usr/openwin/lib/sparcv9/libXext.so.0 libsocket.so.1 => /usr/lib/64/libsocket.so.1 libnsl.so.1 => /usr/lib/64/libnsl.so.1 libdl.so.1 => /usr/lib/64/libdl.so.1 libgcc_s.so.1 => /usr/local/lib/sparcv9/libgcc_s.so.1 libstdc++.so.6 => /usr/local/lib/sparcv9/libstdc++.so.6 libXmu.so.4 => /usr/lib/64/libXmu.so.4 libXi.so.5 => /usr/lib/64/libXi.so.5 libmp.so.2 => /usr/lib/64/libmp.so.2 libXt.so.4 => /usr/openwin/lib/sparcv9/libXt.so.4 libSM.so.6 => /usr/openwin/lib/sparcv9/libSM.so.6 libICE.so.6 => /usr/openwin/lib/sparcv9/libICE.so.6 /usr/platform/SUNW,Sun-Blade-1500/lib/sparcv9/libc_psr.so.1 file gears gears: ELF 64-bit MSB executable SPARCV9 Version 1, UltraSPARC1 Extensions Required, dynamically linked, not stripped ###################################################################### running the ray demo I got the same segmentation fault like mesa compiled with gcc 4.0.2. #0 0xffffffff7e9a008c in choose_emit_func (ctx=0x100242eb0, count=84, dest=0x10079ff60 "C\246\016;CZ\035(Gg]\342?\200") at tnl/t_vertex.c:120 120 a[j].emit = a[j].insert[vptr->size - 1]; /* not always used */ (gdb) bt #0 0xffffffff7e9a008c in choose_emit_func (ctx=0x100242eb0, count=84, dest=0x10079ff60 "C\246\016;CZ\035(Gg]\342?\200") at tnl/t_vertex.c:120 #1 0xffffffff7e9a0b0c in _tnl_build_vertices (ctx=0x100242eb0, start=0, end=84, newinputs=84) at tnl/t_vertex.c:409 #2 0xffffffff7e98e014 in run_render (ctx=0x100242eb0, stage=0x1004bb658) at tnl/t_vb_render.c:295 #3 0xffffffff7e974728 in _tnl_run_pipeline (ctx=0x100242eb0) at tnl/t_pipeline.c:158 #4 0xffffffff7e981ae4 in _tnl_playback_vertex_list (ctx=0x100242eb0, data=0xf) at tnl/t_save_playback.c:209 #5 0xffffffff7e89edc4 in execute_list (ctx=0x100242eb0, list=10951056) at main/dlist.c:5681 #6 0xffffffff7e89f814 in _mesa_CallList (list=4097) at main/dlist.c:6749 #7 0x0000000100003cec in draw () at ray.c:658 #8 0xffffffff7f023f74 in glutMainLoop () at glut_event.c:962 #9 0x00000001000053e8 in main (ac=1, av=0x13) at ray.c:899 I'll add the sunos5-64-gcc config. For the mklib script we need a test to determine if the object files are 32 or 64-bit, then pass the right options to the linker. For Linux we parse the output of 'file file.o'. Could you send me the output of running 'file' on both a 32 and 64-bit object file? I'll use that info to update the mklib script. As for the runtime problems, you might be able to get more debug info if you recompiled without -O3. If things run OK w/out -O3 it might be a compiler bug. Thank you for adding the the sunos5-64-gcc config. The output of file <object file> vary a little bit depending on the compiler flags 32 Bit mit gcc CGLAGS -mcpu=ultrasparc -mv8plus -mvis or at least -mcpu=ultrasparc => file ./progs/xdemos/pbutil.o ./progs/xdemos/pbutil.o: ELF 32-bit MSB relocatable SPARC32PLUS Version 1, V8+ Required, UltraSPARC1 Extensions Required 64 Bit CFLAGS at least -m64 -mcpu=ultrasparc => file ./progs/xdemos/pbutil.o ./progs/xdemos/pbutil.o: ELF 64-bit MSB relocatable SPARCV9 Version 1, UltraSPARC1 Extensions Required But you can compile binaries for old 32 Bit only sparc machines (might be 10 years old) but the default of gcc on sun (without mcpu option) hallo.o: ELF 32-bit MSB relocatable SPARC Version 1 For 64 Bit without mpcu hallo.o: ELF 64-bit MSB relocatable SPARCV9 Version 1 For better supporting the solaris platform it would be the best thing if you try to compile it on a old cheap ultrasparc machine. E.g. an ultra5/10 with about 400 MHz could be bought for about less than 100 $. With a 440 MHz prozessor it's even a nice machine that can play DVDs with xine ... I'll try to compile mesa without -O3 option and tell you my results but for further more complicate activities it would be the best thing if one Mesa developer can do it on a sun on his own. OK, I think I've got the mklib script updated. Can you try the version in cvs at http://webcvs.freedesktop.org/mesa/Mesa/bin/ Hello Brian,
thank you for the changed configs file for solaris (sunos5-64-gcc).
To run make sunos5-64-gcc I've to correct the Makefile first:
/opt/sfw/bin/cvs diff Makefile
Index: Makefile
===================================================================
RCS file: /cvs/mesa/Mesa/Makefile,v
retrieving revision 1.63
diff -r1.63 Makefile
128a129
> sunos5-64-gcc \
So, please add this line to the main Makefile.
(Does anybody of the Mesa developer team has access
to an old cheap ultrasparc solaris system? That could make
bug fixing more easy)
The build stopped at:
make[2]: Entering directory `/mnt/home/egger/src/Mesa/cvs/Mesa/progs/demos'
gcc -I../../include -Wall -O3 -m64 -mcpu=ultrasparc -mv8plus -mvis -g
-fomit-frame-pointer -pipe -fPIC -m64 -D_REENTRANT -DUSE_XSHM -DUSE_SPARC_ASM
-std=c99 -ffast-math -I/usr/openwin/include arbfplight.c readtex.o -L../../lib
-lX11 -lglut -lGLU -lGL -lm -o arbfplight
Undefined first referenced
symbol in file
glGetQueryObjecti64vEXT ../../lib/libGL.so
glBlitFramebufferEXT ../../lib/libGL.so
glGetQueryObjectui64vEXT ../../lib/libGL.so
ld: fatal: Symbol referencing errors. No output written to arbfplight
collect2: ld returned 1 exit status
make[2]: *** [arbfplight] Error 1
make[2]: Leaving directory `/mnt/home/egger/src/Mesa/cvs/Mesa/progs/demos'
make[1]: *** [subdirs] Error 1
make[1]: Leaving directory `/mnt/home/egger/src/Mesa/cvs/Mesa/progs'
make: *** [default] Error 1
OK, I've added sunos5-64-gcc to the toplevel Makefile. The src/mesa/sparc/glapi_sparc.S file wasn't getting regenerated so it was missing those three functions you listed. Should be OK now. I suppose having an old sparc machine would be handy, but I've already got at least 10 computers in my office. If there's ever a need Brian - give me a shout. I've got an Ultra 60 here that you can either ssh into or I'll build test. Thank you Alan, I hope that could help solving the solaris problem. I hope you've an installed at least gcc 3.4.2 on that machine, too. The cvs version of last weak compiled fine but still crashed for 64 Bit on Solaris 9 (ultrasparc). This bug has not been updated in four years. Closing. |
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.