All of lore.kernel.org
 help / color / mirror / Atom feed
From: Helder Daniel <hdaniel@ualg.pt>
To: Philippe Gerum <rpm@xenomai.org>
Cc: "Xenomai@xenomai.org" <Xenomai@xenomai.org>
Subject: Re: [Xenomai] Xenomai/cobalt: low_init(): binding failed: Function not implemented error issued when trting to run latency app on xeno 3.x-rc3
Date: Wed, 4 Mar 2015 14:25:03 +0000	[thread overview]
Message-ID: <CAKk99t3K=+Eo+Z_+nPEgi6FNWzg8gigZGfMnVW3Ap+XkVb5aTg@mail.gmail.com> (raw)
In-Reply-To: <54F6EF2E.1090705@xenomai.org>

I reinstalled xenomai with pshared enabled but it still do not work.
Second process gives now a segmentation fault when trying to bind.
If executed with --no-registry (it will not bind of course) but it does not
segment fault also.

/usr/xenomai/sbin/version -a
Xenomai/mercury v3.0-rc3 --
Target: i686-pc-linux-gnu
Compiler: gcc version 4.7.2 (Debian 4.7.2-5)
Build args:  '--with-core=mercury' '--enable-registry' '--enable-pshared'
'--prefix=/usr/xenomai'


On 4 March 2015 at 11:40, Philippe Gerum <rpm@xenomai.org> wrote:

> On 03/04/2015 12:21 PM, Helder Daniel wrote:
> > Ok.
> > This way I can recover registry.
> > I did not find yet when and why registry crashes.
> > If I found the scenario I'll report it.
> >
> > Meanwhile I am having roubles binding to a semaphore created in one
> > process, from another process.
> > I used a simple demo app to show what is happening (full source code
> > attached)
> >
> > From one process (creator.c) a semaphore is created and binded by its
> > registry name "namedSem":
> >
> > rt_task_shadow (&task, "creatorTask", 20, 0);
> > rt_sem_create(&sem, "namedSem", 0, S_FIFO);
> > rt_sem_bind(&sem, "namedSem", TM_INFINITE);
> > for (;;) sleep (100);
> >
> > So all ok here.
> >
> > Now keeping creator.c running in an xterm and trying to bind to this
> > semaphore from another process (binder.c), from another xterm, it does
> > not work:
> >
> > rt_task_shadow (&task, "binderTask", 20, 0);
> > rt_sem_bind(&sem, "namedSem", TM_INFINITE);
> >
> > rt_sem_bind() never binds to the semaphore "namedSem".
> > It seams it does not find it.
> > If a timeout is set:
> >
> > err=rt_sem_bind(&sem, "namedSem", TM_INFINITE);
> >
> > it returns with error -110 (ETIMEDOUT)
> >
> > But the semaphore exists in registry:
> >
> > $> cat /var/run/xenomai/anon/4267/alchemy/semaphores/namedSem
> > =0
> >
> > I think on version 2.5.x a named object is global to the system.
> > So when creating a semaphore named "namedSem" by a process it is visible
> > for all other processes.
> >
> > Maybe in 3.x semaphores (and other objects) are local to processes?
> > Since they are stored in the registry under the pid of the creator
> process?
>
> With 3.x, --enable-pshared must be passed to enable object sharing
> between processes. The actual registry is not maintained in kernel space
> anymore, so the support libraries have to know whether they should
> maintain it.
>
> --
> Philippe.
>



-- 
Helder Daniel
UALG - FCT
DEEI

http://w3.ualg.pt/~hdaniel

  reply	other threads:[~2015-03-04 14:25 UTC|newest]

Thread overview: 43+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-03  8:49 [Xenomai] Xenomai/cobalt: low_init(): binding failed: Function not implemented error issued when trting to run latency app on xeno 3.x-rc3 Helder Daniel
2015-03-03 10:17 ` Philippe Gerum
     [not found]   ` <CAKk99t3_g0ZODEe32KGAzfHckWC=-Gqr6CrFa5yRh-hLF5Ttow@mail.gmail.com>
2015-03-03 13:59     ` Philippe Gerum
2015-03-03 14:07       ` Philippe Gerum
2015-03-03 14:58         ` Helder Daniel
2015-03-03 15:03           ` Helder Daniel
2015-03-03 15:03           ` Philippe Gerum
2015-03-03 15:40             ` Helder Daniel
2015-03-03 15:44               ` Philippe Gerum
2015-03-03 16:38                 ` Helder Daniel
2015-03-03 17:03                   ` Philippe Gerum
2015-03-03 17:06                     ` Philippe Gerum
2015-03-03 17:23                       ` Helder Daniel
2015-03-03 19:24                         ` Philippe Gerum
2015-03-03 19:31                           ` Philippe Gerum
2015-03-03 19:50                             ` Helder Daniel
2015-03-03 20:09                               ` Philippe Gerum
     [not found]                                 ` <CAKk99t0Xh01uxG7jd=oEDD71LBHvTnbCnejwiP2bzGN63Yo-ZA@mail.gmail.com>
2015-03-04  8:40                                   ` Philippe Gerum
2015-03-04 11:21                                     ` Helder Daniel
2015-03-04 11:40                                       ` Philippe Gerum
2015-03-04 14:25                                         ` Helder Daniel [this message]
2015-03-04 14:29                                           ` Philippe Gerum
2015-03-04 15:26                                             ` Helder Daniel
2015-03-04 17:18                                               ` Philippe Gerum
2015-03-04 23:30                                                 ` Helder Daniel
2015-03-15 16:20                                                   ` Philippe Gerum
2015-03-16 18:58                                                     ` Helder Daniel
2015-03-16 19:21                                                       ` Philippe Gerum
2015-03-17 15:30                                                         ` Philippe Gerum
     [not found]                                                         ` <CAKk99t2ZsNmY4myJAF+H3hWNpHN4bVm255QEsU6Nu+ytG-B0dA@mail.gmail.com>
     [not found]                                                           ` <550837E2.9050701@xenomai.org>
     [not found]                                                             ` <CAKk99t2eGYME0BsLCjJV7VMm8VU_2okmpd8sYfMb_02sTvOfLQ@mail.gmail.com>
     [not found]                                                               ` <55083DA4.3080201@xenomai.org>
     [not found]                                                                 ` <CAKk99t0pG6HWOucFXDw1-_5-=EGQ7faqA22yVog6Ye6TcGjevA@mail.gmail.com>
     [not found]                                                                   ` <550850D5.9060207@xenomai.org>
     [not found]                                                                     ` <CAKk99t0q3iNcah1Us79hJUjjHQCr2rEPu9gukSNjO2a6+Gk3sg@mail.gmail.com>
     [not found]                                                                       ` <CAKk99t3wP-WLemoO_bbsvE4uwh-Sh-5eGPJrM=6cAc5edyQW5Q@mail.gmail.com>
     [not found]                                                                         ` <5508600D.4020500@xenomai.org>
2015-03-17 17:19                                                                           ` Helder Daniel
2015-03-19 17:23                                                                             ` Philippe Gerum
2015-03-19 18:29                                                                               ` Philippe Gerum
2015-03-23 10:59                                                                                 ` Helder Daniel
2015-03-23 11:01                                                                                   ` Helder Daniel
2015-03-23 11:16                                                                                   ` Philippe Gerum
2015-03-23 11:47                                                                                     ` Helder Daniel
2015-03-23 11:47                                                                                       ` Helder Daniel
2015-03-23 12:11                                                                                         ` Helder Daniel
2015-03-23 13:21                                                                                         ` Philippe Gerum
2015-03-23 13:55                                                                                           ` Helder Daniel
2015-03-30 16:51                                                                                             ` Helder Daniel
2015-03-31  7:27                                                                                               ` Philippe Gerum
2015-03-31 10:04                                                                                                 ` Helder Daniel

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='CAKk99t3K=+Eo+Z_+nPEgi6FNWzg8gigZGfMnVW3Ap+XkVb5aTg@mail.gmail.com' \
    --to=hdaniel@ualg.pt \
    --cc=Xenomai@xenomai.org \
    --cc=rpm@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.