__xn_sys_current_info failed: Operation not permitted
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.
Regards,
Franz
Quoted 4 lines · Franz Engel
Hi,
I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permitted
Are you running this program with root privileges?
Signature · 1 line
Gilles.
Quoted 8 lines
Quoted 5 lines · Gilles
Franz wrote:
Hi,I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedAre you running this program with root privileges?
Yes.
--
Gilles.
Quoted 11 lines · Franz Engel
Quoted 8 lines
Quoted 5 lines · Gilles
Franz wrote:
Hi,I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedAre you running this program with root privileges?
Yes.
--
Gilles.
Could you post an example allowing us to reproduce the issue?
Signature · 1 line
Gilles.
Quoted 7 lines · Franz Engel
Hi,
I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedI know that the error comes from the
assert_nrt_inner(void)function inside theassert_context.cfile. But I have no idea what is the reason. The Operation not permitted is the return value fromXENOMAI_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?
Signature · 1 line
Philippe.
Quoted 5 lines · Philippe wrote:>> Franz Engel wrote:
Quoted 5 lines
Hi,
I get this error when I run a programm:
__xn_sys_current_info failed: Operation not permitted
Quoted 8 lines
Quoted 1 line
I know that the error comes from the
assert_nrt_inner(void)function inside theassert_context.cfile. But I have no idea what is the reason. The Operation not permitted is the return value fromXENOMAI_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=014898add6a697e1a0d69f9e20b910ade74f1940Do 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?
regards,
franz
Quoted 10 lines · Franz Engel
Quoted 7 lines · Philippe
Quoted 7 lines
Franz Engel wrote:
Hi,I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedI know that the error comes from the
assert_nrt_inner(void)function inside theassert_context.cfile. But I have no idea what is the reason. The Operation not permitted is the return value fromXENOMAI_SYSCALL1(__xn_sys_current_info, &info);. But I found no documentation about this function.
Quoted 9 lines
Quoted 5 lines
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=014898add6a697e1a0d69f9e20b910ade74f1940Do 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:
include/nucleus/compiler.h +4 -2
@@ -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 */
src/skins/common/rt_print.c +1 -1
@@ -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;
Signature · 1 line
Philippe.
Quoted 78 lines
________________________________
Von: Philippe Gerum <[email protected]>
An: Franz Engel <[email protected]>
CC: "[email protected]" <[email protected]>
Gesendet: 12:09 Freitag, 19.Juli 2013
Betreff: Re: [Xenomai]__xn_sys_current_infofailed: Operation not permittedQuoted 10 lines · Franz Engel
Quoted 7 lines · Philippe
Quoted 7 lines
Franz Engel wrote:
Hi,I get this error when I run a programm:
__xn_sys_current_infofailed: Operation not permittedI know that the error comes from the
assert_nrt_inner(void)function inside theassert_context.cfile. But I have no idea what is the reason. The Operation not permitted is the return value fromXENOMAI_SYSCALL1(__xn_sys_current_info, &info);. But I found no documentation about this function.Quoted 9 lines
Quoted 5 lines
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=014898add6a697e1a0d69f9e20b910ade74f1940Do 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:
include/nucleus/compiler.h +4
-2@@ -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 */src/skins/common/rt_print.c +1
-1@@ -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;Signature · 4 lines
-- 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.
Quoted 75 lines · Franz Engel
------------------------------------------------------------------------
*Von:* Philippe Gerum <[email protected]>
*An:* Franz Engel <[email protected]>
*CC:* "[email protected]" <[email protected]>
*Gesendet:* 12:09 Freitag, 19.Juli 2013
*Betreff:* Re: [Xenomai] __xn_sys_current_info failed: Operation not
permitted
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;Quoted 9 lines
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.Simply ignore the noclone spec when applying the patch manually. You should end up with the normal/high priority ctor at priority 200, the late one with an implicit, unspecified low priority.
Signature · 1 line
Philippe.
Quoted 75 lines · Franz Engel
------------------------------------------------------------------------
*Von:* Philippe Gerum <[email protected]>
*An:* Franz Engel <[email protected]>
*CC:* "[email protected]" <[email protected]>
*Gesendet:* 12:09 Freitag, 19.Juli 2013
*Betreff:* Re: [Xenomai] __xn_sys_current_info failed: Operation not
permitted
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;Quoted 9 lines
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.
Signature · 1 line
Philippe.
A message that is not in the archive (sent off-list or not yet received): [email protected]
A message that is not in the archive (sent off-list or not yet received): [email protected]
Von: Philippe Gerum <[email protected]>
An: Franz Engel <[email protected]>
Quoted 4 lines
Gesendet: 15:03 Montag, 22.Juli 2013
Betreff: Re: [Xenomai]__xn_sys_current_infofailed: Operation not permitted
Quoted 15 lines
Quoted 14 lines · Franz Engel
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_infofailed: Operation not permitted > >> >
>
>>> I know that the error comes from the assert_nrt_inner(void)
Quoted 13 lines
Quoted 12 lines
> function inside the
assert_context.cfile. 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:
Quoted 11 lines
Quoted 11 lines
>>http://git.xenomai.org/?p=xenomai-forge.git;a=commit;h=014898add6a697e1a0d69f9e20b910ade74f1940 > >
> >>Do you happen to callfork()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
Quoted 7 lines
Quoted 7 lines
> 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
Quoted 8 lines
Quoted 8 lines
> the
> root issue in your case:
>
> diff --gita/include/nucleus/compiler.hb/include/nucleus/compiler.h
> index 30f32c7..da4ea03 100644
> ---a/include/nucleus/compiler.h> +++
b/include/nucleus/compiler.h
Quoted 4 lines
Quoted 4 lines
> @@ -37,9 +37,11 @@
>
> #ifdef__IN_XENO__
> #if__GNUC__== 4 &&__GNUC_MINOR__== 6
Quoted 8 lines
Quoted 8 lines
> -#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)))
Quoted 12 lines
Quoted 4 lines
> +#define
__late_constructor____attribute__((constructor)) > #endif /* Gcc not 4.6 */
> #endif /* In xenomai */
>Quoted 8 lines
> diff --git
a/src/skins/common/rt_print.cb/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 voidforked_child_init(void)>spawn_printer_thread();
Quoted 15 lines
}
Quoted 14 lines
>
> -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 mycompiler.hthere is no line "#define__constructor__
> __attribute__((constructor,
noclone))". I use Xenomai 2.6.2.1.
Quoted 15 lines
Quoted 15 lines
>
With 2.6.2.1, you need the patch below applied, before applying the suggested work around:
6e89cb2287378a7dcbba987949d0168460dabbe7Bottom line is that all library constructor routines shall be tagged with the
__constructor__qualifier, exceptrt_print_initwhich should be
__late_constructor__instead. Otherwise the change makes no sense.--
Philippe.
Quoted 12 lines
Quoted 3 lines
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.
Signature · 1 line
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.