From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philippe Gerum <rpm@xenomai.org>
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] Problem throwing a C++ Exception on Blackfin
Date: Mon, 15 Mar 2010 19:15:37 +0100 [thread overview]
Message-ID: <4B9E7949.5060606@domain.hid> (raw)
In-Reply-To: <1268676605.27899.233.camel@domain.hid>
Philippe Gerum wrote:
> On Mon, 2010-03-15 at 18:57 +0100, Gilles Chanteperdrix wrote:
>> Philippe Gerum wrote:
>>> On Mon, 2010-03-15 at 17:40 +0100, Gilles Chanteperdrix wrote:
>>>> Philippe Gerum wrote:
>>>>> On Mon, 2010-03-15 at 15:00 +0100, Kolja Waschk wrote:
>>>>>> Hi,
>>>>>>
>>>>>> first I have to admit that my report is actually about a problem with a quite old Xenomai (Nucleus 2.4.7, I-pipe 1.10) in "stock" Blackfin uClinux kernel 2.6.28 as it comes in Blackfin uClinux-dist 2009R1-RC6.
>>>>>>
>>>>>> Testing a newer code base would probably require some days of work to update a custom driver and bring up other problems, so I'm trying to find out whether it is worth the effort at this time. Maybe someone can (roughly) identify the problem's cause (from memory?) and help me to decide whether there is a simple solution, or an upgrade is necessary:
>>>>>>
>>>>> No obvious answer to this. 2.6.28/bfin has problems, the whole exception
>>>>> management on blackfin is a problem per se. 2.6.28/bfin + I-pipe has
>>>>> even more problems. You may want to try 2.6.31.6, while keeping the rest
>>>>> of your uClinux-dist base. Nasty issues were fixed in the 2.6.30
>>>>> timeframe.
>>>> Are you sure C++ exceptions need hardware exceptions at all? That the
>>>> problem is not rather that we have some C code without exception
>>>> handling traversed by exceptions? Should not the Xenomai support
>>>> libraries be compiled with -fexceptions to allow mixing them with code
>>>> which throws/catches exceptions?
>>> It's not about using hw to process C++ exceptions. It's about having
>>> problems handling hw exceptions in kernel space triggered by C++
>>> exceptions in user-space.
>> The main problem may be why C++ exceptions in user-space do trigger hw
>> exceptions in kernel-space. And I would tend to think that a missing
>> -fexceptions could be the cause. Except that in the testcase, the
>> exception does not traverse any Xenomai library code, since it is thrown
>> and handled in the same function.
>
> That is one issue, but the basic issue we should be after first, is that
> we have a CPLB miss triggered by a kernel memory access. Fixing a
> possible user-space issue should come next, so that we don't paper over
> that bug.
Yes, of course.
FWIW, I tried the test program on ARM, and it runs just fine (except
that it is missing the obvious mlockall). If we do not catch the
exception, the glibc is also completely able to handle it and generate a
"clean" abort. So, I guess there is no -fexceptions issue.
Sorry for the noise.
--
Gilles Chanteperdrix, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
next prev parent reply other threads:[~2010-03-15 18:15 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-03-15 14:00 [Xenomai-help] Problem throwing a C++ Exception on Blackfin Kolja Waschk
2010-03-15 14:30 ` Philippe Gerum
2010-03-15 16:40 ` Gilles Chanteperdrix
2010-03-15 17:10 ` Philippe Gerum
2010-03-15 17:57 ` Gilles Chanteperdrix
2010-03-15 18:10 ` Philippe Gerum
2010-03-15 18:15 ` Gilles Chanteperdrix [this message]
2010-03-16 9:12 ` Kolja Waschk
[not found] ` <alpine.DEB.1.10.1003161001560.29063@domain.hid>
2010-03-16 9:15 ` Philippe Gerum
2010-03-16 9:23 ` Kolja Waschk
2010-03-16 14:11 ` Kolja Waschk
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=4B9E7949.5060606@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=rpm@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.