xenomai.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
From: mars_liu2023  <mars_liu2023@163.com>
To: "Kowalsky, Clara" <clara.kowalsky@siemens.com>
Cc: xenomai <xenomai@lists.linux.dev>,
	 "Bezdeka, Florian" <florian.bezdeka@siemens.com>
Subject: Re:RE: Re:RE: latency: pthread_create(latency): Operation not permitted
Date: Thu, 7 Mar 2024 19:48:24 +0800 (CST)	[thread overview]
Message-ID: <4d676a3c.1035c.18e18be3c77.Coremail.mars_liu2023@163.com> (raw)
In-Reply-To: <AS5PR10MB8173D4D42BC12ADFAB381A6693202@AS5PR10MB8173.EURPRD10.PROD.OUTLOOK.COM>

















At 2024-03-07 15:22:22, "Kowalsky, Clara" <clara.kowalsky@siemens.com> wrote:
>
>
>> -----Original Message-----
>> From: mars_liu2023 <mars_liu2023@163.com>
>> Sent: Donnerstag, 7. März 2024 07:14
>> To: Kowalsky, Clara (T CED OES-DE) <clara.kowalsky@siemens.com>
>> Cc: xenomai <xenomai@lists.linux.dev>; Bezdeka, Florian (T CED OES-DE)
>> <florian.bezdeka@siemens.com>
>> Subject: Re:RE: latency: pthread_create(latency): Operation not permitted
>> 
>> 
>> At 2024-02-28 18:27:11, "Kowalsky, Clara" <clara.kowalsky@siemens.com>
>> wrote:
>> >Hi,
>> >
>> >I reproduced this problem with Florian's combinations based on the
>> >recipes-kernel/linux/files/amd64_defconfig.
>> >This does not seem to be a xenomai-specific problem.
>> >
>> >I could get rid of the "Operation not permitted" error when running the
>> >xenomai latency tool by disabling CONFIG_RT_GROUP_SCHED in the kernel
>> >config, see [1]: "The use of CONFIG_RT_GROUP_SCHED=y results in docker
>> >and its child containers to not be able to use system functions like
>> >sched_setscheduler() to raise a process' realtime priority."
>> >Do you have CONFIG_RT_GROUP_SCHED enabled?
>> 
>> >
>> 
>> 
>> Right , our kernel config have enabled CONFIG_RT_GROUP_SCHED.
>> 
>I assume this has therefore solved your problem?

>


yep, it helps me a lot.  thank you so much.
Best regard
Mars_liu

>> >According to [2], it is not recommended to set
>> >kernel.sched_rt_runtime_us to -1: "A "run-away" real-time task will be
>> >permitted to monopolise a CPU which could (potentially) lock up a
>> >system."
>> >
>> >For getting docker to run successfully, I had to enable a few more
>> >kernel options based on the amd64_defconfig. Therefore my question: Is
>> >docker running fine on your system? Which kernel config are you using?
>> 
>> >
>> 
>> 
>> Our docker is work well ,whatever CONFIG_RT_GROUP_SCHED is enable or
>> disable.
>> I don't recall which base config i used. Seems to come from debian10.
>> We will use recipes-kernel/linux/files/amd64_defconfig for the base config
>> next time , but i couldn't find the base config for dovetail linux.  where i can get
>> it ?
>>
>
>The dovetail defconfigs for e.g., x86 are located in arch/x86/configs.
>Have a look at the arch/x86/Makefile for checking which one gets used.
>In dovetail, the defconfigs for x86_64 and arm64 don't have CONFIG_RT_GROUP_SCHED enabled.
>
>Best
>Clara
> 
>> 
>> Best regards
>> Mars_liu
>> 
>> >[1]:
>> >https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgith
>> u
>> >b.com%2Fhome-assistant%2Foperating-
>> system%2Fissues%2F1235&data=05%7C02%
>> >7Cclara.kowalsky%40siemens.com%7C7078180c4cc5480d00b908dc3e6dc
>> 805%7C38a
>> >e3bcd95794fd4addab42e1495d55a%7C1%7C0%7C638453888427103377
>> %7CUnknown%7C
>> >TWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWw
>> iLCJXVCI
>> >6Mn0%3D%7C0%7C%7C%7C&sdata=D0GD31v%2Bjen%2FXiuTG0xYmng8rc
>> iEwDvLzg6x51Ld
>> >UJM%3D&reserved=0
>> >[2]:
>> >https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Facce
>> s
>> >s.redhat.com%2Fsolutions%2F1604133&data=05%7C02%7Cclara.kowalsky
>> %40siem
>> >ens.com%7C7078180c4cc5480d00b908dc3e6dc805%7C38ae3bcd95794fd
>> 4addab42e14
>> >95d55a%7C1%7C0%7C638453888427111224%7CUnknown%7CTWFpbGZ
>> sb3d8eyJWIjoiMC4
>> >wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C
>> %7C%7C&sd
>> >ata=oT1Tnan7BVAmdECHvRmLz7B4%2Fa3Z2EHUDptSnH4F24Q%3D&reserv
>> ed=0
>> >
>> >Best,
>> >Clara
>> >
>> >> -----Original Message-----
>> >> From: Jan Kiszka <jan.kiszka@siemens.com>
>> >> Sent: Mittwoch, 21. Februar 2024 19:27
>> >> To: mars_liu2023 <mars_liu2023@163.com>; Bezdeka, Florian (T CED OES-
>> >> DE) <florian.bezdeka@siemens.com>
>> >> Cc: xenomai <xenomai@lists.linux.dev>
>> >> Subject: Re: latency: pthread_create(latency): Operation not
>> >> permitted
>> >>
>> >> On 20.02.24 09:21, mars_liu2023 wrote:
>> >> >
>> >> >
>> >> >
>> >> > At 2024-01-25 00:39:17, "Florian Bezdeka"
>> >> <florian.bezdeka@siemens.com> wrote:
>> >> >> On Sun, 2024-01-21 at 21:03 +0800, mars_liu2023 wrote:
>> >> >>>
>> >> >>> To Florian
>> >> >>> This error is running the latency utility outside the container.
>> >> >>> I installed the containerd.io package through the dpkg -i command
>> >> >>> ,then
>> >> running latency utility  outside the container and this error will occur.
>> >> >>>
>> >> >>
>> >> >> I tried to reproduce that here in three different combinations:
>> >> >>
>> >> >> a)
>> >> >> - docker 20.10.24+dfsg1 (docker.io package from Debian 12)
>> >> >> - Xenomai 3.2.4
>> >> >> - Dovetail/Kernel 5.10.
>> >> >>
>> >> >> b)
>> >> >> - Dovetail/Kernel 6.1 instead of 5.10
>> >> >>
>> >> >> c)
>> >> >> - Xenomai 3.3-dev (next branch) instead of stable
>> >> >> - Dovetail/Kernel 6.6 instead of 6.1/5.10
>> >> >>
>> >> >> a) is running fine here
>> >> >> b) showed the problem
>> >> >>   /usr/lib/xenomai/testsuite/latency: pthread_create(latency):
>> >> >> Operation not permitted
>> >> >> c) Same result as b)
>> >> >>
>> >> >> Disabling the systemd units docker, docker.socket and containerd
>> >> >> followed by a reboot "solves" this problem. I have no idea what's
>> >> >> going on, but I guess it's something related to cgroups or any
>> >> >> resource limit that is changed by one of the daemons on startup.
>> >> >>
>> >> >> Further investigations necessary, unclear if I will look into that
>> >> >> soon.
>> >> >
>> >> >>
>> >> > Thank you for your reply and comments After some time we still
>> >> > can't get around the above problem . Has the solution to this
>> >> > problem been found?
>> >> >
>> >>
>> >> I also suspect it's something around cgroups, maybe similar to
>> >> https://eur01.safelinks.protection.outlook.com/?url=https%3A%2F%2Facc
>> >>
>> es%2F&data=05%7C02%7Cclara.kowalsky%40siemens.com%7C7078180c4c
>> c5480d0
>> >>
>> 0b908dc3e6dc805%7C38ae3bcd95794fd4addab42e1495d55a%7C1%7C0%
>> 7C63845388
>> >>
>> 8427116299%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJ
>> QIjoiV2luMz
>> >>
>> IiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=BD3jUHMN
>> wN6ZhCFsO
>> >> rQUMfTNGPcreyI7qqGuzW%2FTwjs%3D&reserved=0
>> >>
>> s.redhat.com%2Fdiscussions%2F2950611&data=05%7C02%7Cclara.kowalsk
>> >>
>> y%40siemens.com%7C8beecbd780c248ea7d9e08dc330affd0%7C38ae3bcd
>> >>
>> 95794fd4addab42e1495d55a%7C1%7C0%7C638441369538549173%7CUn
>> >>
>> known%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI
>> >>
>> 6Ik1haWwiLCJXVCI6Mn0%3D%7C0%7C%7C%7C&sdata=ncEx22tfXnSo5iCml
>> >> 2wOalCR6PZ2NNxtO1JMydVK9ao%3D&reserved=0. But I don't have setup
>> here
>> >> to reproduce like Florian had.
>> >>
>> >> Jan
>> >>
>> >> --
>> >> Siemens AG, Technology
>> >> Linux Expert Center
>> >>
>> >

      reply	other threads:[~2024-03-07 11:48 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-01-18  9:10 latency: pthread_create(latency): Operation not permitted mars_liu2023
2024-01-18 11:58 ` Florian Bezdeka
2024-01-21 13:03   ` mars_liu2023
2024-01-24 16:39     ` Florian Bezdeka
2024-01-25  9:38       ` Jan Kiszka
2024-02-20  8:59         ` mars_liu2023
2024-02-20  8:21       ` Re:Re: " mars_liu2023
2024-02-21 18:27         ` Jan Kiszka
2024-02-28 10:27           ` Kowalsky, Clara
2024-03-07  6:13             ` mars_liu2023
2024-03-07  7:22               ` Kowalsky, Clara
2024-03-07 11:48                 ` mars_liu2023 [this message]

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=4d676a3c.1035c.18e18be3c77.Coremail.mars_liu2023@163.com \
    --to=mars_liu2023@163.com \
    --cc=clara.kowalsky@siemens.com \
    --cc=florian.bezdeka@siemens.com \
    --cc=xenomai@lists.linux.dev \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).