From: Paolo Minazzi <Paolo.Minazzi@mitrol.it>
To: xenomai@xenomai.org
Subject: Re: [Xenomai] Re : Sporadic problem : rt_task_sleep locked after debugging
Date: Fri, 03 May 2013 16:46:46 +0200 [thread overview]
Message-ID: <5183CDD6.80400@mitrol.it> (raw)
In-Reply-To: <51830D98.7090309@xenomai.org>
Il 03/05/2013 3.06, Gilles Chanteperdrix ha scritto:
> The problem, if I understand it correctly, is that timers are locked
> when you debug your application with gdb (which is correct), but do
> not restart when they should. What you have done here is essentially
> restart them upon any SIGSTOP or SIGINT, which means that the timers
> are in fact not stopped.
Hi Gilles, you understand correctly.
This is an other test that show that timer are locked.
I have also printed the following number :
xnarch_atomic_get(&nkpod->timerlck)
xnarch_atomic_get(&nkpod->timerlck) == 0 means unlocked
xnarch_atomic_get(&nkpod->timerlck) > 0 means locked
If I'm stopped with gdb I see 70 (ok, timers locked).
When I restart and all is OK I see 0 (zero, that is timer unlocked).
When I restart ad I have the bug I see 1(bug, I should see zero).
Sometimes, for some reason, timer remains locked.
This is the problem.
>
> What exactly do you do with gdb when the bug happens? Do you restart the
> application with "continue", do you detach de debugger with "detach" or
> something else?
To see the bug I have to
-1- start gdbserver
-2- start gdbclient
-3- handle SIG32 nostop noprint
-4- set brk point #1
-5- set brk point #2
-6- set brk point #3
-7- c to continue (start the program)
-8- it stops on brk point #3
-9- c to continue
-10- it stops on brk point #1
-11- c to continue
-12- it stops on brk point #2
-13- disable brk point #2
-14- c to continue
====> now timers are locked !
Maybe it is interesting that if I remove command -3-
-3- handle SIG32 nostop noprint
at point -12- I begin to receive SIG32 signals.
The SIG32 messages seems be due to detection of a new threads. In this
moment infact some thread are create.
Maybe these SIG32 signals make confusion.
> What you should do to understand what happens, is to enable the I-pipe
> tracer and trigger a trace freeze when you hit a point where you are
> sure the timers should have been restarted but have not. With enough
> backlog, you may have some luck finding back what happened.
>
> Regards.
>
I have tried but for me for now it is difficult to make a log at the bug
point.
Thanks
Paolo
next prev parent reply other threads:[~2013-05-03 14:46 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-05-02 13:49 [Xenomai] Re : Sporadic problem : rt_task_sleep locked after debugging Paolo Minazzi
2013-05-03 1:06 ` Gilles Chanteperdrix
2013-05-03 14:46 ` Paolo Minazzi [this message]
2013-05-08 8:03 ` Paolo Minazzi
2013-05-08 12:58 ` Gilles Chanteperdrix
[not found] ` <518A505C.2090207@mitrol.it>
[not found] ` <518A52A7.5000801@xenomai.org>
[not found] ` <518A5600.20508@mitrol.it>
2013-05-08 14:30 ` Paolo Minazzi
2013-05-08 14:43 ` Gilles Chanteperdrix
2013-05-08 16:06 ` Philippe Gerum
2013-05-08 16:10 ` Philippe Gerum
2013-05-09 13:36 ` Philippe Gerum
2013-05-09 13:52 ` Paolo Minazzi
2013-05-09 13:58 ` Gilles Chanteperdrix
2013-05-09 14:04 ` Philippe Gerum
2013-05-09 14:08 ` Philippe Gerum
2013-05-10 6:47 ` Paolo Minazzi
2013-06-17 7:20 ` Philippe Gerum
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=5183CDD6.80400@mitrol.it \
--to=paolo.minazzi@mitrol.it \
--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.