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

Linux io_uring support and ulimit memlock #4683

Closed
1 of 7 tasks
sullis opened this issue Dec 7, 2021 · 2 comments
Closed
1 of 7 tasks

Linux io_uring support and ulimit memlock #4683

sullis opened this issue Dec 7, 2021 · 2 comments
Assignees
Labels
Area: Java OS: Ubuntu question Further information is requested

Comments

@sullis
Copy link

sullis commented Dec 7, 2021

Description

OS: Linux (ubuntu-latest)

I have a GitHub Actions workflow that tries to utilize io_uring from Java

https://github.com/sullis/netty-playground/runs/4450624231?check_suite_focus=true

The error message is:

java.lang.RuntimeException: failed to create io_uring ring fd Cannot allocate memory
	at io.netty.incubator.channel.uring.Native.ioUringSetup(Native Method)
	at io.netty.incubator.channel.uring.Native.createRingBuffer(Native.java:169)
	at io.netty.incubator.channel.uring.Native.createRingBuffer(Native.java:202)
	at io.netty.incubator.channel.uring.IOUring.<clinit>(IOUring.java:41)

In the workflow, I print the ulimit value:

$ ulimit -l
64

Is there any way to change the ulimit memlock value? Is there a workaround?

Virtual environments affected

  • Ubuntu 18.04
  • Ubuntu 20.04
  • macOS 10.15
  • macOS 11
  • Windows Server 2016
  • Windows Server 2019
  • Windows Server 2022

Image version and build link

https://github.com/sullis/netty-playground/runs/4450624231?check_suite_focus=true

Is it regression?

No response

Expected behavior

No response

Actual behavior

No response

Repro steps

Java code:
https://github.com/sullis/netty-playground/blob/main/src/test/java/io/github/sullis/netty/playground/IoUringTest.java

Workflow:
https://github.com/sullis/netty-playground/blob/main/.github/workflows/ci.yml

Run:
https://github.com/sullis/netty-playground/runs/4450624231?check_suite_focus=true

@al-cheb
Copy link
Contributor

al-cheb commented Dec 8, 2021

Hey, @sullis

It affects only the running shell, that's why you should run all commands in it:

- name: Build
  run: |
          sudo env "PATH=$PATH" bash -c "ulimit -l 65536 && ulimit -a && mvn --no-transfer-progress -B clean test"

image

@al-cheb al-cheb added Area: Java OS: Ubuntu question Further information is requested and removed needs triage labels Dec 8, 2021
@al-cheb al-cheb self-assigned this Dec 8, 2021
@sullis
Copy link
Author

sullis commented Dec 8, 2021

Thanks @al-cheb - your solution works for me. I will close this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Area: Java OS: Ubuntu question Further information is requested
Projects
None yet
Development

No branches or pull requests

2 participants