All of lore.kernel.org
 help / color / mirror / Atom feed
From: Samuel Thibault <samuel.thibault@eu.citrix.com>
To: Cody Jarrett <cody.jarrett@itfreedom.com>
Cc: Xen-devel@lists.xensource.com
Subject: Re: Floating Point Exception
Date: Fri, 11 Jul 2008 18:21:46 +0100	[thread overview]
Message-ID: <20080711172146.GB4506@implementation.uk.xensource.com> (raw)
In-Reply-To: <BD5372FE-FAA2-4CBE-9C1A-EE39C729FBFD@itfreedom.com>

[-- Attachment #1: Type: text/plain, Size: 877 bytes --]

Cody Jarrett, le Fri 11 Jul 2008 11:27:35 -0500, a écrit :
> It seems to happen randomly when executing the 'rpm' or 'yum'  
> commands. It happens on centos 5, 5.1, and 5.2 machines while using  
> the xen kernel and on 3 of my completely different servers. When it  
> does happen, all the strace outputs seem to be the same, encountering  
> the SIGFPE after the second gettimeofday. What should I provide to  
> help track this issue down?

Well, I had a look at the rpm code, and it's quite bogus: it uses
gettimeofday() to measure the time taken by nanosleep(20ms). There is
no way that can reliably work in all environments, virtualized or not,
since the resolution of gettimeofday may be >20ms (posix even says it is
unspecified). The attached patch should fix that, but I guess it'll be
hard to get it applied to all rpm-based distributions :/

Samuel

[-- Attachment #2: patch --]
[-- Type: text/plain, Size: 298 bytes --]

--- rpmio/rpmsw.c.orig	2008-07-11 18:19:43.000000000 +0100
+++ rpmio/rpmsw.c	2008-07-11 18:19:57.000000000 +0100
@@ -220,7 +220,7 @@
 	rpmsw_type = 1;
 
 	/* Compute cycles/usec */
-	rpmsw_cycles = sum_cycles/sum_usecs;
+	rpmsw_cycles = sum_cycles/(sum_usecs + 1);
 #else
 	rpmsw_type = 0;
 #endif

[-- Attachment #3: Type: text/plain, Size: 138 bytes --]

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel

  reply	other threads:[~2008-07-11 17:21 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <22AECFD3-98E0-44F9-A19C-1667B41D0675@itfreedom.com>
2008-07-10 17:56 ` Floating Point Exception Cody Jarrett
2008-07-10 18:01   ` Samuel Thibault
2008-07-11 16:27     ` Cody Jarrett
2008-07-11 17:21       ` Samuel Thibault [this message]
2008-07-11 18:02         ` Cody Jarrett
2008-07-11 19:20           ` Samuel Thibault
2008-09-03 19:31 Floating point exception john bryant
  -- strict thread matches above, loose matches on Subject: below --
2004-09-11 11:39 Ankit Jain
2004-09-11 14:58 ` Jan-Benedict Glaw
2004-05-31  3:12 kas turi
2002-12-27 14:18 Floating Point Exception Nandakumar  NarayanaSwamy
     [not found] <000601c28c56$4b9d20a0$7301a8c0@zhongqx>
2002-11-15  4:44 ` Floating point exception rekha gvv
2002-01-14 10:56 floating " Zwane Mwaikambo
2002-01-14 21:26 ` Christian Thalinger
2002-01-15 14:34   ` Zwane Mwaikambo
2002-01-15 14:46     ` Richard B. Johnson
2002-01-15 18:19     ` Christian Thalinger
2002-01-15 18:31       ` Richard B. Johnson
2002-01-15 18:49         ` Christian Thalinger
2002-01-16  5:45       ` Zwane Mwaikambo
2002-01-16 11:55         ` Christian Thalinger
2002-01-16 14:32           ` Zwane Mwaikambo
2002-01-16 20:26             ` Christian Thalinger
2002-01-16 21:23               ` Richard B. Johnson
2002-01-16 21:59                 ` Brian Gerst
2002-01-16 22:05                   ` Richard B. Johnson
2002-01-16 22:12                     ` Mark Zealey
2002-01-16 22:23                       ` Richard B. Johnson
2002-01-16 23:35                     ` Christian Thalinger
2002-01-13 12:43 Christian Thalinger
2002-01-15 23:28 ` Brian Gerst
2002-01-16 11:45   ` Christian Thalinger
2002-01-16 11:58     ` Dave Jones
2002-01-16 13:14       ` Bruce Harada
2002-01-16 20:06         ` Christian Thalinger
2002-01-17 19:26         ` bill davidsen
2002-01-16 13:52     ` Brian Gerst
2002-01-16 14:28       ` M. Edward (Ed) Borasky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080711172146.GB4506@implementation.uk.xensource.com \
    --to=samuel.thibault@eu.citrix.com \
    --cc=Xen-devel@lists.xensource.com \
    --cc=cody.jarrett@itfreedom.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.