All of lore.kernel.org
 help / color / mirror / Atom feed
From: Pierre.QUELIN@solystic.com
To: gilles.chanteperdrix@xenomai.org
Cc: xenomai@xenomai.org
Subject: Re: [Xenomai-help] debug posix skin - pthread_cond_wait return EPERM
Date: Fri, 21 Jan 2011 09:43:22 +0100	[thread overview]
Message-ID: <OF53B8EEE0.69903FD4-ONC125781F.002A9283-C125781F.002FEBD2@domain.hid> (raw)

[-- Attachment #1: Type: text/plain, Size: 2859 bytes --]



> 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
>>
>> 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?
>
> Ok, I get the failure if I set up a breakpoint right after the call to
> pthread_cond_wait, as noted by Pierre. After some debugging, it appears
> that the syscall is restarted whereas it should return to user-spacce
> and let the user-space skin do its job. So, it seems that somehow, the
> behaviour is different for gdb signals than for usual signals.
>
> Working on it now, will tell you when we have a status.

The following patch seems to fix the issue, but I am not yet sure
whether it is really correct:

diff --git a/ksrc/nucleus/shadow.c b/ksrc/nucleus/shadow.c
index d27494c..717a8a0 100644
--- a/ksrc/nucleus/shadow.c
+++ b/ksrc/nucleus/shadow.c
@@ -770,7 +770,7 @@ static inline void request_syscall_restart(xnthread_t
*thread,
                         if (__xn_interrupted_p(regs)) {
                                     __xn_error_return(regs,
                                                               (sysflags &
__xn_exec_norestart) ?
-
-ERESTARTNOHAND : -ERESTARTSYS);
+                                                              -EINTR :
-ERESTARTSYS);
                                     notify = !xnthread_test_state(thread,
XNDEBUG);
                         }



--
                                                                Gilles.

Sorry but I'm a novice.

As I understand, your patch is a kernel patch and I need to rebuild the
kernel package.
Where can I find the cond-torture-posix application to reproduce the
problem with your test case ?
My PC is a very standard one (Xeon dual core and my distro an Ubuntu 10.10
so I think it's very easy to reproduce the test case.
Do you know if there is a bug tracker where tickets are logged to be
informed when this point will be solved ?

Thank you for you help.

Pierre Quélin

[-- Attachment #2: Type: text/html, Size: 3717 bytes --]

             reply	other threads:[~2011-01-21  8:43 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-01-21  8:43 Pierre.QUELIN [this message]
2011-01-22 14:39 ` [Xenomai-help] debug posix skin - pthread_cond_wait return EPERM Gilles Chanteperdrix
  -- strict thread matches above, loose matches on Subject: below --
2011-01-24 14:57 Pierre.QUELIN
2011-01-20  8:03 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
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

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=OF53B8EEE0.69903FD4-ONC125781F.002A9283-C125781F.002FEBD2@domain.hid \
    --to=pierre.quelin@solystic.com \
    --cc=gilles.chanteperdrix@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.