Bug#219610: sleep has illegal instruction with glibc 2.3.2: stmxcsr ?
Package: libc6
Version: 2.3.2-9
The shell command 'sleep 1' gives an 'illegal instruction' error.
As you can see below, apparently on an stmxcsr. (I don't speak
assembler very well :-) This is with the current 'testing' glibc.
Very likely a libc problem.
Apparently someone's encountered that already, but I didn't find
it filed as a bug:
http://lists.debian.org/debian-user/2003/debian-user-200310/msg02806.html
I don't know for sure whether it's a problem of libc, kernel, or
the sleep program, but I can give two configurations with different
behaviour:
Config 1 (works):
*****************
$ uname -a
Linux lrnoe 2.4.18-1-386 #2 Sun Aug 10 09:10:41 EST 2003 i686 unknown
$ dpkg --list kernel-image-2.4.18-1-386
ii kernel-image-2 2.4.18-11 ...
$ dpkg --list libc6
ii libc6 2.3.2-7 ...
$ /lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
...
Compiled by GNU CC version 3.3.2 20030831 (Debian prerelease).
Compiled on a Linux 2.4.19 system on 2003-09-12.
...
$ sleep --version
sleep (GNU sh-utils) 2.0.11
$ sleep 1
< 1 second wait, OK>
Config 2 (broken):
******************
$ uname -a
Linux ordoff 2.2.20 #1 Fri Jun 20 20:11:20 UTC 2003 i686 unknown
$ dpkg --list kernel-image-2.2.20
ii kernel-image-2 2.2.20-5woody3 ...
$ dpkg --list libc6
ii libc6 2.3.2-9 ...
$ /lib/libc.so.6
GNU C Library stable release version 2.3.2, by Roland McGrath et al.
...
Compiled by GNU CC version 3.3.2 (Debian).
Compiled on a Linux 2.4.22-1 system on 2003-10-27.
...
$ sleep --version
sleep (GNU sh-utils) 2.0.11
$ sleep 1
Illegal instruction
Disassembly:
************
$ gdb sleep
(gdb) r 1
Starting program: /bin/sleep 1
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...(no debugging symbols found)...
(no debugging symbols found)...[New Thread 16384 (LWP 3267)]
Program received signal SIGILL, Illegal instruction.
[Switching to Thread 16384 (LWP 3267)]
0x4001f7e5 in fesetround () from /lib/libm.so.6
(gdb) disas
Dump of assembler code for function fesetround:
0x4001f7a0 <fesetround>: push %ebp
0x4001f7a1 <fesetround+1>: mov $0x1,%eax
0x4001f7a6 <fesetround+6>: mov %esp,%ebp
0x4001f7a8 <fesetround+8>: sub $0x8,%esp
0x4001f7ab <fesetround+11>: mov 0x8(%ebp),%edx
0x4001f7ae <fesetround+14>: call 0x4001f772 <fetestexcept+66>
0x4001f7b3 <fesetround+19>: add $0x1c401,%ecx
0x4001f7b9 <fesetround+25>: test $0xfffff3ff,%edx
0x4001f7bf <fesetround+31>: jne 0x4001f7ff <fesetround+95>
0x4001f7c1 <fesetround+33>: fnstcw 0xfffffffe(%ebp)
0x4001f7c4 <fesetround+36>: movzwl 0xfffffffe(%ebp),%eax
0x4001f7c8 <fesetround+40>: and $0xfffff3ff,%eax
0x4001f7cd <fesetround+45>: or %edx,%eax
0x4001f7cf <fesetround+47>: mov %ax,0xfffffffe(%ebp)
0x4001f7d3 <fesetround+51>: fldcw 0xfffffffe(%ebp)
0x4001f7d6 <fesetround+54>: mov 0x40(%ecx),%eax
0x4001f7dc <fesetround+60>: testb $0x2,0x8b(%eax)
0x4001f7e3 <fesetround+67>: je 0x4001f7fd <fesetround+93>
0x4001f7e5 <fesetround+69>: stmxcsr 0xfffffff8(%ebp)
0x4001f7e9 <fesetround+73>: mov 0xfffffff8(%ebp),%eax
0x4001f7ec <fesetround+76>: shl $0x3,%edx
0x4001f7ef <fesetround+79>: and $0xffff9fff,%eax
0x4001f7f4 <fesetround+84>: or %edx,%eax
0x4001f7f6 <fesetround+86>: mov %eax,0xfffffff8(%ebp)
0x4001f7f9 <fesetround+89>: ldmxcsr 0xfffffff8(%ebp)
0x4001f7fd <fesetround+93>: xor %eax,%eax
0x4001f7ff <fesetround+95>: mov %ebp,%esp
0x4001f801 <fesetround+97>: pop %ebp
0x4001f802 <fesetround+98>: ret
0x4001f803 <fesetround+99>: nop
0x4001f804 <fesetround+100>: nop
0x4001f805 <fesetround+101>: nop
0x4001f806 <fesetround+102>: nop
0x4001f807 <fesetround+103>: nop
0x4001f808 <fesetround+104>: nop
0x4001f809 <fesetround+105>: nop
0x4001f80a <fesetround+106>: nop
0x4001f80b <fesetround+107>: nop
0x4001f80c <fesetround+108>: nop
0x4001f80d <fesetround+109>: nop
0x4001f80e <fesetround+110>: nop
0x4001f80f <fesetround+111>: nop
End of assembler dump.
--
Claus Fischer <claus.fischer@clausfischer.com>
http://www.clausfischer.com/
Reply to: