Fork us on GitHub Follow us on Google+ Follow us on Facebook Follow us on Twitter

Opened 9 years ago

Closed 8 years ago

#220 closed defect (worksforme)

Unexpected FPU exception in top utility

Reported by: Stanislav Kozina Owned by:
Priority: major Milestone: 0.4.3
Component: helenos/kernel/ia32 Version: mainline
Keywords: fpu Cc:
Blocker for: Depends on:
See also:

Description

Sometimes I got FPU exception (number 16) when computing percentages using floating point instruction in `top' utility.

The exception was detected when running on two ia32 CPUs under qemu-kvm simulator, using one CPU there was no problem. But the exception depends on many other things - changing message echoed by printf on very different place can change if the FPU exception rises or not.

There is a branch to preserve this behaviour:
lp:~ersin/helenos/fpu-bug

In the branch there is the skeleton of the top' utility, which still sometimes emits the exception. If you get this branch, compile, run system (rather on pair ia32 CPUs), run top' and press few keys on the keyboard, you should get the exception.

The top' utility still retrieves some data from kernel, but these are just to get some random numbers. You can replace them with hardcoded values, but then you have to compile top' with -O0 flag, otherwise compiler removes FPU computation at all.

The only other thing, which still remains in the code, is the tgetchar' method, which was copied from tetris'. This one probably really causes the exception, because without it I was not able to get it.

Change History (2)

comment:1 Changed 9 years ago by Jakub Jermář

Exception number 16 informs the user about some error condition which occurred during FPU processing (e.g. FPU division by zero). Under normal operation, it should be masked and should
not occur.

Can we have the image.iso which shows this behavior and the corresponding top.disasm?

comment:2 Changed 8 years ago by Jakub Jermář

Resolution: worksforme
Status: newclosed

Closing as non-reproducible, feel free to reopen if necessary.

Note: See TracTickets for help on using tickets.