rt_pipe_open / rt_pipe_delete bug
Hi,
tryied in v2.4.10 :
I have opened a /dev/rtp7 pipe , and deleted it.
if I launch again the same program, rt_pipe_open replies with -EBUSY ....
Best Regards
S.Ancelot
Quoted 9 lines · stephane ancelot
Hi,
tryied in v2.4.10 :
I have opened a
/dev/rtp7pipe , and deleted it.if I launch again the same program,
rt_pipe_openreplies with-EBUSY....
Can you describe the sequence how you are invoking rt_pipe_open()/open()/rt_pipe_delete()?
If the following description applies to you then you discovered what we've discovered before and there is no easy fix for that as far as I know.
1) create pipe with rt_pipe_open()
2) connect to it by opening /dev/rtp7 with open()
3) delete pipe with rt_pipe_delete() (for example by killing the Xenomai application)
4) create same pipe again with rt_pipe_open() (for example by restarting the Xenomai application with /dev/rtp7 is still open)
--> rt_pipe_open() reports an error
Andreas
H
Quoted 16 lines · Andreas Glatz
Quoted 9 lines · stephane ancelot
Hi,
tryied in v2.4.10 :
I have opened a
/dev/rtp7pipe , and deleted it.if I launch again the same program,
rt_pipe_openreplies with-EBUSY....Can you describe the sequence how you are invoking rt_pipe_open()/open()/rt_pipe_delete()?
If the following description applies to you then you discovered what we've discovered before and there is no easy fix for that as far as I know.
Quoted 8 lines
1) create pipe with
rt_pipe_open()
2) connect to it by opening/dev/rtp7withopen()
3) delete pipe withrt_pipe_delete()(for example by killing the Xenomai application)
4) create same pipe again withrt_pipe_open()(for example by restarting the Xenomai application with/dev/rtp7is still open)-->
rt_pipe_open()reports an error
Yes, but it has worked in xeno 2.1 .... Is there a work around ? only hacking it ? Best Regards
S.Ancelot
Quoted 1 line
Andreas
Quoted 31 lines · stephane ancelot
H
Quoted 27 lines · Andreas Glatz
Quoted 10 lines · stephane ancelot
Hi,
tryied in v2.4.10 :
I have opened a
/dev/rtp7pipe , and deleted it.if I launch again the same program,
rt_pipe_openreplies with-EBUSY
....Can you describe the sequence how you are invoking rt_pipe_open()/open()/rt_pipe_delete()?
If the following description applies to you then you discovered what we've discovered
before and there is no easy fix for that as far as I know.1) create pipe with
rt_pipe_open()
2) connect to it by opening/dev/rtp7withopen()
3) delete pipe withrt_pipe_delete()(for example by killing the Xenomai application)
4) create same pipe again withrt_pipe_open()(for example by restarting the
Xenomai application with/dev/rtp7is still open)
Quoted 4 lines
Quoted 2 lines
-->
rt_pipe_open()reports an errorYes, but it has worked in xeno 2.1 ....
2.1 was utterly broken wrt pipe session handling, it did not work, at all. It just created opportunities to trash your kernel memory badly upon rt-side closure, by allowing userland to work on a deallocated pipe while in a race window.
Now both ends are in sync, and the rt-pipe is allowed to linger until userland is really done with it, i.e. when it has closed its endpoint. You will get -EBUSY on the rt-side until that point is reached.
Quoted 2 lines
Is there a work around ? only
hacking it ?
Fix your app on the userland side. It should receive a zero-length read upon rt-side closure. You just need to check for this, then close this endpoint and reopen it right after if need be.
Quoted 9 lines
Best Regards
S.AncelotQuoted 1 line
Andreas
_______________________________________________
Xenomai-core mailing list
[email protected]
https://mail.gna.org/listinfo/xenomai-core
Signature · 1 line
Philippe.