Skip to content

Write a SerDes lifecycle test for memory leak validation using ASan#469

Open
isaurab007 wants to merge 1 commit intoawslabs:native-schema-registry-releasefrom
isaurab007:native-schema-registry-c-valgrind-tests
Open

Write a SerDes lifecycle test for memory leak validation using ASan#469
isaurab007 wants to merge 1 commit intoawslabs:native-schema-registry-releasefrom
isaurab007:native-schema-registry-c-valgrind-tests

Conversation

@isaurab007
Copy link
Copy Markdown
Contributor

Issue #, if available:

Right now, although ASan is integrated with our build system, there is no test for the SerDes lifecycle (initiate, encode/dispose, dispose) and multiple encode/decode iterations in the C layer. Hence, there is no way to catch memory leaks in this flow.

Description of changes:

This PR adds these tests where it covers:

  1. test_serializer_lifecycle_memory_management
  2. test_deserializer_lifecycle_memory_management
  3. test_full_serialization_deserialization_cycle
  4. test_multiple_operations_memory_management

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Copy link
Copy Markdown
Contributor

@knoxy5467 knoxy5467 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please raise an issue with Graalvm about their memory leak.

Comment on lines +73 to +74
# There are memory leaks in graal_create_isolate. Uncomment after fixing.
# schema_registry_memory_leak_test
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can this be more descriptive as to where and what the memory leak is from?

read_only_byte_array_test
mutable_byte_array_test
glue_schema_registry_error_test
# There are memory leaks in graal_create_isolate. Uncomment after fixing.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

graal_create is outside of our projects scope correct? Additionally if there are leaks in graalvm then we should raise and issue on their repo.

include(cmake/CodeCoverage.cmake)
set(min_code_coverage 100)
setup_target_for_coverage(coverage "ctest ." coverage ${min_code_coverage})
endif() No newline at end of file
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NIT: unneeded formatting changes. Only fix if second revision is needed.

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

Successfully merging this pull request may close these issues.

2 participants