It is currently Sat, 26 Nov 2022 06:23:58 GMT

Author Message
 top suddenly gives floating point exception?
My Red Hat 7.3 box has just recently started giving me floating point
exceptions when running "top".

[root@shagrat root]# top -b -n 1
11:27pm  up 197 days, 10:22,  4 users,  load average: 0.00, 0.03, 0.00
210 processes: 208 sleeping, 1 running, 0 zombie, 1 stopped
Floating point exception

...SOME of the time.  Not always.  I can't figure it out.  From within
an emacs shell buffer, it works fine, and from some terminals it appears
to work, or at least not crash.

When it DOES work, though, I get strange numbers for my CPU states.  It
has them both pegged at 100%, but my load averages are right around zero
and the machine appears to be working completely fine, it's zippy and
responsive.  Sample:

[root@shagrat root]# top -b -n 1
11:27pm  up 197 days, 10:22,  4 users,  load average: 0.00, 0.03, 0.00
210 processes: 209 sleeping, 1 running, 0 zombie, 0 stopped
CPU0 states: 16.0% user, 83.0% system,  0.0% nice,  0.0% idle
CPU1 states: 100.0% user,  0.0% system,  0.0% nice,  0.0% idle
Mem:  1030680K av,  993796K used,   36884K free, 0K shrd,   93348K buff
Swap: 1052216K av,  120360K used,  931856K free    583864K cached  
6384 root      15   0  1120 1120   824 R     5.6  0.1   0:00 top
6329 root      15   0  5980 5980  2824 S     0.9  0.5   0:00 emacs    
1 root      15   0   468  428   412 S     0.0  0.0   2:59 init

I'm hoping the CPU states bit is part of an erroneous reading from a
broken TOP.

I haven't changed anything at the system level in a long time: no kernel
upgrades, no changes to the core RPMs.  I've read at least one cached
post that suggests that TOP has a tendency to break down over time,
which seems odd, but I'm pushing 200 days of uptime, and it definitely
never did this before.

Most of the posts say "upgrade procps," but I'm running the most recent
version for 7.3 according to (2.0.7-12).  There is a
2.0.7-25 for 8.0, and a rpm -Uvh --test on that RPM seemed to suggest it
would go in without conflicts, but I'm a little hesitant to drop in an
8.0 rpm on my 7.3 box, which is doing important work.

Anybody have any advice?  Is this an indication of a serious problem, or
a flaky known issue?  I can live without TOP if I have to, but I'd like
to know what's going on.


- Steve Linberg

 Thu, 24 Nov 2005 12:02:47 GMT   
 top suddenly gives floating point exception?

I'm glad to see that we are not the only ones seeing this.  You have
described what we are seeing exactly on one of our Redhat 7.3
machines.   We seem to get accurate cpu stats from vmstat but the
behaviour using top is exactly as you have described it.   We think it
has just started recently

Here's some of the RPMS we are running.

Have you found any solutions to your problem?

We're running dual AMD Athlon processors on a Tyan Tiger motherboard.
I wonder if your hardware is similar.

this machine has been up for 254 days so it seems pretty happy, but we
don't know how long this problem has existed.


 Wed, 30 Nov 2005 05:28:07 GMT   
 top suddenly gives floating point exception?
In article <>,

Mine for those are:


Nope, not yet. :(

I've got dual P3/700s - not sure about the motherboard.  It's a
California Digital box.

Yep, I'm at 204 days.  Everything on the machine seems to be running
fine, but top sure is h0rked.  


- Steve

 Thu, 01 Dec 2005 09:01:46 GMT   
 top suddenly gives floating point exception?
Ditto for me..  I'm running on a Pentium III, not sure what speed..

Running Redhat 7.2
The system's been up for 263 days...  So far that seems to be the only
link here..  So far everyone that has posted about this has it on
systems that have been up for 197+ days..

If anyone has any clues, please share...


 Mon, 05 Dec 2005 05:09:23 GMT   
 top suddenly gives floating point exception?

Don't have any answers as to what went wrong with top, but I can
report that upgrading to the procps-2.0.7-25 (contained in the Redhat
8.0 install) works fine on my Redhat 7.2 box and fixes the problem I
was having with top.

Also.. my guess is that a reboot would give you another 200 days
before it started its failure again.


 Mon, 05 Dec 2005 05:32:40 GMT   
 top suddenly gives floating point exception?
In article <>,

About the only clue I can come up with on my own is that the number of
seconds, counting from zero (uptime, IOW), passes $FFFFFF at just over
194 days, and becomes a 32-bit value.  Maybe there's a bug related to a
signed 24-bit value not being handled correctly when it overflows?  
Something looking at uptime treating an unsigned 32-bit value as a
signed 24-bit value?

$1000000 = 16777216 dec.
16777216 seconds = 194.1807407407 days
Bet you a nickel that's got something to do with it.

- Steve

 Mon, 05 Dec 2005 08:33:41 GMT   
 top suddenly gives floating point exception?
In article <>,
        Steve Linberg wrote:

The original post was about a floating point exception.
IIRC, the IEEE 32-bit floating point format has (approx) 24
bits in the mantissa field.  I would guess that once you
pass the magic 194 days (and change) of uptime, the unit
seconds bit falls off the low end of the mantissa, and top
subtracts two time values about one second apart (which
yields zero) and divides something by that (zero)
difference.  I'd call that a rather obscure,
difficult-to-reproduce, bug.  A likely quick and dirty fix
would be to change from 'float' to 'double' math.

Robert Riches
(Yes, that is one of my email addresses.)

 Mon, 05 Dec 2005 08:44:41 GMT   
 top suddenly gives floating point exception?
Robert M. Riches Jr wrote:

But that will only postpone the problem for a few million years.  ;-)


Fundamentalism is fundamentally wrong.

To reply to this message, replace everything to the left of "@" with

 Mon, 05 Dec 2005 08:47:05 GMT   
 top suddenly gives floating point exception?
In article <dK7Ia.131123$>,
        James Knott wrote:

Yup!  That's why I called it "quick and dirty".  Ideally,
each application would use infinite-precision math functions
and entirely eliminate the problem, once and for all.  :-)

Robert Riches
(Yes, that is one of my email addresses.)

 Mon, 05 Dec 2005 08:51:00 GMT   
 top suddenly gives floating point exception?
Hi all,

I have the same Problem on a dual machine with only 99 days uptime...
I think this error occurs on certain days maybe with "9" in the uptime :)))

im glad that it isnt a hardware error and only affects on top.
a reboot fixed the problem :) uhoh, linux transforms to windows...


Florian Schicker Internet Services

 Fri, 16 Dec 2005 01:29:44 GMT   
   [ 10 post ] 

Similar Threads

1. top gives floating point exception

2. floating point exception running top on cyrix p166 with linux 2.0.28

3. floating point exception in TOP

4. top - gets floating point exception with Netatalk installed

5. HELP: ps -u gives floating point exception!

6. 'floating point exception' when running top

7. Trouble on Compaq Deskpro 386: make gives floating point exception

8. Floating point exception when using TOP

9. Xaero on Linux gives Floating point exception!

10. ps gives floating point exception

Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by ST Software