-
Notifications
You must be signed in to change notification settings - Fork 4.8k
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
fixing OSS filter_fuzz_test OOM issue when thread_count is 800 million. #23782
fixing OSS filter_fuzz_test OOM issue when thread_count is 800 million. #23782
Conversation
Signed-off-by: Yanjun Xiang <[email protected]>
CC @envoyproxy/api-shepherds: Your approval is needed for changes made to |
When running OSS filter_fuzz_test, we are seeing an OOM issue with file system buffer extension filter when thead_count is configured to be extremely large, like 800 million. The test logs are below: /bazel-bin/test/extensions/filters/http/common/fuzz/filter_fuzz_test test/extensions/filters/http/common/fuzz/filter_corpus/clusterfuzz-testcase-minimized-filter_fuzz_test-5022310482706432 -l trace > ~/yanjunxiang/test.log [2022-11-01 21:21:25.330][3683384][info][misc] [test/test_common/utility.cc:63] TestRandomGenerator running with seed 1991829417 |
The decode is below: +----------------------------------------Release Build Stacktrace----------------------------------------+ |
/assign @ravenblackx |
@ravenblackx I think we need to add a PGV to guard the max limit of the thread_count. But not sure what number should we put it there. If this is not the right fix, please feel free to create a new PR and we can close this one. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems reasonable to me to bound to something like this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
@htuch this is waiting for API shepard lgtm |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can you add a minimized testcase to validate that the fuzz issue is solved?
/wait
Signed-off-by: Yanjun Xiang <[email protected]>
Yes, the issue is resolved by running the bazel test with the same test case file. The PGV blocked such configurations, thus the test passed. That reminds me we should commit the fuzz test case file. This is the PR for this leftover part: #23806. Regarding your offline question about why the upper bound is 1024, why not bigger 4096, or why not less, like 256, and how much is the memory size for each case?
And thread_pool_ is defined as:
each std::thread data structure size is 8 bytes.
However, thread_count is reflecting the concurrent threads hardware supports:
In that sense, 1024 is a sufficient big number for that,. At same time doesn't cause OOM(just 8K here). |
Signed-off-by: Yanjun Xiang [email protected]
Commit Message:
Additional Description:
Risk Level:
Testing:
Docs Changes:
Release Notes:
Platform Specific Features:
[Optional Runtime guard:]
[Optional Fixes #Issue]
[Optional Fixes commit #PR or SHA]
[Optional Deprecated:]
[Optional API Considerations:]