All of lore.kernel.org
 help / color / mirror / Atom feed
* Getting started with Xenomai, installing on Debian, problem with sysregd
@ 2019-05-16 21:56 cern
  0 siblings, 0 replies; 2+ messages in thread
From: cern @ 2019-05-16 21:56 UTC (permalink / raw)
  To: xenomai


Hello,
I am getting into Xenomai world by installing co-kernel onto new netinstall (with Desktop) Debian 10 installation with kernel version 4.14.111, I-pipe version  ipipe-core-4.14.111-x86-3.patch and Xenomai branch stable/v3.0.x installed as a Debian packages by use of the Xenomai Debian folder. (Based on Installation guide from Xenomai wiki and couple articles found on the web.)

The installation of kernel patched package is without problem. Installation of Xenomai library packages is also uneventful. I modified the debian/rules file:

CONFIG_OPTS = --prefix=/usr \
            --includedir=/usr/include/xenomai \
            --mandir=/usr/share/man \
            --with-testdir=/usr/lib/xenomai/testsuite \
            --enable-smp \
            --enable-pshared \
            --enable-registry \
            --with-core=cobalt \
            --with-pic

And I am able to run latency test both as a root and as a regular user (who is member of the xenomai group).

Then I tried simple test:

#include <stdio.h>
#include <stdbool.h>
#include <xenomai/init.h>
#include <alchemy/task.h>
#include <xenomai/tunables.h>

RT_TASK task;
RT_TASK loop_task;

void loop_task_task(void *arg)
{
RT_TASK *currtask;
currtask = rt_task_self();
rt_task_set_periodic(currtask, TM_NOW, 100000);
RTIME then = rt_timer_read();
  while(true){
    printf("Loop time: %.5f ms\n", (rt_timer_read() - then)/1000000.0);
    rt_task_wait_period(NULL);
  }
}

int main(int argc, char *const *argv) {

set_runtime_tunable(verbosity_level,10);

int retval;
retval = rt_task_create(&task,"First",0,98,0);
printf("%i return on create\n",retval);


retval = rt_task_create(&loop_task, "loop_task", 0,99,0);
retval = rt_task_start(&loop_task,loop_task_task, NULL);
pause();
retval = rt_task_delete(&loop_task);
retval += rt_task_delete(&task);
printf("%i return on delete\n",retval);
printf("%s", "END");
return 0;
}

Which run as a root without problem, but with regular user there is a problem of:

sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
   0"600.015| WARNING: [main] cannot connect to registry daemon
   0"600.059| WARNING: [main] setup call copperplate failed
   0"600.072| BUG in __xenomai_init(): [main] initialization failed, EAGAIN

When run as regular user with --no-registry, it again run.

Looking at the registry when run as a root also gives odd info about tasks, respectively gives no info (readable). Only info is given on system in system folder.

The First file in tasks opened with nano gives:

^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$

Also, under the /var/run/xenomai/root/ there seems to hang tasks which should already be deleted.

>From https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons <https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons> I tried the 
$ ps -eo 'tty,pid,comm' | grep ^?
but see no sysregd. Is there way to determine if sysregd works correctly?

Thank you,
Cern.



^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Getting started with Xenomai, installing on Debian, problem with sysregd
       [not found] <Lf1YPs7--3-1@tuta.io-Lf1dcBR--3-1>
@ 2019-05-17  3:09 ` cern
  0 siblings, 0 replies; 2+ messages in thread
From: cern @ 2019-05-17  3:09 UTC (permalink / raw)
  To: Cern; +Cc: Xenomai

OK, the lingerings seem to be caused by me being an idiot and not knowing exactly what pause() does. Other issues stand.

C.


May 16, 2019, 11:56 PM by xenomai@xenomai.org:

>
> Hello,
> I am getting into Xenomai world by installing co-kernel onto new netinstall (with Desktop) Debian 10 installation with kernel version 4.14.111, I-pipe version  ipipe-core-4.14.111-x86-3.patch and Xenomai branch stable/v3.0.x installed as a Debian packages by use of the Xenomai Debian folder. (Based on Installation guide from Xenomai wiki and couple articles found on the web.)
>
> The installation of kernel patched package is without problem. Installation of Xenomai library packages is also uneventful. I modified the debian/rules file:
>
> CONFIG_OPTS = --prefix=/usr \
>             --includedir=/usr/include/xenomai \
>             --mandir=/usr/share/man \
>             --with-testdir=/usr/lib/xenomai/testsuite \
>             --enable-smp \
>             --enable-pshared \
>             --enable-registry \
>             --with-core=cobalt \
>             --with-pic
>
> And I am able to run latency test both as a root and as a regular user (who is member of the xenomai group).
>
> Then I tried simple test:
>
> #include <stdio.h>
> #include <stdbool.h>
> #include <xenomai/init.h>
> #include <alchemy/task.h>
> #include <xenomai/tunables.h>
>
> RT_TASK task;
> RT_TASK loop_task;
>
> void loop_task_task(void *arg)
> {
> RT_TASK *currtask;
> currtask = rt_task_self();
> rt_task_set_periodic(currtask, TM_NOW, 100000);
> RTIME then = rt_timer_read();
>   while(true){
>     printf("Loop time: %.5f ms\n", (rt_timer_read() - then)/1000000.0);
>     rt_task_wait_period(NULL);
>   }
> }
>
> int main(int argc, char *const *argv) {
>
> set_runtime_tunable(verbosity_level,10);
>
> int retval;
> retval = rt_task_create(&task,"First",0,98,0);
> printf("%i return on create\n",retval);
>
>
> retval = rt_task_create(&loop_task, "loop_task", 0,99,0);
> retval = rt_task_start(&loop_task,loop_task_task, NULL);
> pause();
> retval = rt_task_delete(&loop_task);
> retval += rt_task_delete(&task);
> printf("%i return on delete\n",retval);
> printf("%s", "END");
> return 0;
> }
>
> Which run as a root without problem, but with regular user there is a problem of:
>
> sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
> sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
> sysregd: create_directory_recursive("/var/run/xenomai/orion/anon@684"): Permission denied
>    0"600.015| WARNING: [main] cannot connect to registry daemon
>    0"600.059| WARNING: [main] setup call copperplate failed
>    0"600.072| BUG in __xenomai_init(): [main] initialization failed, EAGAIN
>
> When run as regular user with --no-registry, it again run.
>
> Looking at the registry when run as a root also gives odd info about tasks, respectively gives no info (readable). Only info is given on system in system folder.
>
> The First file in tasks opened with nano gives:
>
> ^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@^@$
>
> Also, under the /var/run/xenomai/root/ there seems to hang tasks which should already be deleted.
>
> From > https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons <https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons>>  <> https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons <https://unix.stackexchange.com/questions/175380/how-to-list-all-running-daemons>> > I tried the 
> $ ps -eo 'tty,pid,comm' | grep ^?
> but see no sysregd. Is there way to determine if sysregd works correctly?
>
> Thank you,
> Cern.
>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2019-05-17  3:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <Lf1YPs7--3-1@tuta.io-Lf1dcBR--3-1>
2019-05-17  3:09 ` Getting started with Xenomai, installing on Debian, problem with sysregd cern
2019-05-16 21:56 cern

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.