Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Memory leak in AddressBookTests #706

Open
Sjors opened this issue Feb 1, 2023 · 3 comments
Open

Memory leak in AddressBookTests #706

Sjors opened this issue Feb 1, 2023 · 3 comments
Labels
Bug Something isn't working

Comments

@Sjors
Copy link
Member

Sjors commented Feb 1, 2023

On Ubuntu 22.10 master (e1bf547) using depends:

./configure --enable-suppress-external-warnings --enable-debug --with-sanitizers=address,undefined --disable-asm
********* Start testing of AddressBookTests *********
Config: Using QtTest library 5.15.5, Qt 5.15.5 (x86_64-little_endian-lp64 static debug build; by GCC 12.2.0), ubuntu 22.10
PASS   : AddressBookTests::initTestCase()
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QWARN  : AddressBookTests::addressBookTests() This plugin does not support propagateSizeHints()
QDEBUG : AddressBookTests::addressBookTests() "NotifyAddressBookChanged: bcrt1qg9fv77eltn0vzs0jrxc5qks0009szpfn3m67f8 io - new A isMine=0 purpose=send status=0"
QDEBUG : AddressBookTests::addressBookTests() "NotifyAddressBookChanged: bcrt1q98nu3luk5pvz404ylecg3kks3q0n8h0je5x6z3 io - new B isMine=0 purpose=send status=0"
PASS   : AddressBookTests::addressBookTests()
PASS   : AddressBookTests::cleanupTestCase()
Totals: 3 passed, 0 failed, 0 skipped, 0 blacklisted, 572ms
********* Finished testing of AddressBookTests *********

All tests passed.

~InitExecutor : Stopping thread
~InitExecutor : Stopped thread

=================================================================
==134373==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 552 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)

Direct leak of 520 byte(s) in 13 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d936527  (<unknown module>)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)
    #2 0x140000000b  (<unknown module>)

Direct leak of 184 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf2d7 in __interceptor_calloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:77
    #1 0x7f9c9d925286  (<unknown module>)
    #2 0x2a00000021  (<unknown module>)

Direct leak of 176 byte(s) in 2 object(s) allocated from:
    #0 0x7f9cb72c0488 in operator new(unsigned long) ../../../../src/libsanitizer/asan/asan_new_delete.cpp:95
    #1 0x55fd2bce2fae in QLayoutPrivate::createWidgetItem(QLayout const*, QWidget*) kernel/qlayout.cpp:200

Direct leak of 96 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d932bf2  (<unknown module>)

Direct leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d93a48c  (<unknown module>)

Indirect leak of 4193 byte(s) in 7 object(s) allocated from:
    #0 0x7f9cb72be720 in __interceptor_realloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:85
    #1 0x7f9c9d932cd4  (<unknown module>)

Indirect leak of 120 byte(s) in 3 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d933a37  (<unknown module>)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d93a48c  (<unknown module>)

Indirect leak of 24 byte(s) in 1 object(s) allocated from:
    #0 0x7f9cb72bf90f in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7f9c9d92ac1a  (<unknown module>)

SUMMARY: AddressSanitizer: 6097 byte(s) leaked in 36 allocation(s).
FAIL qt/test/test_bitcoin-qt (exit status: 1)
@Sjors Sjors added the Bug Something isn't working label Feb 1, 2023
@Sjors
Copy link
Member Author

Sjors commented Feb 1, 2023

cc @achow101

@achow101
Copy link
Member

achow101 commented Feb 1, 2023

Based on that output, it seems like an issue in Qt itself?

@hebasto
Copy link
Member

hebasto commented Feb 2, 2023

... using depends

FWIW, all our CI tasks, which uses --with-sanitizers=address, do not use depends.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants