All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Jeff Webb <jeff.webb@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Fwd: Re: [Xenomai-help] invalid use of FPU in Xenomai context]
Date: Wed, 01 Nov 2006 20:42:54 +0100	[thread overview]
Message-ID: <4548F8BE.90809@domain.hid> (raw)
In-Reply-To: <4548C170.1000504@domain.hid>

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

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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  reply	other threads:[~2006-11-01 19:42 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-11-01 15:46 [Fwd: Re: [Xenomai-help] invalid use of FPU in Xenomai context] Jeff Webb
2006-11-01 19:42 ` Jan Kiszka [this message]
2006-11-01 20:21   ` Jeff Webb
2006-11-03  9:45     ` Jan Kiszka
2006-11-03 10:01       ` Gilles Chanteperdrix
2006-11-03 10:11         ` Jan Kiszka
2006-11-03 10:19           ` Gilles Chanteperdrix
2006-11-03 12:21             ` Jan Kiszka
2006-11-03 17:22               ` Jeff Webb
2006-11-06  9:04                 ` Gilles Chanteperdrix
2006-11-04 14:30               ` Philippe Gerum

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=4548F8BE.90809@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=jeff.webb@domain.hid \
    --cc=xenomai@xenomai.org \
    /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.