Skip to content

Excessive memory usage? #237

@someplaceguy

Description

@someplaceguy

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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions