zygoon ,
@zygoon@fosstodon.org avatar

There's some mismatch between Linux kernel 3.10 and that wants to use clone3 to create a process thread.

Do I know anyone from @kde @kde who is able to assist with debugging it further?

The system call clone3 has been added to linux 5.3 but it seems that KDE does not do any fallback in case the system call is rejected with EPERM.

carlschwan ,
@carlschwan@floss.social avatar

@zygoon @kde @kde kernel 3.10 was released more than 10 years ago and received a last update in 2017. Is that really a kernel still used in the wild?

Looking at https://lxr.kde.org/search?%21v=kf5-qt5&_filestring=&_string=sched.h, KDE does not do a clone3 directly. It's likely done by a dependency of Plasma :( But I might be wrong as I'm definitively not an expert in syscall

zygoon OP ,
@zygoon@fosstodon.org avatar

@carlschwan @kde @kde

Yeah, RHEL 7 uses it out of the box and is still supported, at least until June 2024: https://www.redhat.com/en/blog/end-maintenance-red-hat-enterprise-linux-7-almost-here

Conan_Kudo ,
@Conan_Kudo@fosstodon.org avatar

@zygoon @carlschwan @kde @kde It's likely coming from some usage of libseccomp somewhere. This also afflicts the container stack and such, which is why RHEL 9 containers on RHEL 7 are not supported.

Container/sandbox runtimes using libseccomp need to explicitly always allow clone3() through, or otherwise it will not fail correctly on RHEL 7.

zygoon OP ,
@zygoon@fosstodon.org avatar

@Conan_Kudo @carlschwan @kde @kde yeah, I strongly suspect seccomp. I’m debugging this now and I will share updates when I get to the bottom of the problem.

Conan_Kudo ,
@Conan_Kudo@fosstodon.org avatar

@zygoon @carlschwan @kde @kde The clone3() call is done implicitly and automatically by glibc. It started with glibc 2.34. This is most likely a problem in the Ubuntu Core 22 runtime that KDE snaps are built on.

The fix is to patch out the logic that uses it for clone() in Ubuntu's glibc.

brauner ,
@brauner@mastodon.social avatar

@zygoon @kde @kde because any reasonable implementation will treat EPERM from a process creation system call as a fatal error. If this is e.g., blocked through seccomp. ENOSYS is the correct error to return. It's just naive seccomp sandboxes that started this EPERM nonsense. So I'd rule that out first. Unless you're using something that requires specific capabilities such as creating a process with a specific PID. That can legitimately return EPERM.

zygoon OP ,
@zygoon@fosstodon.org avatar

@brauner @kde @kde

Thanks for the insight. I was surprised by EPERM, would have expected ENOSYS as well.

Looks like EPERM is most likely coming out of unknow system call name being filtered-out by snap-seccomp compiler. I'll update snapd to 2.61.1 to avoid chasing fixed bugs and then see if there's something to improve in the compiler.

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • [email protected]
  • All magazines