From: Tomas Kalibera <kalibera@domain.hid>
To: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
Cc: xenomai-core <xenomai@xenomai.org>
Subject: Re: [Xenomai-core] Kernel crash with Xenomai (caused by fork?)
Date: Fri, 28 Mar 2008 21:36:05 -0400 [thread overview]
Message-ID: <47ED9D05.7060707@domain.hid> (raw)
In-Reply-To: <18413.34914.638951.575098@domain.hid>
Hi Gilles,
thanks for looking at it. Your analysis is correct, I don't indeed have
CONFIG_PREEMPT_RT kernel, but only CONFIG_PREEMPT, sorry for the confusion.
I've put the kernel config, sources, and binary on the web, so that you
can be sure you're really looking on the kernel that is crashing,
http://www.cs.purdue.edu/homes/tkaliber/crash
Thanks,
Tomas
Gilles Chanteperdrix wrote:
> Gilles Chanteperdrix wrote:
> > Tomas Kalibera wrote:
> > >
> > > Hi,
> > >
> > > I'm getting kernel crashes with my native skin user-space Xenomai
> > > application. It looks like the crash happens after clone/fork. I'm using
> > > kernel 2.6.24.3, SMP, RT_PREEMPT (settings like 2.6.22-14-rt from
> > > Ubuntu 7.10). Xenomai 2.4.2.
> > >
> > > The thread causing the crash is a Xenomai task, running most of the time
> > > in the Linux domain. The application is very huge, getting a short
> > > example leading to the bug is unfortunatelly not realistic.
> > >
> > > The crash happens when running on real hardware (x86_64 with 32 bit
> > > kernel and applications). The system is unusable after it happens, can
> > > only be rebooted, the dump is from serial console.
> > > In VMWare on another x86_64 machine, it does not crash.
> > >
> > > Anyone getting a similar error ? Any ideas where to look for the problem ?
> >
> > Looking at the kernel code, it seems that only one page may be mapped at
> > a time with kmap_atomic using KM_USER0. So what probably happens is that
> > for other invocations of cow_user_page than the one taking place in
> > fork, a lock of some kind prevents concurrent invocation of
> > cow_user_page. In our use of cow_user_page, we probably do not hold that
> > lock. I look at the code, I see that copy_pte_range holds a spinlock,
> > which should disable preemption on a classical kernel. But who knows
> > what happens with RT_PREEMPT enabled...
>
> There is something strange... Normally, when compiling with
> CONFIG_PREEMPT_RT, kmap_atomic_prot is replaced with kmap and the real
> kmap_atomic_prot is renamd __kmap_atomic_prot. Since cow_user_page uses
> kmap_atomic_prot, kmap is in fact called and kmap_atomic_prot BUG_ON
> condition should in fact never occur.
>
>
next prev parent reply other threads:[~2008-03-29 1:36 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-03-28 21:06 [Xenomai-core] Kernel crash with Xenomai (caused by fork?) Tomas Kalibera
2008-03-28 23:25 ` Gilles Chanteperdrix
2008-03-29 0:08 ` Gilles Chanteperdrix
2008-03-29 1:36 ` Tomas Kalibera [this message]
2008-03-29 20:17 ` Gilles Chanteperdrix
2008-03-30 20:27 ` Gilles Chanteperdrix
2008-03-31 4:04 ` Tomas Kalibera
2008-03-31 20:21 ` Gilles Chanteperdrix
2008-03-31 20:30 ` Gilles Chanteperdrix
2008-04-01 0:00 ` Tomas Kalibera
2008-04-01 5:52 ` Gilles Chanteperdrix
2008-04-01 7:59 ` Gilles Chanteperdrix
2008-04-01 13:54 ` Tomas Kalibera
2008-04-01 14:03 ` Gilles Chanteperdrix
2008-04-01 15:45 ` Tomas Kalibera
2008-04-01 15:58 ` Gilles Chanteperdrix
2008-04-01 21:23 ` Tomas Kalibera
2008-04-02 8:42 ` Gilles Chanteperdrix
2008-04-02 15:02 ` Tomas Kalibera
2008-04-02 15:07 ` Gilles Chanteperdrix
2008-04-02 18:14 ` Tomas Kalibera
2008-04-02 19:38 ` Tomas Kalibera
2008-04-02 19:42 ` Bill Gatliff
2008-04-02 19:44 ` Gilles Chanteperdrix
2008-04-02 21:45 ` Tomas Kalibera
2008-04-02 22:34 ` Gilles Chanteperdrix
2008-04-02 22:53 ` Gilles Chanteperdrix
2008-04-03 17:31 ` Tomas Kalibera
2008-04-05 4:32 ` Tomas Kalibera
2008-04-05 9:10 ` Jan Kiszka
2008-04-02 23:46 ` Tomas Kalibera
2008-04-03 9:04 ` Gilles Chanteperdrix
2008-04-02 19:52 ` Gilles Chanteperdrix
2008-04-02 21:37 ` Tomas Kalibera
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=47ED9D05.7060707@domain.hid \
--to=kalibera@domain.hid \
--cc=gilles.chanteperdrix@xenomai.org \
--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.