tcmalloc_set_parameters_test unittest fails in containerized environment

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: 8.2.5, 8.0.19
    • Component/s: None
    • Workload Resilience
    • ALL
    • Hide

      Run the `tcmalloc_set_parameters_test` in docker container without hard memory limit set (without `--memory` option).
      In fact it will fail on any system where `/sys/fs/cgroup/memory.max` contains string value "max" instead of numeric limit value.

      Show
      Run the `tcmalloc_set_parameters_test` in docker container without hard memory limit set (without `--memory` option). In fact it will fail on any system where `/sys/fs/cgroup/memory.max` contains string value "max" instead of numeric limit value.
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      The test `VerifyCacheSize` from the ` tcmalloc_set_parameters_test` unittest fails in a containerized environment (inside Docker) with:

      {"t":{"$date":"2025-10-07T14:12:40.933Z"},"s":"I",  "c":"TEST",     "id":23065,   "ctx":"main","msg":"Totals","attr":{"totals":{"name":"TOTALS","tests":13,"fails":1,"asserts":0,"time":{"durationMillis":9},"failures":[{"test":"VerifyCacheSize","type":"TestAssertionFailureException","error":"Expected std::abs((tcmallocCapacity) - (targetSize)) <= 1024 * 10 (1073741824 <= 10240) @src/mongo/util/tcmalloc_set_parameter_test.cpp:380"}]}},"truncated":{"totals":{"truncated":{"failures":{"truncated":{"0":{"truncated":{"extra":{"type":"string","size":16451}},"omitted":1}}}}}},"size":{"totals":16790}}
      

      The workaround is to start the container with a hard memory limit, aka `docker run --memory=16g`

            Assignee:
            Unassigned
            Reporter:
            Igor Solodovnikov
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: