All of lore.kernel.org
 help / color / mirror / Atom feed
From: Franz Engel <franz_lambert_engel@yahoo.de>
To: Philippe Gerum <rpm@xenomai.org>
Cc: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] __xn_sys_current_info failed: Operation not permitted
Date: Mon, 22 Jul 2013 15:29:44 +0100 (BST)	[thread overview]
Message-ID: <1374503384.91881.YahooMailNeo@web172206.mail.ir2.yahoo.com> (raw)
In-Reply-To: <51ED2DA8.2060307@xenomai.org>

Von: Philippe Gerum <rpm@xenomai.org>

An: Franz Engel <franz_lambert_engel@yahoo.de> 
>Gesendet: 15:03 Montag, 22.Juli 2013
>Betreff: Re: [Xenomai] __xn_sys_current_info failed: Operation not permitted
> 
>
>On 07/22/2013 02:10 PM, Franz Engel wrote:
>>
>>
>>     On 07/19/2013 12:57 PM, Franz Engel wrote:
>>
>>      >
>>      >    On 07/19/2013 11:49 AM, Franz Engel wrote:
>>      >      > Philippe wrote:
>>      >      >>> Franz Engel wrote:
>>      > >>> Hi,
>>      >      >> >
>>      >      >>> I get this error when I run a programm:
>>      >      >>> __xn_sys_current_info failed: Operation not permitted
>>      >      >> >
>>      > 
     >>> I know that the error comes from the assert_nrt_inner(void)
>>      >    function inside the assert_context.c file. But I have no idea what
>>      >    is the reason. The Operation not permitted is the return value
>>     from
>>      >    XENOMAI_SYSCALL1(__xn_sys_current_info, &info);. But I found no
>>      >    documentation about this function.
>>      >      >
>>      >      >
>>      >      >>This is reminiscent of a symptom observed for a bug fixed
>>     in the
>>      >    -forge
>>      >      >>tree, a while ago:
>>     
 >
>>      >>http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=014898add6a697e1a0d69f9e20b910ade74f1940
>>      >      >
>>      >      >>Do you happen to call fork() in your  application?
>>      >      >
>>      >      > Yes. I do? What I can do to solve the problem. Should I
>>     try to modify
>>      >      > the xenomai files as discrept in the git-link?
>>      >      >
>>      >
>>      >    I'm unsure, although this would be possible to backport
>>    
 portions of the
>>      >    logic, the implementation has now diverged significantly
>>     between the
>>      >    2.x
>>      >    and 3.x code bases.
>>      >
>>      >    Could you try the patch below? It's untested, but should work
>>     around
>>      >    the
>>      >    root issue in your case:
>>      >
>>      >    diff --git a/include/nucleus/compiler.h
>>     b/include/nucleus/compiler.h
>>      >    index 30f32c7..da4ea03 100644
>>      >    --- a/include/nucleus/compiler.h
>>      >    +++
 b/include/nucleus/compiler.h
>>      >    @@ -37,9 +37,11 @@
>>      >
>>      >        #ifdef __IN_XENO__
>>      >        #if __GNUC__ == 4 && __GNUC_MINOR__ == 6
>>      >    -#define __constructor__ __attribute__((constructor, noclone))
>>      >    +#define __constructor__ __attribute__((constructor(200),
>>     noclone))
>>      >    +#define __late_constructor__ __attribute__((constructor,
>>     noclone))
>>      >        #else /* Gcc not 4.6 */
>>      >    -#define __constructor__ __attribute__((constructor))
>>      >   +#define __constructor__
 __attribute__((constructor(200)))
>>      >    +#define __late_constructor__ __attribute__((constructor))
>>      >        #endif /* Gcc not 4.6 */
>>      >        #endif /* In xenomai */
>>      >
>>      >    diff --git a/src/skins/common/rt_print.c
>>     b/src/skins/common/rt_print.c
>>      >    index dfa8b33..e056cd6 100644
>>      >    --- a/src/skins/common/rt_print.c
>>      >    +++ b/src/skins/common/rt_print.c
>>      >    @@ -738,7 +738,7 @@ static void forked_child_init(void)
>>      >                spawn_printer_thread();
>>     
 >    }
>>      >
>>      >    -static __constructor__ void __rt_print_init(void)
>>      >    +static __late_constructor__ void __rt_print_init(void)
>>      >        {
>>      > const char *value_str;
>>      >            unsigned long long period;
>>      >
>>      >    --
>>      >    Philippe.
>>      >
>>      >    I tried the patch. But I think it is not the correct version of
>>      >    xenomai. In my compiler.h there is no line "#define
>>     __constructor__
>>      >    __attribute__((constructor,
 noclone))". I use Xenomai 2.6.2.1.
>>      >
>>
>>     With 2.6.2.1, you need the patch below applied, before applying the
>>     suggested work around:
>>     6e89cb2287378a7dcbba987949d0168460dabbe7
>>
>>     Bottom line is that all library constructor routines shall be tagged
>>     with the __constructor__ qualifier, except rt_print_init which
>>     should be
>>     __late_constructor__ instead. Otherwise the change makes no sense.
>>
>>     --
>>     Philippe.
>>
>>
>> O.k. I used the revision "6e89cb2287378a7dcbba987949d0168460dabbe7" and
>> I use the patch (the workaround). But the failure is still the same. Any
>> other idea?
>
>Do you mention --with-__thread in your configuration line? If so, please 
>retry without.
>
>-- 
>Philippe.
>
>
>
Do you 
mean the configuration for xenomai befor I install it? I don't use any 
parameter. Is there a way to trace such a failure. I get the error from a programm, that is not developed be my selfe.


      parent reply	other threads:[~2013-07-22 14:29 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-07-18 10:24 [Xenomai] __xn_sys_current_info failed: Operation not permitted Franz Engel
2013-07-18 11:09 ` Gilles Chanteperdrix
2013-07-18 11:21   ` Franz Engel
2013-07-18 11:22     ` Gilles Chanteperdrix
2013-07-19  9:02 ` Philippe Gerum
2013-07-19  9:49   ` Franz Engel
2013-07-19 10:09     ` Philippe Gerum
2013-07-19 10:57       ` Franz Engel
2013-07-19 13:22         ` Philippe Gerum
2013-07-22  7:37         ` Philippe Gerum
     [not found]           ` <1374495002.37795.YahooMailNeo@web172201.mail.ir2.yahoo.com>
     [not found]             ` <51ED2DA8.2060307@xenomai.org>
2013-07-22 14:29               ` Franz Engel [this message]

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=1374503384.91881.YahooMailNeo@web172206.mail.ir2.yahoo.com \
    --to=franz_lambert_engel@yahoo.de \
    --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.