versatica / mediasoup

Cutting Edge WebRTC Video Conferencing
https://mediasoup.org
ISC License
6.18k stars 1.12k forks source link

io-uring not enabled in Linux mediasoup-worker prebuilt since it uses kernel 5.15 #1282

Closed ibc closed 9 months ago

ibc commented 9 months ago

In mediasoup-worker-prebuild CI job we are using an old Ubuntu version 20.04 to create the Linux mediasoup-worker prebuilt binary (for reasons as documented inline). Problem is that Ubuntu 20.04 uses kernel 5.15 (<6) so we are not enabling io-uring on these binaries :(

# For Linux let's use an old version of Ubuntu (20.04) that builds the
# mediasoup-worker binary using an old version of GLib, so it will work
# on Linux hosts running more modern GLib versions.
# See https://github.com/versatica/mediasoup/issues/1089.
- os: ubuntu-20.04
  cc: gcc
  cxx: g++
- os: macos-12
  cc: clang
  cxx: clang++
- os: windows-2022
  cc: cl
  cxx: cl

We may need a more specific way to identify a distribution and maybe build once for 20.04 and once for 22.04. An alternative would be to only build for one and let the other compile from source every time.

ibc commented 9 months ago

We are using this file name as distribution identifier:

const WORKER_PREBUILD_TAR = `mediasoup-worker-${PKG.version}-${os.platform()}-${os.arch()}.tgz`;

Proposal:

nazar-pc commented 9 months ago

We probably don't want "Linux" either, there are many distros with different versions of libraries. IIRC we are testing that the binary runs, but it doesn't guarantee it will not fail in runtime.

ibc commented 9 months ago

I don't understand, we need to know if it linux. Yes, it's indeed a limitation but we re not ready to create neither super universal binaries nor binaries for archs that we cannot run in CI.

nazar-pc commented 9 months ago

Well, theoretically you can run VMs in CI, so strictly speaking it is possible to run any OS, whether it is worth it or not is a separate question of course.

ibc commented 9 months ago

Well, theoretically you can run VMs in CI, so strictly speaking it is possible to run any OS, whether it is worth it or not is a separate question of course.

Yes, but that's a separate story and super hard to accomplish.

ibc commented 9 months ago

I'm printing this in different archs:

console.log('platform-arch-release:', `${os.platform()}-${os.arch()}-${os.release()}`);

Debian GNU/Linux 12: platform-arch-release: linux-x64-6.1.0-13-amd64

Alpine Linux (running in Docker in macOS Intel): platform-arch-release: linux-x64-5.10.76-linuxkit

macOS Intel 13.6.1 (22G313): platform-arch-release: darwin-x64-22.6.0

ibc commented 9 months ago

Oh hell, Ubuntu 22.05 also comes with Kernel 5.15...

nazar-pc commented 9 months ago

22.05 is not a thing, but also for LTS versions there is newer HWE kernel, but it is not necessarily installed.

ibc commented 9 months ago

PR part 1 done here: https://github.com/versatica/mediasoup/pull/1283

ibc commented 9 months ago

Closing this in favour of https://github.com/versatica/mediasoup/issues/1284.