Skip to content

Conversation

@flavorjones
Copy link
Contributor

@flavorjones flavorjones commented Dec 7, 2024

Valgrind 3.21.0 will exit if the fd limit is too high. This change is described here:

https://bugs.kde.org/show_bug.cgi?id=465435

And the symptom is that Valgrind exits prematurely with this error message:

--184100:0:libcfile Valgrind: FATAL: Private file creation failed.
   The current file descriptor limit is 1073741804.
   If you are running in Docker please consider
   lowering this limit with the shell built-in limit command.
--184100:0:libcfile Exiting now.

A quote from a maintainer in that issue is: "We're not going to change Valgrind to handle insane rlimits that Docker presents", however it looks like Ubuntu 24.10 sets this limit very high:

$ uname -a
Linux bepi 6.11.0-1004-lowlatency #4-Ubuntu SMP PREEMPT_DYNAMIC Mon Sep 30 10:54:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
$ ulimit -n
1073741816

I suspect this patch will not work on some systems for a variety of reasons, but I wanted to start a conversation about how to address this issue.

Valgrind 3.21.0 will exit if the fd limit is too high. This change is
described here:

> https://bugs.kde.org/show_bug.cgi?id=465435

A quote from a maintainer in that issue is: "We're not going to change
Valgrind to handle insane rlimits that Docker presents", however it
looks like Ubuntu 24.10 sets this limit very high:

    $ uname -a
    Linux bepi 6.11.0-1004-lowlatency Shopify#4-Ubuntu SMP PREEMPT_DYNAMIC Mon
    Sep 30 10:54:09 UTC 2024 x86_64 x86_64 x86_64 GNU/Linux
    $ ulimit -n
    1073741816

I suspect this patch will not work on some systems for a variety of
reasons, but I wanted to start a conversation about how to address
this issue.
@flavorjones
Copy link
Contributor Author

I have signed the CLA!

@flavorjones
Copy link
Contributor Author

I guess the underlying issue might be that I've misconfigured my system somehow, but I've seen this on multiple Ubuntu 24.10 systems. 🤷

Copy link
Contributor

@peterzhu2118 peterzhu2118 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you!

@peterzhu2118 peterzhu2118 merged commit f3736ec into Shopify:main Jan 3, 2025
6 of 7 checks passed
@flavorjones flavorjones deleted the flavorjones-ulimit-file-descriptors branch January 3, 2025 19:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants