Forums » Linux
Ilegal instruction
Hi,
I have problems with the last 3.2.2 update. When I try to run vendetta, it dumps with an "Ilegal instruction" message.
May be it is compiled with any 686+ switch? Does anyone has this problem?
(I have a k6)
I have problems with the last 3.2.2 update. When I try to run vendetta, it dumps with an "Ilegal instruction" message.
May be it is compiled with any 686+ switch? Does anyone has this problem?
(I have a k6)
It's compiled under gcc 3.2.3 with these flags:
-march=pentium -ffast-math -O3 -fno-strict-aliasing
So it's surprising that it doesn't work on a K6. I guess there's some Pentium instruction it doesn't support, or gcc 3.2.3 has a bug in its CPU definition for the Pentium. Unfortunately I don't trip the bugreporter on SIGILL, or I'd see which instruction it is. K6 support is the whole reason I chose arch=pentium instead of pentiumpro. I guess I'll scale back the CPU features again for 3.2.3 (which probably won't impact performance much at all).
-march=pentium -ffast-math -O3 -fno-strict-aliasing
So it's surprising that it doesn't work on a K6. I guess there's some Pentium instruction it doesn't support, or gcc 3.2.3 has a bug in its CPU definition for the Pentium. Unfortunately I don't trip the bugreporter on SIGILL, or I'd see which instruction it is. K6 support is the whole reason I chose arch=pentium instead of pentiumpro. I guess I'll scale back the CPU features again for 3.2.3 (which probably won't impact performance much at all).
It definately runs fine with a k7. I can try it on a k6-II if you like.
Would it take considerably more effort to compile both a -march=pentium and -march=i686 (or whatever is fastest but compatible with P3s, P4s, and Athlons)? That would make it a bit faster for us people with newer processors...
Hi again,
with such switches it should have no problems, k6 is fully 586 compatible.
I have run it with gdb and this is the output:
------------------------------------------------------
(gdb) run
Starting program: /home/miguel/.vendetta/vendetta
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Reading symbols from /home/miguel/.vendetta/drivers/gkgl.so...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libGLU.so.1...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Reading symbols from /lib/libpthread.so.0...done.
[New Thread 1024 (LWP 2311)]
Reading symbols from /home/miguel/.vendetta/drivers/osssound.so...done.
Reading symbols from /usr/X11R6/lib/modules/dri/mach64_dri.so...done.
Reading symbols from /usr/X11R6/lib/modules/dri/mach64_dri.so...done.
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1024 (LWP 2311)]
0x401af2bc in XF86VidModeGetAllModeLines ()
from /home/miguel/.vendetta/drivers/gkgl.so
(gdb)
-----------------------------------------------
So, can the problem be in gkgl.so? Or may be it is triggering another bug anywhere (mach64_dri.so)?
Does anyone still have gkgl.so from 3.2.1 hanging around to test it?
Thanks to all.
with such switches it should have no problems, k6 is fully 586 compatible.
I have run it with gdb and this is the output:
------------------------------------------------------
(gdb) run
Starting program: /home/miguel/.vendetta/vendetta
Reading symbols from /lib/libdl.so.2...(no debugging symbols found)...done.
Reading symbols from /lib/libz.so.1...(no debugging symbols found)...done.
Reading symbols from /lib/libm.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/libc.so.6...(no debugging symbols found)...done.
Reading symbols from /lib/ld-linux.so.2...(no debugging symbols found)...done.
Reading symbols from /home/miguel/.vendetta/drivers/gkgl.so...
(no debugging symbols found)...done.
Reading symbols from /usr/lib/libGL.so.1...(no debugging symbols found)...done.
Reading symbols from /usr/lib/libGLU.so.1...done.
Reading symbols from /usr/X11R6/lib/libX11.so.6...done.
Reading symbols from /usr/X11R6/lib/libXext.so.6...done.
Reading symbols from /lib/libpthread.so.0...done.
[New Thread 1024 (LWP 2311)]
Reading symbols from /home/miguel/.vendetta/drivers/osssound.so...done.
Reading symbols from /usr/X11R6/lib/modules/dri/mach64_dri.so...done.
Reading symbols from /usr/X11R6/lib/modules/dri/mach64_dri.so...done.
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 1024 (LWP 2311)]
0x401af2bc in XF86VidModeGetAllModeLines ()
from /home/miguel/.vendetta/drivers/gkgl.so
(gdb)
-----------------------------------------------
So, can the problem be in gkgl.so? Or may be it is triggering another bug anywhere (mach64_dri.so)?
Does anyone still have gkgl.so from 3.2.1 hanging around to test it?
Thanks to all.
By the way, because writing short may be i'm misleading you.
My computer really is K6-2, not K6. Graphics card is mach64 (ATI Rage Pro). Kernel is 2.4.19 and XFree86 is 4.2.1 (DRI for mach64 is still beta).
Best regards,
My computer really is K6-2, not K6. Graphics card is mach64 (ATI Rage Pro). Kernel is 2.4.19 and XFree86 is 4.2.1 (DRI for mach64 is still beta).
Best regards,
Ahhh. Thank you for debugging that. Yes, my libXxf86vmode.a is compiled with pentium 3 instructions. I'll try to fix this tonight.
Thanks A1k0n
Yes, i traced it now to the ofending instruction
0x401af2bc <XF86VidModeGetAllModeLines+332>: cmovne %eax,%edi
FCMOV instructions are introduced in Pentium Pro, and also run in Athlon, but fails on previous AMD processors.
Best regards.
Yes, i traced it now to the ofending instruction
0x401af2bc <XF86VidModeGetAllModeLines+332>: cmovne %eax,%edi
FCMOV instructions are introduced in Pentium Pro, and also run in Athlon, but fails on previous AMD processors.
Best regards.
Better now?
Thank you very much A1kon
Now it works like a charm!
Best regards.
Now it works like a charm!
Best regards.