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

[BUG] Default value of jitify cache file limit causes tests involving JIT to fail #10312

Closed
ttnghia opened this issue Feb 16, 2022 · 2 comments · Fixed by #10317
Closed

[BUG] Default value of jitify cache file limit causes tests involving JIT to fail #10312

ttnghia opened this issue Feb 16, 2022 · 2 comments · Fixed by #10317
Labels
bug Something isn't working

Comments

@ttnghia
Copy link
Contributor

ttnghia commented Feb 16, 2022

After the PR #8132 is merged, JIT cache file limit it set to std::numeric_limits<std::size_t>::max() unless an environment variable LIBCUDF_KERNEL_CACHE_LIMIT_PER_PROCESS is specified. Because such limit value (2^64) is used to reserve memory for an std::unordered_map, the system immediately blows up in memory usage and throws std::bad_alloc, causing all the tests involving JIT to fail.

This should be mitigated somehow. For example, a small number of cache file limit should be used as default instead of std::numeric_limits<std::size_t>::max(). This is the state before the PR #8132 is merged.

@ttnghia ttnghia added bug Something isn't working Needs Triage Need team to review and classify labels Feb 16, 2022
@devavret
Copy link
Contributor

Duplicate of #9362?

@ttnghia
Copy link
Contributor Author

ttnghia commented Feb 18, 2022

Yes. Duplicate.

rapids-bot bot pushed a commit that referenced this issue Feb 25, 2022
…0317)

In file `jit/cache.cpp`, a program cache always internally reserves a `std::unordered_map` using a size set by an environment variable `LIBCUDF_KERNEL_CACHE_LIMIT_PER_PROCESS`. If that environment variable does not exist, a default value (`std::numeric_limit<size_t>::max`) is used. Such default value is huge, leading to allocating a huge (impossible) size of memory chunk that crashes the system.

This PR changes that default value from `std::numeric_limit<size_t>::max` to `1024^2`. This is essentially a reverse of the PR #10312 but set the default value to `1024` instead of `100`.

Note that `1024^2` is just some random number, not based on any specific calculation.

Closes #10312 and closes #9362.

Authors:
  - Nghia Truong (https://github.com/ttnghia)

Approvers:
  - Mark Harris (https://github.com/harrism)
  - Karthikeyan (https://github.com/karthikeyann)

URL: #10317
@bdice bdice removed the Needs Triage Need team to review and classify label Mar 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants