Skip to content

Memory leaks in ocf_volume #866

@mmichal10

Description

@mmichal10

The memory sanitizer has detected memleaks when running test_add_remove.py.

To reproduce the problem, checkout the latest version of #862, set PYOCF_TESTS_PATH="tests/management/test_add_remove.py" and run the script

Direct leak of 240 byte(s) in 30 object(s) allocated from:
    #0 0x7f7484708887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f748084a7d0 in env_zalloc /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/env/ocf_env.h:119
    #2 0x7f748084b040 in ocf_volume_init /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_volume.c:104
    #3 0x7f74808274af in ocf_mngt_core_init_front_volume /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/mngt/ocf_mngt_core.c:233
    #4 0x7f748080ec61 in _ocf_mngt_load_add_cores /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/mngt/ocf_mngt_cache.c:465
    #5 0x7f7480868c31 in _ocf_pipeline_run_step /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/utils/utils_pipeline.c:44
    #6 0x7f7480849e13 in ocf_io_handle /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:170
    #7 0x7f748084a12f in ocf_queue_run_single /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:222
    #8 0x7f748084a1bb in ocf_queue_run /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:232
    #9 0x7f7481046e2d  (/lib/x86_64-linux-gnu/libffi.so.8+0x7e2d)
    #10 0x7f747d20731f  (<unknown module>)
Direct leak of 30 byte(s) in 30 object(s) allocated from:
    #0 0x7f7484708887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x7f748084a7d0 in env_zalloc /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/env/ocf_env.h:119
    #2 0x7f748084b040 in ocf_volume_init /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_volume.c:104
    #3 0x7f748080e777 in _ocf_mngt_load_add_cores /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/mngt/ocf_mngt_cache.c:427
    #4 0x7f7480868c31 in _ocf_pipeline_run_step /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/utils/utils_pipeline.c:44
    #5 0x7f7480849e13 in ocf_io_handle /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:170
    #6 0x7f748084a12f in ocf_queue_run_single /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:222
    #7 0x7f748084a1bb in ocf_queue_run /home/repos/open-cas-linux/ocf/tests/functional/pyocf/ocf/src/ocf/ocf_queue.c:232
    #8 0x7f7481046e2d  (/lib/x86_64-linux-gnu/libffi.so.8+0x7e2d)
    #9 0x7f747d20731f  (<unknown module>)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions