nestybox / nestybox/sysbox

Sysbox fails to apply soft file limit if the hard limit is capped

Open
#1,014 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Shell
Stars
3.9k
Forks
230
Avg merge
7h 48m
Merged PRs (30d)
3

Description

This is with docker-ce=5:28.2.2-1debian.11bullseye, sysbox=0.6.7.linux on a Ubuntu 24.04 box, although I also confirmed it with sysbox 0.7.0.linux. This works:

$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=12345:12345 ubuntu:latest cat /proc/1/limits
Max open files            12345                12345                files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=200000:524280 ubuntu:latest cat /proc/1/limits
Max open files            200000               524280               files     

This doesn't work:

$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=524288:524288 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=524289:524289 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=12345:524289 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=12346:524288 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=524280:524288 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     
$ docker run --runtime=sysbox-runc --rm -it --ulimit nofile=200000:524288 ubuntu:latest cat /proc/1/limits
Max open files            1024                 524288               files     

By comparison, running without sysbox applies the limit as expected:

$ docker run --rm -it --ulimit nofile=524280:524280 ubuntu:latest cat /proc/1/limits
Max open files               524280               524280               files

I can't find any reason why this would happen, and I looked through the sysbox source code, but that's the behavior I see on this machine.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the reported docker run commands with the sysbox-runc runtime and compare their /proc/1/limits output with Docker without Sysbox. Trace how sysbox-runc applies the nofile soft and hard limits, then verify that a soft limit below the capped hard limit is preserved while the hard limit remains capped.

Written by the indexing model from the issue text.

Assessment

Tech stack
docker, linux
Domain
devops, infrastructure
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Quiet
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.