All of lore.kernel.org
 help / color / mirror / Atom feed
From: Frederik Bayart <frederik_bayart@yahoo.co.uk>
To: "xenomai@xenomai.org" <xenomai@xenomai.org>
Subject: Re: [Xenomai] xenomai-3.0-rc5 : binding named semaphores from external process
Date: Tue, 28 Jul 2015 15:19:11 +0000 (UTC)	[thread overview]
Message-ID: <1320019080.4249709.1438096751088.JavaMail.yahoo@mail.yahoo.com> (raw)
In-Reply-To: <55A7CF2E.40508@xenomai.org>

>> ./stest --session=foo 1
>>
>> The first process binds to the named semaphore which is not yet created. According to the description of rt_sem_bind,  if the object does not exist on entry, the caller may block until a semaphore of the given name is created.
>>
>> So based on this description, I would I expect that if the second process is started, the first process would bind and continue and blocks in the p operation. The same for the 2nd process. Is this correct ? At the moment, if I start the 2nd process, I get a segfault in rt_sem_create :
>>
>> [ 9758.887921] [Xenomai] switching main to secondary mode after exception #14 from user-space at 0x7f6ad8c4a43e (pid 9256)
>> [ 9758.887930] main[9256]: segfault at 7f903bf6e038 ip 00007f6ad8c4a43e sp 00007fffbd2c2eb8 error 6 in libcobalt.so.2.0.0[7f6ad8c3d000+1e000]
>>
>
>Looking at the copperplate code, yep, this definitely can't work. Ok,
>queued.

I noticed also :

 ./stest --session=foo 1
 ./stest --session=foo 0

Both processes are waiting in rt_sem_p . The first process catches SIGINT, the second doesn't. If you press CTRL+C on the second process it stops but also the first process is falling through the rt_sem_p although no rt_sem_v is raised. At that moment no process is pending on rt_sem_p anymore. But if you do then a rt_sem_inquire, nwaiters is still 1.
>
>>
>> 2)
>>
>> The fuse filesystem is not unmounted. This is because in xenomai-3.0-rc5/lib/copperplate/regd/regd.c the fullpath is hardcoded to fusermount and umount
>>
>> I could fixed it, with the diff below. It's not clear to me why access of umount is tested and not from fusermount.
>>
>
>Piping the "which" output seems seriously overkill. Besides, we don't
>want to rely on the environment to find those paths, we are running with
>supervisor privileges (i.e. we don't want to run what the user tells us
>what "umount" should be, but rather what the distro actually says
>"umount" is).
>
>Per LSB 3.0, /bin/umount would be the place to find this, so basically,
>testing a couple of reasonable locations should be enough.
>
>
>-- 
>Philippe.

  reply	other threads:[~2015-07-28 15:19 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-07-13 13:37 [Xenomai] xenomai-3.0-rc5 : binding named semaphores from external process Frederik Bayart
2015-07-14  9:53 ` Philippe Gerum
2015-07-15 12:45   ` Frederik Bayart
2015-07-16 15:35     ` Philippe Gerum
2015-07-28 15:19       ` Frederik Bayart [this message]
2015-07-29 10:12         ` Philippe Gerum
2015-07-29 11:48           ` Frederik Bayart
2015-07-29 12:20             ` Philippe Gerum
2015-07-29 12:28             ` Philippe Gerum
2015-07-29 12:48             ` Philippe Gerum
2015-07-29 12:56               ` Philippe Gerum
2015-07-29 15:14               ` Frederik Bayart
2015-07-29 18:27                 ` Philippe Gerum
2015-07-29 18:42                   ` Philippe Gerum
2015-07-30 14:28                     ` Frederik Bayart
2015-07-30 15:08                       ` Frederik Bayart
2015-07-30 16:10                         ` Philippe Gerum
2015-07-31 17:54                           ` Frederik Bayart
2015-08-01  7:59                             ` Philippe Gerum
2015-08-01  8:43                             ` Philippe Gerum
2015-08-03  9:59                               ` Frederik Bayart
2015-07-30 15:58                       ` Philippe Gerum
2015-07-30 16:36                       ` Philippe Gerum
2015-07-31 16:04                         ` Frederik Bayart

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=1320019080.4249709.1438096751088.JavaMail.yahoo@mail.yahoo.com \
    --to=frederik_bayart@yahoo.co.uk \
    --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.