jiridanek commented on pull request #880: URL: https://github.com/apache/qpid-dispatch/pull/880#issuecomment-714744094
Faster router startup using BetterRouterStartupLatch to wait for the core thread. It is a bit convoluted, because C function pointers do not work with C++ capturing lambdas (C/C++ does not have dleegates like C# does), but it seems to work much better than the 500ms sleep. New test that tries to send message through router. There is apparently something crucial missing, because I get leaks. I have to yet figure out what I've actually accompished through calling `qdr_link_deliver`. ``` alloc.c: Items of type 'qd_bitmask_t' remain allocated at shutdown: 1 (SUPPRESSED) Leak: 2020-10-22 22:22:16.795683 +0200 type: qd_bitmask_t address: 0x611000043790 /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libasan.so.5(+0x6cc51) [0x7f937b3c0c51] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qd_alloc+0xf5d) [0x7f937abe396a] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(new_qd_bitmask_t+0x26) [0x7f937abecfcf] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qd_bitmask+0x10) [0x7f937abed2ce] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fa981] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fe213] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fe047] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fddb3] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fdc71] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/tests/c_unittests/c_unittests() [0x4fdb1b] alloc.c: Items of type 'qdr_delivery_ref_t' remain allocated at shutdown: 1 (SUPPRESSED) Leak: 2020-10-22 22:22:16.795976 +0200 type: qdr_delivery_ref_t address: 0x61100004aa90 /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libasan.so.5(+0x6cc51) [0x7f937b3c0c51] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qd_alloc+0x2ccb) [0x7f937abe56d8] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(new_qdr_delivery_ref_t+0x26) [0x7f937ad4e537] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qdr_add_delivery_ref_CT+0x16) [0x7f937ad66020] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qdr_delivery_push_CT+0x22f) [0x7f937ad11163] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qdr_delivery_release_CT+0x238) [0x7f937ad0564e] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x57d84a) [0x7f937ad8e84a] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x581ffb) [0x7f937ad92ffb] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(router_core_thread+0x1009) [0x7f937ad6f247] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x48230d) [0x7f937ac9330d] alloc.c: Items of type 'qdr_link_work_t' remain allocated at shutdown: 1 (SUPPRESSED) Leak: 2020-10-22 22:22:16.796097 +0200 type: qdr_link_work_t address: 0x612000035f50 /nix/store/zhbhxp4jgalycwffildy2bwcgmrsmayk-gcc-9.2.0-lib/lib/libasan.so.5(+0x6cc51) [0x7f937b3c0c51] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qd_alloc+0x2ccb) [0x7f937abe56d8] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(new_qdr_link_work_t+0x26) [0x7f937ad4f773] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(qdr_link_issue_credit_CT+0x8ce) [0x7f937ad952bb] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x57db19) [0x7f937ad8eb19] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x581ffb) [0x7f937ad92ffb] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(router_core_thread+0x1009) [0x7f937ad6f247] /home/jdanek/repos/qpid/qpid-dispatch/cmake-build-debug/src/libqpid-dispatch.so(+0x48230d) [0x7f937ac9330d] /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libpthread.so.0(+0x7edd) [0x7f937b33aedd] /nix/store/xg6ilb9g9zhi2zg1dpi4zcp288rhnvns-glibc-2.30/lib/libc.so.6(clone+0x3f) [0x7f9379629aaf] ERROR: Aborted due to unexpected alloc pool leak of type 'qdr_link_work_t' Process finished with exit code 1 ``` ---------------------------------------------------------------- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. For queries about this service, please contact Infrastructure at: [email protected] --------------------------------------------------------------------- To unsubscribe, e-mail: [email protected] For additional commands, e-mail: [email protected]
