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

Excessive memory usage? #237

Open
someplaceguy opened this issue Jun 25, 2024 · 1 comment
Open

Excessive memory usage? #237

someplaceguy opened this issue Jun 25, 2024 · 1 comment

Comments

@someplaceguy
Copy link

someplaceguy commented Jun 25, 2024

When building wangle version 2024.03.11.00 on a RPi4 running NixOS, I ran into the following test failure:

14/14 Test #12: SSLContextManagerTest ................Subprocess killed***Exception:  71.72 sec
Note: Google Test filter = -SSLContextManagerTest.TestSingleClientCAFileSet:SSLContextManagerTest.TestMultipleClientCAsSet:SSLContextManagerTest.TestSessionContextCertRemoval
[==========] Running 8 tests from 1 test suite.
[----------] Global test environment set-up.
[----------] 8 tests from SSLContextManagerTest
[ RUN      ] SSLContextManagerTest.Test1
[       OK ] SSLContextManagerTest.Test1 (23 ms)
[ RUN      ] SSLContextManagerTest.TestResetSSLContextConfigs
[       OK ] SSLContextManagerTest.TestResetSSLContextConfigs (127 ms)
[ RUN      ] SSLContextManagerTest.TestCertificateWithNoCN


93% tests passed, 1 tests failed out of 14

Total Test time (real) =  72.82 sec

The following tests FAILED:
         12 - SSLContextManagerTest (Subprocess killed)
Errors while running CTest
make: *** [Makefile:91: test] Error 8

The problem seems to be because the machine ran out of memory and the OOM killer was invoked because the test process was using more than 6 GB of RAM, as you can see in this kernel log excerpt:

[213737.065545] [  pid  ]   uid  tgid total_vm      rss pgtables_bytes swapents oom_score_adj name
(...)
[213738.304241] [1301889] 30001 1301889  5645152  1552672 26828800  1774976             0 SSLContextManag                                                                                                           13:18:51 [120/20620]
(...)
[213738.414744] Out of memory: Killed process 1301889 (SSLContextManag) total-vm:22580608kB, anon-rss:6210560kB, file-rss:128kB, shmem-rss:0kB, UID:30001 pgtables:26200kB oom_score_adj:0

I skimmed the test's source code (wangle/ssl/test/SSLContextManagerTest.cpp) and since I didn't see anything that would warrant such excessive memory usage, I decided to file this issue just in case.

Thanks.

@someplaceguy
Copy link
Author

I just tried to build this on an ARM64 machine with more memory but I still ran into the OOM killer. This time the test process was using ~11 GB of RAM:

2024-06-25T12:54:21.980897+00:00 orange kern.err kernel: Out of memory: Killed process 1636309 (SSLContextManag) total-vm:52632448kB, anon-rss:11877248kB, file-rss:512kB, shmem-rss:0kB, UID:30011 pgtables:50396kB oom_score_adj:0

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

No branches or pull requests

1 participant