Jeff Webb wrote:
> Jeff Webb wrote:
>> If I run the attached program, I get the following result:
>>
>>  [root]# ./mqtest2
>>  CPU time limit exceeded
>>
>> The kernel log contains:
>>
>>  Oct 25 14:13:03 kernel: invalid use of FPU in Xenomai context at
>> 0x80492f6
> 
> I have another piece of information on this problem.  I was able to test
> the program on two other machines: an Athlon XP, and a PIII laptop.  The
> program works on the PIII, but fails on the Athlon XP.  I then compiled
> a new kernel, selecting the "Pentium-Pro" processor family instead of
> the "Athlon/Duron/K7" processor family.  The mqtest2 program now works
> on my Athlon64 X2 and Athlon XP systems, if I use the "Pentium-Pro" kernel.
> 
> Here is a summary of what I tried:
> 
> Machine #1: AMD Athlon(tm)64 X2 Dual Core Processor  4400+
>        OS: Fedora Core 5
> a) Linux SMP 2.6.17.13 (K7 config) / Xenomai 2.2.4 -> mqtest2 fails
> b) Linux SMP 2.6.17.13 (K7 config) / Xenomai trunk r1749 + patch ->
> mqtest2 fails
>   patch = https://mail.gna.org/public/xenomai-core/2006-10/msg00069.html
> c) Linux UP 2.6.17.13 (K7 config) / Xenomai 2.2.4 -> mqtest2 fails
> d) Linux SMP 2.6.17.13 (K7 config) / Xenomai 2.2.1 -> mqtest2 fails
> e) Linux UP 2.6.17.13 (ppro config) / Xenomai 2.2.4 -> mqtest2 WORKS!
> 
> Machine #2: AMD Athlon(tm) XP 3200+
> a) Fedora Core 1 / Linux 2.4.32 (K7 config) / Xenomai 2.2.3 -> mqtest2
> fails
> b) Fedora Core 5 / Linux 2.6.17.13 (ppro config) / Xenomai 2.2.4 ->
> mqtest2 WORKS!
> 
> Machine #3: Intel Pentium III Mobile CPU
> OS: Debian Unstable (old)
> Linux 2.4.33.3 (ppro config) / Xenomai 2.2.4 -> mqtest2 WORKS!
> 
> So, it seems that a bug is introduced when compiling for the AMD K7
> family.  Is the mqtest2 problem a compiler optimization bug, a Linux
> bug, a Linux configuration problem, a Xenomai bug, or a problem in my
> code?  Any ideas on how to proceed?  I am not familiar with the Xenomai
> internals or low-level x86 code, but I will do what I can to help debug
> this.
> 
> Does anyone else have an AMD system that can verify my results?

I have an old Athlon 800. Maybe we are lucky and it exposes the problem
when the kernel is optimised for it. I'm going to give this a try, but
it may take a few days (and a free time slot).

> 
> The mqtest2.c program in question was attached here:
>  https://mail.gna.org/public/xenomai-help/2006-10/msg00147.html
> 
> The problem seems to be connected with the size of writes to Xenomai
> pipes.  This example uses POSIX message queues, but I had a similar
> problem a while back with RTAI pipes.  Maybe this tells us the problem
> is in the nucleus pipe code?  Just a guess.  The problem seems to affect
> both 2.4 and 2.6 systems, and goes back to at least Xenomai 2.2.1.

Maybe, maybe not. Pipes remain fairly unrelated to FPU usage, so there
is still /at least/ one piece missing in the puzzle.

BTW, did you already write what compiler version you are using for these
tests (/me too lazy to search the archives)?

Jan

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Xenomai-help mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-help

Reply via email to