Skip to contentSkip to conversation

Getting started with Xenomai, installing on Debian, problem with sysregd

DISCUSSION [email protected] 1 participant 1 message May 17, 2019 1 message not in the archive

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

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 [email protected]:

Quoted 86 lines

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.