Mir

Comment 4 for bug 1295231

Revision history for this message
Daniel van Vugt (vanvugt) wrote : Re: TestClientInput memory leak in CI

It appears to be an order problem. DemoPrivateProtobuf is leaking state into TestClientInput which comes soon after it:

[----------] 4 tests from DemoPrivateProtobuf
[ RUN ] DemoPrivateProtobuf.client_calls_server
[ OK ] DemoPrivateProtobuf.client_calls_server (469 ms)
[ RUN ] DemoPrivateProtobuf.wrapping_message_processor
[ OK ] DemoPrivateProtobuf.wrapping_message_processor (53 ms)
[ RUN ] DemoPrivateProtobuf.server_receives_function_call
[ OK ] DemoPrivateProtobuf.server_receives_function_call (108 ms)
[ RUN ] DemoPrivateProtobuf.client_receives_result
[ OK ] DemoPrivateProtobuf.client_receives_result (58 ms)
[----------] 4 tests from DemoPrivateProtobuf (688 ms total)

...

[----------] 9 tests from TestClientInput
[ RUN ] TestClientInput.clients_receive_key_input
==28645==
==28645== HEAP SUMMARY:
==28645== in use at exit: 19,006 bytes in 279 blocks
==28645== total heap usage: 47,756 allocs, 47,477 frees, 3,006,909 bytes allocated
==28645==
==28645== 3,442 (1,008 direct, 2,434 indirect) bytes in 1 blocks are definitely lost in loss record 246 of 246
==28645== at 0x4C2A980: operator new(unsigned long) (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
==28645== by 0x5649B3F: mir_default_connect(char const*, char const*, void (*)(MirConnection*, void*), void*) (mir_client_library.cpp:104)
==28645== by 0x5648A94: mir_connect (mir_client_library.cpp:146)
==28645== by 0x56493C5: mir_connect_sync (mir_client_library.cpp:172)
==28645== by 0x61C80B: DemoPrivateProtobuf_client_calls_server_Test::TestBody() (test_protobuf.cpp:186)
...
[ FAILED ] TestClientInput.clients_receive_key_input (4229 ms)