* Docker - Xenomai hangs on rt_task_wait_period()
@ 2021-06-22 16:38 MONTET Julien
2021-06-23 5:37 ` Jan Kiszka
0 siblings, 1 reply; 5+ messages in thread
From: MONTET Julien @ 2021-06-22 16:38 UTC (permalink / raw)
To: Xenomai
Hello the developers,
I have been using Xenomai for the past two months on different targets / skins / architectures, and it is a great real time solution !
For the past few days, I have been trying to use my code on a docker :
* Compiled on a debian 10.9 with Xenomai libraries (3.1) for an ARM target
* This code runs on a raspberry pi 3B with an IPIPE patch (Cobalt)
* The kernel version is 4.19+
My code is running fine with different methods, there is no crash.
However, the execution hangs when I use the couple rt_task_set_periodic/rt_task_wait_period.
Methods such as "RTIME", rt_printf(), rt_task_set_periodic() do not hangs, but my code seems to keep waiting on rt_task_wait_period().
I am aware someone had this issue four years ago :
https://xenomai.org/pipermail/xenomai/2017-November/037890.html
According to the link above, Cobalt does not support PID namespaces.
I also understood it is needed to convert vpid <-> pid by using the find_task_vpid().
I am not an expert on the interaction between Docker and Linux - specifically on PID.
Is it a normal behaviour in my case ? Where would it be interesting to make these changes ?
What is the link between RT_TASK and PID / vPID ?
Regards,
Julien
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Docker - Xenomai hangs on rt_task_wait_period()
2021-06-22 16:38 Docker - Xenomai hangs on rt_task_wait_period() MONTET Julien
@ 2021-06-23 5:37 ` Jan Kiszka
2021-06-23 7:21 ` Bezdeka, Florian
0 siblings, 1 reply; 5+ messages in thread
From: Jan Kiszka @ 2021-06-23 5:37 UTC (permalink / raw)
To: MONTET Julien, Xenomai, Bezdeka, Florian (T RDA IOT SES-DE)
On 22.06.21 18:38, MONTET Julien via Xenomai wrote:
> Hello the developers,
>
> I have been using Xenomai for the past two months on different targets / skins / architectures, and it is a great real time solution !
> For the past few days, I have been trying to use my code on a docker :
>
> * Compiled on a debian 10.9 with Xenomai libraries (3.1) for an ARM target
> * This code runs on a raspberry pi 3B with an IPIPE patch (Cobalt)
> * The kernel version is 4.19+
>
> My code is running fine with different methods, there is no crash.
> However, the execution hangs when I use the couple rt_task_set_periodic/rt_task_wait_period.
> Methods such as "RTIME", rt_printf(), rt_task_set_periodic() do not hangs, but my code seems to keep waiting on rt_task_wait_period().
>
> I am aware someone had this issue four years ago :
> https://xenomai.org/pipermail/xenomai/2017-November/037890.html
> According to the link above, Cobalt does not support PID namespaces.
> I also understood it is needed to convert vpid <-> pid by using the find_task_vpid().
>
> I am not an expert on the interaction between Docker and Linux - specifically on PID.
> Is it a normal behaviour in my case ? Where would it be interesting to make these changes ?
> What is the link between RT_TASK and PID / vPID ?
>
> Regards,
>
> Julien
>
Do you see this issue only on ARM, or is the pattern also reproducible
on x86 (qemu/kvm)? Are only native/alchemy apps affected, or does the
latency test hang as well?
Maybe you can describe what would be needed to reproduce inside a
xenomai-images qemu target so that we look at the same thing.
Florian, we only have some x86 hosts enabled to run docker aside
Xenomai, right?
Jan
--
Siemens AG, T RDA IOT
Corporate Competence Center Embedded Linux
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: Docker - Xenomai hangs on rt_task_wait_period()
2021-06-23 5:37 ` Jan Kiszka
@ 2021-06-23 7:21 ` Bezdeka, Florian
2021-06-23 7:55 ` MONTET Julien
0 siblings, 1 reply; 5+ messages in thread
From: Bezdeka, Florian @ 2021-06-23 7:21 UTC (permalink / raw)
To: xenomai, jan.kiszka, julien.montet
On Wed, 2021-06-23 at 07:37 +0200, Jan Kiszka wrote:
> On 22.06.21 18:38, MONTET Julien via Xenomai wrote:
> > Hello the developers,
> >
> > I have been using Xenomai for the past two months on different targets / skins / architectures, and it is a great real time solution !
> > For the past few days, I have been trying to use my code on a docker :
> >
> > * Compiled on a debian 10.9 with Xenomai libraries (3.1) for an ARM target
> > * This code runs on a raspberry pi 3B with an IPIPE patch (Cobalt)
> > * The kernel version is 4.19+
> >
> > My code is running fine with different methods, there is no crash.
> > However, the execution hangs when I use the couple rt_task_set_periodic/rt_task_wait_period.
> > Methods such as "RTIME", rt_printf(), rt_task_set_periodic() do not hangs, but my code seems to keep waiting on rt_task_wait_period().
> >
> > I am aware someone had this issue four years ago :
> > https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fxenomai.org%2Fpipermail%2Fxenomai%2F2017-November%2F037890.html&data=04%7C01%7Cflorian.bezdeka%40siemens.com%7C675a96a8b5b6446da2f908d93608f101%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%7C637600234295968505%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=UHQL80D1HOuJqng1HTCxPah1ilkI7zJQlShNt96w1xQ%3D&reserved=0
> > According to the link above, Cobalt does not support PID namespaces.
> > I also understood it is needed to convert vpid <-> pid by using the find_task_vpid().
> >
> > I am not an expert on the interaction between Docker and Linux - specifically on PID.
> > Is it a normal behaviour in my case ? Where would it be interesting to make these changes ?
> > What is the link between RT_TASK and PID / vPID ?
> >
> > Regards,
> >
> > Julien
> >
>
> Do you see this issue only on ARM, or is the pattern also reproducible
> on x86 (qemu/kvm)? Are only native/alchemy apps affected, or does the
> latency test hang as well?
>
> Maybe you can describe what would be needed to reproduce inside a
> xenomai-images qemu target so that we look at the same thing.
>
> Florian, we only have some x86 hosts enabled to run docker aside
> Xenomai, right?
Yes, we have a x86 setup running containers, but AFAIK there is no
Xenomai workload inside the container.
We know about [1] (bug /wrt PID namespace). Might that be related?
[1] https://gitlab.com/Xenomai/xenomai-hacker-space/-/issues/19
>
> Jan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Docker - Xenomai hangs on rt_task_wait_period()
2021-06-23 7:21 ` Bezdeka, Florian
@ 2021-06-23 7:55 ` MONTET Julien
2021-07-01 7:47 ` MONTET Julien
0 siblings, 1 reply; 5+ messages in thread
From: MONTET Julien @ 2021-06-23 7:55 UTC (permalink / raw)
To: Bezdeka, Florian, jan.kiszka; +Cc: xenomai
Hi,
I tried again this morning, and run the latency bin of Xenomai on the Docker, it doesn't hang :
root@f2f41a83e749:/usr/xenomai/bin# ./latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| 1.666| 2.070| 7.187| 0| 0| 1.666| 7.187
RTD| 1.666| 2.074| 17.447| 0| 0| 1.666| 17.447
RTD| 1.613| 2.003| 14.113| 0| 0| 1.613| 17.447
RTD| 1.561| 2.045| 12.967| 0| 0| 1.561| 17.447
RTD| 1.716| 2.061| 19.217| 0| 0| 1.561| 19.217
RTD| 1.664| 2.062| 15.675| 0| 0| 1.561| 19.217
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 1.561| 2.052| 19.217| 0| 0| 00:00:07/00:00:07
I can't test my Docker on x86 now, I will do it as soon as I can, most probably this evening.
Regarding the link Florian sent, I didn't use this to run my docker : -device=/dev/rtdm:/dev/rtdm
I have almost the same "docker run" call as Marco Barletta, I just added : --privileged --cap-add SYS_NICE.
This PID issue might be related, I don't kow how to check this.
Regards,
On Wed, 2021-06-23 at 07:37 +0200, Jan Kiszka wrote:
> On 22.06.21 18:38, MONTET Julien via Xenomai wrote:
> > Hello the developers,
> >
> > I have been using Xenomai for the past two months on different targets / skins / architectures, and it is a great real time solution !
> > For the past few days, I have been trying to use my code on a docker :
> >
> > * Compiled on a debian 10.9 with Xenomai libraries (3.1) for an ARM target
> > * This code runs on a raspberry pi 3B with an IPIPE patch (Cobalt)
> > * The kernel version is 4.19+
> >
> > My code is running fine with different methods, there is no crash.
> > However, the execution hangs when I use the couple rt_task_set_periodic/rt_task_wait_period.
> > Methods such as "RTIME", rt_printf(), rt_task_set_periodic() do not hangs, but my code seems to keep waiting on rt_task_wait_period().
> >
> > I am aware someone had this issue four years ago :
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fxenomai.org%2Fpipermail%2Fxenomai%2F2017-November%2F037890.html&data=04%7C01%7Cjulien.montet%40reseau.eseo.fr%7C00a8a1217b1347e085d708d936177e97%7C4d7ad1591265437ab9f62946247d5bf9%7C0%7C0%7C637600296802295046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IdqQYU1WPAP4XP8yb6HWRn%2B10BsbRJRtrm3iEPDsqQQ%3D&reserved=0
> > According to the link above, Cobalt does not support PID namespaces.
> > I also understood it is needed to convert vpid <-> pid by using the find_task_vpid().
> >
> > I am not an expert on the interaction between Docker and Linux - specifically on PID.
> > Is it a normal behaviour in my case ? Where would it be interesting to make these changes ?
> > What is the link between RT_TASK and PID / vPID ?
> >
> > Regards,
> >
> > Julien
> >
>
> Do you see this issue only on ARM, or is the pattern also reproducible
> on x86 (qemu/kvm)? Are only native/alchemy apps affected, or does the
> latency test hang as well?
>
> Maybe you can describe what would be needed to reproduce inside a
> xenomai-images qemu target so that we look at the same thing.
>
> Florian, we only have some x86 hosts enabled to run docker aside
> Xenomai, right?
Yes, we have a x86 setup running containers, but AFAIK there is no
Xenomai workload inside the container.
We know about [1] (bug /wrt PID namespace). Might that be related?
[1] https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2FXenomai%2Fxenomai-hacker-space%2F-%2Fissues%2F19&data=04%7C01%7Cjulien.montet%40reseau.eseo.fr%7C00a8a1217b1347e085d708d936177e97%7C4d7ad1591265437ab9f62946247d5bf9%7C0%7C0%7C637600296802295046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qI0zj%2F4PgzYoXyZBUE%2F9xYSbRI7vAp%2FPegw2JuCNcqM%3D&reserved=0
>
> Jan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
* RE: Docker - Xenomai hangs on rt_task_wait_period()
2021-06-23 7:55 ` MONTET Julien
@ 2021-07-01 7:47 ` MONTET Julien
0 siblings, 0 replies; 5+ messages in thread
From: MONTET Julien @ 2021-07-01 7:47 UTC (permalink / raw)
To: Bezdeka, Florian, jan.kiszka; +Cc: xenomai
Hi,
Unfortunately I can't, and do not want to try on X86.
Even if it is possible, I am using a 32 bits x86 executable and it increases the complexity of my dockerfile (new libraries, support...) and risks of errors.
I prefer to stay on ARM for now.
I am going to try the following resolution options and keep you informed :
* Have a look at the file threadobj.c line 1645 from function sev.sigev_notify_thread_id = threadobj_get_pid(thobj);
* Test the cobalt docker of Yogu : https://hub.docker.com/r/yogu/cobalt
* Test with a qemu-target, but I have to use Docker in a long run.
Regards
Julien
________________________________
De : MONTET Julien <julien.montet@reseau.eseo.fr>
Envoyé : mercredi 23 juin 2021 09:55
À : Bezdeka, Florian <florian.bezdeka@siemens.com>; jan.kiszka@siemens.com <jan.kiszka@siemens.com>
Cc : xenomai@xenomai.org <xenomai@xenomai.org>
Objet : RE: Docker - Xenomai hangs on rt_task_wait_period()
Hi,
I tried again this morning, and run the latency bin of Xenomai on the Docker, it doesn't hang :
root@f2f41a83e749:/usr/xenomai/bin# ./latency
== Sampling period: 1000 us
== Test mode: periodic user-mode task
== All results in microseconds
warming up...
RTT| 00:00:01 (periodic user-mode task, 1000 us period, priority 99)
RTH|----lat min|----lat avg|----lat max|-overrun|---msw|---lat best|--lat worst
RTD| 1.666| 2.070| 7.187| 0| 0| 1.666| 7.187
RTD| 1.666| 2.074| 17.447| 0| 0| 1.666| 17.447
RTD| 1.613| 2.003| 14.113| 0| 0| 1.613| 17.447
RTD| 1.561| 2.045| 12.967| 0| 0| 1.561| 17.447
RTD| 1.716| 2.061| 19.217| 0| 0| 1.561| 19.217
RTD| 1.664| 2.062| 15.675| 0| 0| 1.561| 19.217
^C---|-----------|-----------|-----------|--------|------|-------------------------
RTS| 1.561| 2.052| 19.217| 0| 0| 00:00:07/00:00:07
I can't test my Docker on x86 now, I will do it as soon as I can, most probably this evening.
Regarding the link Florian sent, I didn't use this to run my docker : -device=/dev/rtdm:/dev/rtdm
I have almost the same "docker run" call as Marco Barletta, I just added : --privileged --cap-add SYS_NICE.
This PID issue might be related, I don't kow how to check this.
Regards,
On Wed, 2021-06-23 at 07:37 +0200, Jan Kiszka wrote:
> On 22.06.21 18:38, MONTET Julien via Xenomai wrote:
> > Hello the developers,
> >
> > I have been using Xenomai for the past two months on different targets / skins / architectures, and it is a great real time solution !
> > For the past few days, I have been trying to use my code on a docker :
> >
> > * Compiled on a debian 10.9 with Xenomai libraries (3.1) for an ARM target
> > * This code runs on a raspberry pi 3B with an IPIPE patch (Cobalt)
> > * The kernel version is 4.19+
> >
> > My code is running fine with different methods, there is no crash.
> > However, the execution hangs when I use the couple rt_task_set_periodic/rt_task_wait_period.
> > Methods such as "RTIME", rt_printf(), rt_task_set_periodic() do not hangs, but my code seems to keep waiting on rt_task_wait_period().
> >
> > I am aware someone had this issue four years ago :
> > https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fxenomai.org%2Fpipermail%2Fxenomai%2F2017-November%2F037890.html&data=04%7C01%7Cjulien.montet%40reseau.eseo.fr%7C00a8a1217b1347e085d708d936177e97%7C4d7ad1591265437ab9f62946247d5bf9%7C0%7C0%7C637600296802295046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=IdqQYU1WPAP4XP8yb6HWRn%2B10BsbRJRtrm3iEPDsqQQ%3D&reserved=0
> > According to the link above, Cobalt does not support PID namespaces.
> > I also understood it is needed to convert vpid <-> pid by using the find_task_vpid().
> >
> > I am not an expert on the interaction between Docker and Linux - specifically on PID.
> > Is it a normal behaviour in my case ? Where would it be interesting to make these changes ?
> > What is the link between RT_TASK and PID / vPID ?
> >
> > Regards,
> >
> > Julien
> >
>
> Do you see this issue only on ARM, or is the pattern also reproducible
> on x86 (qemu/kvm)? Are only native/alchemy apps affected, or does the
> latency test hang as well?
>
> Maybe you can describe what would be needed to reproduce inside a
> xenomai-images qemu target so that we look at the same thing.
>
> Florian, we only have some x86 hosts enabled to run docker aside
> Xenomai, right?
Yes, we have a x86 setup running containers, but AFAIK there is no
Xenomai workload inside the container.
We know about [1] (bug /wrt PID namespace). Might that be related?
[1] https://eur02.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgitlab.com%2FXenomai%2Fxenomai-hacker-space%2F-%2Fissues%2F19&data=04%7C01%7Cjulien.montet%40reseau.eseo.fr%7C00a8a1217b1347e085d708d936177e97%7C4d7ad1591265437ab9f62946247d5bf9%7C0%7C0%7C637600296802295046%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=qI0zj%2F4PgzYoXyZBUE%2F9xYSbRI7vAp%2FPegw2JuCNcqM%3D&reserved=0
>
> Jan
>
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-07-01 7:47 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-06-22 16:38 Docker - Xenomai hangs on rt_task_wait_period() MONTET Julien
2021-06-23 5:37 ` Jan Kiszka
2021-06-23 7:21 ` Bezdeka, Florian
2021-06-23 7:55 ` MONTET Julien
2021-07-01 7:47 ` MONTET Julien
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.