vmware / splinterdb

High Performance Embedded Key-Value Store
https://splinterdb.org
Apache License 2.0
680 stars 57 forks source link

Some tests are failing in ASAN-build mode in /main @ SHA d9fcc407 #554

Closed gapisback closed 1 year ago

gapisback commented 1 year ago

Following tests are tripping up ASAN-builds:

Fixes should be simple.

==208799==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 176128 byte(s) in 1 object(s) allocated from:
    #0 0x7fa2b826a367 in __interceptor_aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:192
    #1 0x7fa2b80e3c1d in platform_aligned_malloc src/platform_linux/platform_inline.h:419
    #2 0x7fa2b80e3c4a in platform_aligned_zalloc src/platform_linux/platform.h:733
    #3 0x7fa2b80e43b6 in io_handle_init src/platform_linux/laio.c:144
    #4 0x55a6b1fdf93e in splinter_io_apis_test tests/functional/io_apis_test.c:218
    #5 0x55a6b20071a2 in test_dispatcher tests/functional/test_dispatcher.c:50
    #6 0x55a6b1fd88f7 in main tests/functional/driver_test.c:13
    #7 0x7fa2b7cd0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Direct leak of 15040 byte(s) in 1 object(s) allocated from:
    #0 0x7fa2b826a367 in __interceptor_aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:192
    #1 0x7fa2b8103e66 in platform_aligned_malloc src/platform_linux/platform_inline.h:419
    #2 0x7fa2b8103efe in platform_aligned_zalloc src/platform_linux/platform.h:733
    #3 0x7fa2b81078ac in task_system_create src/task.c:858
    #4 0x55a6b1fdfc49 in splinter_io_apis_test tests/functional/io_apis_test.c:250
    #5 0x55a6b20071a2 in test_dispatcher tests/functional/test_dispatcher.c:50
    #6 0x55a6b1fd88f7 in main tests/functional/driver_test.c:13
    #7 0x7fa2b7cd0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Indirect leak of 792064 byte(s) in 1 object(s) allocated from:
    #0 0x7fa2b826a367 in __interceptor_aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:192
    #1 0x7fa2b8103e66 in platform_aligned_malloc src/platform_linux/platform_inline.h:419
    #2 0x7fa2b8103efe in platform_aligned_zalloc src/platform_linux/platform.h:733
    #3 0x7fa2b8105262 in task_register_thread src/task.c:366
    #4 0x7fa2b8107a8b in task_system_create src/task.c:873
    #5 0x55a6b1fdfc49 in splinter_io_apis_test tests/functional/io_apis_test.c:250
    #6 0x55a6b20071a2 in test_dispatcher tests/functional/test_dispatcher.c:50
    #7 0x55a6b1fd88f7 in main tests/functional/driver_test.c:13
    #8 0x7fa2b7cd0d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 983232 byte(s) leaked in 3 allocation(s).

Some more failures seen:

==209913==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 15040 byte(s) in 1 object(s) allocated from:
    #0 0x7f948552c367 in __interceptor_aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:192
    #1 0x7f94853c5e66 in platform_aligned_malloc src/platform_linux/platform_inline.h:419
    #2 0x7f94853c5efe in platform_aligned_zalloc src/platform_linux/platform.h:733
    #3 0x7f94853c98ac in task_system_create src/task.c:858
    #4 0x55cac7f31b9c in filter_test tests/functional/filter_test.c:359
    #5 0x55cac7f5b124 in test_dispatcher tests/functional/test_dispatcher.c:42
    #6 0x55cac7f2c8f7 in main tests/functional/driver_test.c:13
    #7 0x7f9484f92d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

Indirect leak of 792064 byte(s) in 1 object(s) allocated from:
    #0 0x7f948552c367 in __interceptor_aligned_alloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:192
    #1 0x7f94853c5e66 in platform_aligned_malloc src/platform_linux/platform_inline.h:419
    #2 0x7f94853c5efe in platform_aligned_zalloc src/platform_linux/platform.h:733
    #3 0x7f94853c7262 in task_register_thread src/task.c:366
    #4 0x7f94853c9a8b in task_system_create src/task.c:873
    #5 0x55cac7f31b9c in filter_test tests/functional/filter_test.c:359
    #6 0x55cac7f5b124 in test_dispatcher tests/functional/test_dispatcher.c:42
    #7 0x55cac7f2c8f7 in main tests/functional/driver_test.c:13
    #8 0x7f9484f92d8f in __libc_start_call_main ../sysdeps/nptl/libc_start_call_main.h:58

SUMMARY: AddressSanitizer: 807104 byte(s) leaked in 2 allocation(s).
gapisback commented 1 year ago

Fixed by above PR into /main