From: Philippe Gerum <rpm@xenomai.org>
To: Kolja Waschk <xenoka09@domain.hid>
Cc: Xenomai GNA <xenomai@xenomai.org>
Subject: Re: [Xenomai-help] gdb/gdbserver and pthread_cond_wait (was: gdb/gdbserver hangs...)
Date: Mon, 27 Dec 2010 17:31:24 +0100 [thread overview]
Message-ID: <1293467484.1856.0.camel@domain.hid> (raw)
In-Reply-To: <alpine.DEB.1.10.1012271521010.20479@domain.hid>
On Mon, 2010-12-27 at 15:44 +0100, Kolja Waschk wrote:
> Hi,
>
> I've made up a small test program for my issue with pthread_cond_wait and gdb.
> Sorry for posting code again, I've made it as compact as possible.
>
> The behaviour of the attached program depends on whether it is run via
> gdbserver or without.
The test code creates SCHED_OTHER threads. This is likely not what you
wanted to do.
>
>
> When run via gdbserver, the pthread_cond_wait sometimes returns EPERM:
>
> > Remote debugging from host 10.0.10.10
> > T0: pthread_cond_wait: 1
> > ... repeats for T0 and T1 ...
> > T1: pthread_cond_wait: 1
> > T1: pthread_cond_wait: 1
> > T0: pthread_cond_wait: 1
> > T2: pthread_cond_wait: 0
> > Child exited with retcode = 0
>
>
> Started directly, it prints what I would expect:
>
> > T0: pthread_cond_wait: 0
> > T1: pthread_cond_wait: 0
> > T2: pthread_cond_wait: 0
>
>
> Am I missing something when configuring the threads, cond variable etc.?
>
> About my environment:
>
> - Xenomai 2.5.5.2, unmodified
> - blackfin FDPIC toolchain 2010R1-RC4 (gcc 4.3.5, gdb 6.6, gdbserver 6.5)
> - blackfin-linux-dist 2010R1-RC5 (kernel 2.6.34 with I-pipe upgraded to 1.15-01)
>
>
> I compile "try.c" with the following command line:
>
> bfin-linux-uclibc-gcc \
> -I/opt/uClinux/blackfin-linux-dist/staging/usr/include \
> -L/opt/uClinux/blackfin-linux-dist/staging/usr/lib \
> -Wl,@/opt/uClinux/blackfin-linux-dist/staging/usr/lib/posix.wrappers \
> -g -fPIC -fmessage-length=0 -mfast-fp -D_GNU_SOURCE -D_REENTRANT -D__XENO__ \
> -o try try.c -lxenomai -lpthread_rt
>
>
> The gdb script contains only a few commands:
>
> set verbose on
> 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 try
> target remote 10.0.10.9:2222
> break main
> cont
> cont
>
>
> The pthread_cond_wait, returning EPERM immediately, causes a lockup in a
> program that I'm trying to debug (see old thread about gdb/gdbserver hanging).
> I currently know no measure against this behaviour other than to sleep for a
> while in that case...
>
> Thanks for any hints!
> Kolja
> _______________________________________________
> Xenomai-help mailing list
> Xenomai-help@domain.hid
> https://mail.gna.org/listinfo/xenomai-help
--
Philippe.
next prev parent reply other threads:[~2010-12-27 16:31 UTC|newest]
Thread overview: 31+ 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
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 [this message]
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
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=1293467484.1856.0.camel@domain.hid \
--to=rpm@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.