Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
ibc opened this issue Dec 29, 2023 · 10 comments
Closed
Assignees
Milestone

Comments

@ibc
Copy link
Member

ibc commented Dec 29, 2023

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 ibc added this to the v3 updates milestone Dec 29, 2023
@ibc
Copy link
Member Author

ibc commented Dec 29, 2023

We are using this file name as distribution identifier:

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

Proposal:

  • When in Linux (and only in Linux) we may also add the kernel major version (5, 6, etc) into that string.

@nazar-pc
Copy link
Collaborator

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
Copy link
Member Author

ibc commented Dec 29, 2023

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
Copy link
Collaborator

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
Copy link
Member Author

ibc commented Dec 29, 2023

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
Copy link
Member Author

ibc commented Dec 29, 2023

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
Copy link
Member Author

ibc commented Dec 29, 2023

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

@nazar-pc
Copy link
Collaborator

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

ibc added a commit that referenced this issue Dec 29, 2023
This PR exposes kernel mayor number in the mediasoup-worker binary name to make it possible to have prebuilts for Linux with kernel 5 and 6 (the latter supports `io-uring`).

**NOTE 1:** This is related to issue #1282 but doesn't complete it.

**TODO:** In `mediasoup-worker-prebuild.yaml` we must include an Ubuntu version with kernel >= 6. Problem is that Ubuntu 22.04 still uses kernel 5.15 and there are no other more modern Ubuntu versions in GitHub CI.

**NOTE 2:** When that is done (in part 2 of this task), we must still keep Ubuntu 20.04 since, as documented in the job file, it uses an older version of GLib and otherwise we'd run into this issue again: #1089.
@ibc
Copy link
Member Author

ibc commented Dec 29, 2023

PR part 1 done here: #1283

@ibc
Copy link
Member Author

ibc commented Dec 30, 2023

Closing this in favour of #1284.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

No branches or pull requests

3 participants