Floating Point Exception when compiling w/ gcc
Quoted 4 lines · Georgi Mungov
Hi,
I've received twice a floating point exception on a different virtual machines during compilation. The first time it was with mysql, the second - kernel 2.6.0. After I ran "make" again the compilation finished without problems.
I found a floating-point bug in xen-unstable, which, since I don't know what causes it, might also be present in xen 2.0.4. (See thread "reproducable data corruption in xen-unstable".)
HOWEVER, I did create a workaround patch, which effectively solves the problem for me. Remember to apply this patch both to xen0 and xenU kernels. Here it is:
xen/i386/kernel/process.c 2005-02-13 02:46:03.000000000 +0000 renamed from xen/i386/kernel/process.c.orig 2005-02-12 03:39:44.000000000 +0000 +2 -0
@@ -563,6 +563,8 @@ if (prev_p->thread_info->status & TS_USEDFPU) { save_init_fpu(prev_p); queue_multicall0(__HYPERVISOR_fpu_taskswitch); + } else { + stts (); } /*
Quoted 3 lines
I'm using Xen 2.0.4 build from sources on kernel 2.6.10 installed on standard slackware 9.1. The machine is PIII w/ 512MB ram running 4 VM, each with 64MB ram. The two errors happened on different VM.
My machine is an Athlon XP, so this shows that it isn't some strange AMD-only bug (unless of course you have found a _different_ floating-point bug). Thanks for the bug report!
Signature · 8 lines
Robin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 7 lines · Robin Green
I found a floating-point bug in xen-unstable, which, since I don't know what causes it, might also be present in xen 2.0.4. (See thread "reproducable data corruption in xen-unstable".)
HOWEVER, I did create a workaround patch, which effectively solves the problem for me. Remember to apply this patch both to xen0 and xenU kernels.
I'd like to get to the bottom of this problem. I've checked in some cleanups to FPU code in both -testing and -unstable trees (the cleanups are particularly extensive in the unstable tree). Can you see if the problem still occurs? If it does, it would be useful to see at task-switch time, where you see that TS is incorrectly cleared, whether Xen per-domain flags EDF_GUEST_STTS and EDF_USEDFPU are true or false. You'll have to hack in a call-down into Xen to print out the flags' status -- perhaps hack into the 'xen_version' hypercall?
-- Keir
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 7 lines · Keir Fraser
Quoted 4 lines · Robin Green
I found a floating-point bug in xen-unstable, which, since I don't know what causes it, might also be present in xen 2.0.4. (See thread "reproducable data corruption in xen-unstable".)
Quoted 7 lines
Quoted 3 lines
HOWEVER, I did create a workaround patch, which effectively solves the problem for me. Remember to apply this patch both to xen0 and xenU kernels.
I'd like to get to the bottom of this problem. I've checked in some cleanups to FPU code in both -testing and -unstable trees (the cleanups are particularly extensive in the unstable tree). Can you see if the problem still occurs?
When did you check in those changes?
Signature · 8 lines
Robin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 5 lines · Robin Green
Quoted 3 lines
I'd like to get to the bottom of this problem. I've checked in some cleanups to FPU code in both -testing and -unstable trees (the cleanups are particularly extensive in the unstable tree). Can you see if the problem still occurs?
When did you check in those changes?
Just before sending the email. They were in public xen.bkbits.net at that point but the changes don't get into our tarball snapshots until our overnight build is completed.
-- Keir
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 10 lines · Keir Fraser
Quoted 7 lines · Robin Green
I found a floating-point bug in xen-unstable, which, since I don't know what causes it, might also be present in xen 2.0.4. (See thread "reproducable data corruption in xen-unstable".)
HOWEVER, I did create a workaround patch, which effectively solves the problem for me. Remember to apply this patch both to xen0 and xenU kernels.
Quoted 5 lines
I'd like to get to the bottom of this problem. I've checked in some cleanups to FPU
code in both -testing and -unstable trees (the cleanups are particularly extensive
in the unstable tree). Can you see if the problem still occurs?
I just tried xen-unstable from 20050302 (I was waiting for it to be packaged in the fedora development repo), and it's much better - thanks!
However, there is still a less frequent problem with ptrace (which also occurred even when I'd applied my workaround patch). When running firefox under gdb only, display corruption and odd crashes in floating-point code are seen - which are the same symptoms as I had before.
So I assume that something is still wrong with the floating-point save/restore in the case where a process is being ptraced.
Not nearly such a big deal, but annoying when you are trying to debug something.
Signature · 10 lines
Robin ------------------------------------------------------- SF email is sponsored by - The IT Product Guide Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now. http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click
Quoted 10 lines · Robin Green
I just tried xen-unstable from 20050302 (I was waiting for it to be packaged in the fedora development repo), and it's much better - thanks!
However, there is still a less frequent problem with ptrace (which also occurred even when I'd applied my workaround patch). When running firefox under gdb only, display corruption and odd crashes in floating-point code are seen - which are the same symptoms as I had before.
So I assume that something is still wrong with the floating-point save/restore in the case where a process is being ptraced.
Does this bug still exhibit if you add in your patch to always set CR0_TS on task switch?
-- Keir
-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users. Discover which products truly live up to the hype. Start reading now.
http://ads.osdn.com/?ad_id=6595&alloc_id=14396&op=click