From: Gilles Chanteperdrix <gilles.chanteperdrix@xenomai.org>
To: xenoka09@domain.hid
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] debug posix skin - pthread_cond_wait return EPERM
Date: Thu, 20 Jan 2011 18:30:48 +0100 [thread overview]
Message-ID: <4D387148.3030306@domain.hid> (raw)
In-Reply-To: <alpine.DEB.1.10.1101201811090.1990@domain.hid>
Kolja Waschk wrote:
>>> file cond-torture-posix
>> Ok. On my side: I call set solib-absolute-prefix to where the debug
>> binaries for the target filesystem are. And I call
>> handle SIG34 nostop noprint pass.
>>
>> Coud you try and do the same?
>
> Is SIG34 the same on blackfin? I do not remember ever having seen SIG34, only
> SIG32 ("Real-time event 32")
>
> Independent of that, the result is always the same SEGV. I cannot use the absolute-prefix currently, as the directory layout is different on the target. So my script is now
Ok. I tried cond-torture-posix without set-solib-absolute prefix, or
without handle SIG34, added the "break main". Everything runs fine.
So, I am afraid you are on you own if you want to debug this.
>
> set solib-absolute-prefix notexistent
> set solib-search-path /opt/uClinux/blackfin-linux-dist/staging/usr/lib:/opt/uClinux/bfin-linux-uclibc/bfin-linux-uclibc/runtime/lib
> file cond-torture-posix
> handle SIG34 nostop noprint pass
> target remote 10.0.10.9:2222
>
> And regardless whether I add an "break main", the SEGV will occur immediately after telling gdb to "cont".
>
> Does my "try.c" always succeed (all errbits=0x0010) in your environment?
I was reluctant to try, because for me cond-torture-posix should be the
reference, and the program is bogus in the way it handles
pthread_cond_wait errors, as I already explained, and may have bugs
which may escape at first sight (for instance, there is a race with the
sleep(1) and the time it takes to start the threads, which may well byte
you when running under gdb). Anyway, I tried, and it works like a charm,
however it appears to me now that you are clearly mis-compiling this
program, since you should be using #include <pthread.h>, instead of
#include <posix/pthread.h>, and more importantly, this program is
missing a call to mlockall without which it can not possibly run under
Xenomai.
So, to settle the matters, could you post here the result of
"bfin-linux-uclibc-nm -s try".
?
--
Gilles.
next prev parent reply other threads:[~2011-01-20 17:30 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-01-20 8:03 [Xenomai-help] debug posix skin - pthread_cond_wait return EPERM Pierre.QUELIN
2011-01-20 8:28 ` Kolja Waschk
2011-01-20 14:55 ` Gilles Chanteperdrix
2011-01-20 16:44 ` Kolja Waschk
2011-01-20 16:56 ` Gilles Chanteperdrix
2011-01-20 17:16 ` Kolja Waschk
2011-01-20 17:30 ` Gilles Chanteperdrix [this message]
2011-01-20 18:57 ` Waschk,Kolja
2011-01-20 19:09 ` Gilles Chanteperdrix
2011-01-20 19:22 ` Waschk,Kolja
2011-01-21 13:09 ` Kolja Waschk
2011-01-21 14:12 ` Philippe Gerum
2011-01-21 11:25 ` Kolja Waschk
2011-01-24 12:31 ` Gilles Chanteperdrix
2011-01-25 8:53 ` Kolja Waschk
2011-01-25 8:51 ` Gilles Chanteperdrix
2011-01-25 8:55 ` Gilles Chanteperdrix
2011-01-25 9:06 ` Kolja Waschk
2011-01-20 18:36 ` Gilles Chanteperdrix
2011-01-20 19:13 ` Gilles Chanteperdrix
2011-01-21 12:03 ` Kolja Waschk
2011-01-21 14:00 ` Philippe Gerum
2011-01-21 14:16 ` Kolja Waschk
2011-01-22 15:07 ` Gilles Chanteperdrix
2011-01-22 15:20 ` Gilles Chanteperdrix
2011-01-20 17:33 ` [Xenomai-help] gpio Cagnulein
2011-01-20 17:55 ` Gilles Chanteperdrix
-- strict thread matches above, loose matches on Subject: below --
2011-01-21 8:43 [Xenomai-help] debug posix skin - pthread_cond_wait return EPERM Pierre.QUELIN
2011-01-22 14:39 ` Gilles Chanteperdrix
2011-01-24 14:57 Pierre.QUELIN
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=4D387148.3030306@domain.hid \
--to=gilles.chanteperdrix@xenomai.org \
--cc=xenoka09@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.