All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jan Kiszka <jan.kiszka@domain.hid>
To: Eric Noulard <eric.noulard@domain.hid>
Cc: Xenomai help <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] Core Dump on possibly buggy signal handler	installation
Date: Fri, 27 Apr 2007 18:18:33 +0200	[thread overview]
Message-ID: <46322259.5080409@domain.hid> (raw)
In-Reply-To: <cbe23c50704270912i1cdb1272hd700a8b83775a34a@domain.hid>

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

Eric Noulard wrote:
> Hi all,
> 
> I've recently discovered a "possible" bug
> only occuring with a system running xenomai-patched kernel.
> 
> I have set up a machine (dual-core intel machine).
> The machine is installed with a Fedora Core 6 and
> may be booted (test purpose)  with different kernel:
> 
> 1) linux 2.6.20-0119.rt8
>    which is an Ingo Molnar precompiled preempt-rt patched kernel
>    you may find it there:
>     http://people.redhat.com/mingo/realtime-preempt/
> 
> 2) 2.6.20-xeno-2.3.1-ipipe-1.7-03
>    which is a xenomai enabled kernel I've configured and compiled.
> 
> My test application is a mixed C/C++ USER-land application
> which currently make no xenomai specific call.
> 
> The application core dumps at the end of its execution
> with the xenomai enabled kernel whereas it does not
> with the preempt-rt kernel.
> 
> I track down the problem to a misuse of sigaction calls
> which install SIGALARM handler with sa_flags not properly setup.
> 
> My code is definitely buggy but I let you know because in the first
> place it was puzzling to have different (but consistent and repeatable)
> behavior
> on different kernel, with core dump using the Xenomai-enabled kernel :((.
> 
> You may try it  yourself:
> 
> gcc -o BadTimerSigHandler TimerSigHandler.c
> 
> generates a the buggy binary, while
> 
> gcc -DGOOD_SIGHANDLING -o GoodTimerSigHandler TimerSigHandler.c
> 
> generates the good one.
> 
> I don't really know if it may indicates a xenomai bug or not
> but I would be glad to understand WHY is this.
> 
> I mean I know that uninitialized memory have unpredictable consequence
> but here the bug is persistent after rerun, reboot, power cycle etc...
> 

What is a.sa_flags initialised when it is not initialised? 0? Maybe you
can nail it down to defined state that causes the core dump reliably.
Then we can also track down what happens to your sigaction call and
if/why Xenomai/I-pipe changes the picture in some regard.

Jan


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 250 bytes --]

  parent reply	other threads:[~2007-04-27 16:18 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-27 16:12 [Xenomai-help] Core Dump on possibly buggy signal handler installation Eric Noulard
2007-04-27 16:18 ` Gilles Chanteperdrix
2007-04-27 16:18 ` Jan Kiszka [this message]
2007-04-27 16:32   ` Eric Noulard
2007-04-27 16:56     ` Paul
2007-04-27 19:35       ` Jan Kiszka

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=46322259.5080409@domain.hid \
    --to=jan.kiszka@domain.hid \
    --cc=eric.noulard@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.