Investigate memory deallocation issues with OTEL and dynamic builds

XMLWordPrintableJSON

    • Type: Bug
    • Resolution: Unresolved
    • Priority: Major - P3
    • None
    • Affects Version/s: None
    • Component/s: None
    • None
    • Server Programmability
    • ALL
    • Hide
      1. Checkout the master branch
      2. Remove the if check here and keep the body where we call Delete
      3. Run `bazel test --linkstatic=False +resharding_coordinator_service_util_test`

      The test will fail because we attempt to deallocate 8 bytes for an OTEL object but the actual size of the object is 16 bytes. This happens for any OTEL object that was initialized with a size of 0 and we subsequently deallocate it.

      Logs with issue.

      Our hunch is that there is something wrong with how we are linking the OTEL library to the mongo codebase.

      Show
      Checkout the master branch Remove the if check here and keep the body where we call Delete Run `bazel test --linkstatic=False +resharding_coordinator_service_util_test` The test will fail because we attempt to deallocate 8 bytes for an OTEL object but the actual size of the object is 16 bytes. This happens for any OTEL object that was initialized with a size of 0 and we subsequently deallocate it. Logs with issue. Our hunch is that there is something wrong with how we are linking the OTEL library to the mongo codebase.
    • ClusterScalability Oct13-Oct27
    • None
    • None
    • None
    • None
    • None
    • None
    • None

      One suggestion to fix would be to update the library and before we create an object check the size we are initializing it with. If 0, create the object with the default constructor that does not accept size as an argument.

      This seems like it would fix things, but the more likely issue is we are doing something wrong when we are linking the library to the server code.

      Acceptance criteria:

      • Determine if we are linking the OTEL library to the mongo codebase
        • Why do we only see this issue in dynamic builds?
        • Is the library using a separate allocation mechanism?

      If we have determined that there is nothing strange about how we link the OTEL library to the mongo codebase. We (N&O / CS) can move forward with updating the OTEL library and bringing up this issue with the upstream maintainers.

            Assignee:
            Unassigned
            Reporter:
            Ben Gawel
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: