Skip to content

Conversation

@enjoy-binbin
Copy link
Contributor

@enjoy-binbin enjoy-binbin commented Nov 9, 2023

This is a follow-up fix to #12733. We need to apply the same changes to
delKeysInSlot. Refer to #12733 for more details.

This PR contains some other minor cleanups / improvements to the test suite and docs.
It uses the postnotifications test module in a cluster mode test which revealed a leak in the test module (fixed).

…unit

This is a follow-up fix to redis#12733. We need to apply the same changes to
delKeysInSlot. Refer to redis#12733 for more details.
@enjoy-binbin enjoy-binbin requested a review from oranagra November 9, 2023 08:44
@enjoy-binbin
Copy link
Contributor Author

enjoy-binbin commented Nov 9, 2023

https://github.com/redis/redis/actions/runs/6809388721/job/18515571370?pr=12745
report leaks:

*** [err]: Sanitizer error: 
=================================================================
==33239==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 32 byte(s) in 2 object(s) allocated from:
    #0 0x7f2a828b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x561e6e971b57 in ztrymalloc_usable_internal /home/runner/work/redis/redis/src/zmalloc.c:116
    #2 0x561e6e971b57 in zmalloc_usable /home/runner/work/redis/redis/src/zmalloc.c:159
    #3 0x7f2a7f6e6785 in KeySpace_ServerEventCallback /home/runner/work/redis/redis/tests/modules/postnotifications.c:236
    #4 0x7f2a7f6e6785 in KeySpace_ServerEventCallback /home/runner/work/redis/redis/tests/modules/postnotifications.c:212

Indirect leak of 72 byte(s) in 2 object(s) allocated from:
    #0 0x7f2a828b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x561e6e971a7e in ztrymalloc_usable_internal /home/runner/work/redis/redis/src/zmalloc.c:116
    #2 0x561e6e971a7e in zmalloc /home/runner/work/redis/redis/src/zmalloc.c:144
    #3 0x561e6e9cb60d in createEmbeddedStringObject /home/runner/work/redis/redis/src/object.c:93
    #4 0x561e6e9cb60d in createStringObject /home/runner/work/redis/redis/src/object.c:125
    #5 0x561e6e9b4fe6 in processMultibulkBuffer /home/runner/work/redis/redis/src/networking.c:2400
    #6 0x561e6e9b6e39 in processInputBuffer /home/runner/work/redis/redis/src/networking.c:2556
    #7 0x561e6e9b8493 in readQueryFromClient /home/runner/work/redis/redis/src/networking.c:2715
    #8 0x561e6ec51ad0 in callHandler /home/runner/work/redis/redis/src/connhelpers.h:79
    #9 0x561e6ec51ad0 in connSocketEventHandler /home/runner/work/redis/redis/src/socket.c:298
    #10 0x561e6e924821 in aeProcessEvents /home/runner/work/redis/redis/src/ae.c:436
    #11 0x561e6e924821 in aeMain /home/runner/work/redis/redis/src/ae.c:496
    #12 0x561e6e9102ba in main /home/runner/work/redis/redis/src/server.c:7212
    #13 0x7f2a82429d8f  (/lib/x86_64-linux-gnu/libc.so.6+0x29d8f)

Indirect leak of 68 byte(s) in 2 object(s) allocated from:
    #0 0x7f2a828b4887 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:145
    #1 0x561e6e971a7e in ztrymalloc_usable_internal /home/runner/work/redis/redis/src/zmalloc.c:116
    #2 0x561e6e971a7e in zmalloc /home/runner/work/redis/redis/src/zmalloc.c:144
    #3 0x561e6e9cb60d in createEmbeddedStringObject /home/runner/work/redis/redis/src/object.c:93
    #4 0x561e6e9cb60d in createStringObject /home/runner/work/redis/redis/src/object.c:125
    #5 0x561e6eba2ed2 in RM_CreateString /home/runner/work/redis/redis/src/module.c:2575
    #6 0x7f2a7f6e67bd in KeySpace_ServerEventCallback /home/runner/work/redis/redis/tests/modules/postnotifications.c:238
    #7 0x7f2a7f6e67bd in KeySpace_ServerEventCallback /home/runner/work/redis/redis/tests/modules/postnotifications.c:212

SUMMARY: AddressSanitizer: 172 byte(s) leaked in 6 allocation(s).

@MeirShpilraien do you have any ideas about the leak?

@oranagra oranagra merged commit c85a9b7 into redis:unstable Dec 11, 2023
@enjoy-binbin enjoy-binbin deleted the fix_delKeysInSlot_unit branch December 12, 2023 01:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

2 participants