From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: Philippe Gerum <rpm@xenomai.org>
Cc: Xenomai GNA <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] gdb/gdbserver hangs during rt_task_create
Date: Thu, 23 Dec 2010 22:43:13 +0100 [thread overview]
Message-ID: <4D13C271.50101@domain.hid> (raw)
In-Reply-To: <1293094412.22129.102.camel@domain.hid>
Philippe Gerum wrote:
> On Wed, 2010-12-22 at 20:00 +0100, Kolja Waschk wrote:
>>>> In my actual application however I never get past the rt_task_create, even if
>>>> I set a breakpoint at some line somewhen later.
>>> What if you don't single step but (c)ontinue?
>> It "hangs".
>>
>> But wait, just in this moment I discovered that I can get further if I
>> set all priorities, i.e. priority of the main task (with rt_task_shadow) and the
>> tasks where I couldn't get past rt_task_create, to 0 instead of 49 as before. Then at
>> least "cont" works to the next breakpoint (stepping over with "next" still doesn't).
>>
>
> This is typically a linuxthreads issue. Because there is a hidden
> manager in the loop which wants to get involved into the process of
> starting other threads, you can end up with priority issues breaking the
> internal protocol. The manager thread is not known from Xenomai, so in
> your case, it looks like starved from CPU albeit other threads expect it
> to kick in at some point. This can only happen if some of the protocol
> is based on busy waiting, which seems to be the case there.
>
>> Debugging with gdb at the moment feels unnecessarily complicated. Very often
>> the "next" doesn't bring me to the next line in my current source, but to some unexpected
>> place (e.g. to a rt_mutex_acquire_inner() which was called in a subroutine four
>> levels deeper..). I don't remember me becoming that confused with my previous
>> setup (Blackfin 2.6.28 kernel with Xenomai 2.4.7) or in other C++ apps ;)
>
> This is likely not related to the runtime environment at all. GDB has
> not a great track record when it comes to multi-thread debugging even if
> the situation improved over time, and things tend to get worse when
> linuxthreads are in the loop because of the number of magic interactions
> with the manager thread, and use of signals internally. What does have
> an impact is your toolchain and how aggressive it is when optimizing the
> code. What you see is not what you get in that case.
And gdb 6.5 over linuxthreads is pretty much outdated... Also, some bugs
have been fixed in Xenomai 2.5.3. So, I think it is useless pursuing
investigating this issue until you can confirm that you can reproduce it
with current versions of libc, gdb and Xenomai.
--
Gilles.
next prev parent reply other threads:[~2010-12-23 21:43 UTC|newest]
Thread overview: 34+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-12-21 17:30 [Xenomai-help] gdb/gdbserver hangs during rt_task_create Kolja Waschk
2010-12-21 20:03 ` Gilles Chanteperdrix
2010-12-22 9:30 ` Kolja Waschk
2010-12-22 12:11 ` Kolja Waschk
2010-12-22 12:38 ` Kolja Waschk
2010-12-22 13:50 ` Philippe Gerum
2010-12-22 14:14 ` Kolja Waschk
2010-12-22 14:17 ` Philippe Gerum
2010-12-22 14:20 ` Philippe Gerum
2010-12-22 15:25 ` Kolja Waschk
2010-12-22 15:29 ` Philippe Gerum
2010-12-22 17:18 ` Kolja Waschk
2010-12-22 18:13 ` Kolja Waschk
2010-12-22 18:28 ` Philippe Gerum
2010-12-22 19:00 ` Kolja Waschk
2010-12-23 8:53 ` Philippe Gerum
2010-12-23 21:43 ` Gilles Chanteperdrix [this message]
2010-12-23 21:55 ` Waschk,Kolja
2010-12-23 22:13 ` Gilles Chanteperdrix
2010-12-22 22:26 ` Gilles Chanteperdrix
2010-12-27 14:44 ` [Xenomai-help] gdb/gdbserver and pthread_cond_wait (was: gdb/gdbserver hangs...) Kolja Waschk
2010-12-27 16:31 ` Philippe Gerum
2010-12-27 16:53 ` Kolja Waschk
[not found] ` <alpine.DEB.1.10.1012271744460.20479@domain.hid>
2010-12-27 17:13 ` Philippe Gerum
2010-12-27 17:27 ` Kolja Waschk
2010-12-27 19:59 ` Philippe Gerum
2010-12-28 9:50 ` Kolja Waschk
2010-12-28 16:42 ` [Xenomai-help] gdb/gdbserver and pthread_cond_wait Gilles Chanteperdrix
2010-12-28 18:21 ` Kolja Waschk
2010-12-28 18:30 ` Kolja Waschk
2011-01-01 22:02 ` Gilles Chanteperdrix
[not found] <mailman.13966.1293037981.32598.xenomai@xenomai.org>
2010-12-22 23:06 ` [Xenomai-help] gdb/gdbserver hangs during rt_task_create Andreas Glatz
2010-12-22 23:10 ` Andreas Glatz
2010-12-23 9:09 ` 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=4D13C271.50101@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.