Skip to content

Conversation

@FujiZ
Copy link
Contributor

@FujiZ FujiZ commented Oct 27, 2024

No description provided.

@codecov
Copy link

codecov bot commented Oct 27, 2024

Codecov Report

Attention: Patch coverage is 78.57143% with 3 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/verbs/queue_pair.rs 78.57% 3 Missing ⚠️
Files with missing lines Coverage Δ
src/verbs/queue_pair.rs 70.90% <78.57%> (-0.59%) ⬇️

@FujiZ FujiZ requested a review from dragonJACson October 27, 2024 10:44
@dragonJACson
Copy link
Contributor

I would like to approve this when I get time to test if there are any memory leaks. Or could you please add a valgrind test to CI or append some test screenshots when you get time?

@dragonJACson
Copy link
Contributor

Works fine, approved

$ valgrind --leak-check=full ./target/debug/examples/rc_pingpong_split -d mlx5_0 -g 0 -r 1 -n 2
==161046== Memcheck, a memory error detector
==161046== Copyright (C) 2002-2022, and GNU GPL'd, by Julian Seward et al.
==161046== Using Valgrind-3.19.0 and LibVEX; rerun with -h for copyright info
==161046== Command: ./target/debug/examples/rc_pingpong_split -d mlx5_0 -g 0 -r 1 -n 2
==161046==
 local address: QPN 0x00ea, PSN 0xfbbf5e, GID fe80:0000:0000:0000:e46d:faff:fefa:6bcb
remote address: QPN 0x00eb, PSN 0x61f6fd, GID fe80:0000:0000:0000:e46d:faff:fefa:6bcb
4096 bytes in 0.02 seconds = 257.08 KiB/s
2 iters in 0.02 seconds = 7.78ms/iter
==161046==
==161046== HEAP SUMMARY:
==161046==     in use at exit: 44,669 bytes in 123 blocks
==161046==   total heap usage: 861 allocs, 738 frees, 748,927 bytes allocated
==161046==
==161046== 720 bytes in 1 blocks are possibly lost in loss record 12 of 20
==161046==    at 0x48455EF: calloc (vg_replace_malloc.c:1328)
==161046==    by 0x5048512: rxe_device_alloc (rxe.c:1885)
==161046==    by 0x4F529F7: try_driver (init.c:385)
==161046==    by 0x4F52E2E: try_drivers (init.c:451)
==161046==    by 0x4F52E2E: try_all_drivers (init.c:541)
==161046==    by 0x4F53976: ibverbs_get_device_list (init.c:605)
==161046==    by 0x4F50533: ibv_get_device_list@@IBVERBS_1.1 (device.c:74)
==161046==    by 0x1B2FFF: sideway::verbs::device::DeviceList::new (device.rs:17)
==161046==    by 0x13F00B: rc_pingpong_split::main (rc_pingpong_split.rs:384)
==161046==    by 0x12EA7A: core::ops::function::FnOnce::call_once (function.rs:250)
==161046==    by 0x157B1D: std::sys::backtrace::__rust_begin_short_backtrace (backtrace.rs:152)
==161046==    by 0x14AF20: std::rt::lang_start::{{closure}} (rt.rs:162)
==161046==    by 0x30747F: call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> (function.rs:284)
==161046==    by 0x30747F: do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> (panicking.rs:557)
==161046==    by 0x30747F: try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> (panicking.rs:521)
==161046==    by 0x30747F: catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> (panic.rs:350)
==161046==    by 0x30747F: {closure#2} (rt.rs:141)
==161046==    by 0x30747F: do_call<std::rt::lang_start_internal::{closure_env#2}, isize> (panicking.rs:557)
==161046==    by 0x30747F: try<isize, std::rt::lang_start_internal::{closure_env#2}> (panicking.rs:521)
==161046==    by 0x30747F: catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize> (panic.rs:350)
==161046==    by 0x30747F: std::rt::lang_start_internal (rt.rs:141)
==161046==
==161046== 2,880 bytes in 4 blocks are possibly lost in loss record 17 of 20
==161046==    at 0x48455EF: calloc (vg_replace_malloc.c:1328)
==161046==    by 0x50B9397: mlx5_device_alloc (mlx5.c:2703)
==161046==    by 0x4F529F7: try_driver (init.c:385)
==161046==    by 0x4F52E2E: try_drivers (init.c:451)
==161046==    by 0x4F52E2E: try_all_drivers (init.c:541)
==161046==    by 0x4F53976: ibverbs_get_device_list (init.c:605)
==161046==    by 0x4F50533: ibv_get_device_list@@IBVERBS_1.1 (device.c:74)
==161046==    by 0x1B2FFF: sideway::verbs::device::DeviceList::new (device.rs:17)
==161046==    by 0x13F00B: rc_pingpong_split::main (rc_pingpong_split.rs:384)
==161046==    by 0x12EA7A: core::ops::function::FnOnce::call_once (function.rs:250)
==161046==    by 0x157B1D: std::sys::backtrace::__rust_begin_short_backtrace (backtrace.rs:152)
==161046==    by 0x14AF20: std::rt::lang_start::{{closure}} (rt.rs:162)
==161046==    by 0x30747F: call_once<(), (dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> (function.rs:284)
==161046==    by 0x30747F: do_call<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> (panicking.rs:557)
==161046==    by 0x30747F: try<i32, &(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe)> (panicking.rs:521)
==161046==    by 0x30747F: catch_unwind<&(dyn core::ops::function::Fn<(), Output=i32> + core::marker::Sync + core::panic::unwind_safe::RefUnwindSafe), i32> (panic.rs:350)
==161046==    by 0x30747F: {closure#2} (rt.rs:141)
==161046==    by 0x30747F: do_call<std::rt::lang_start_internal::{closure_env#2}, isize> (panicking.rs:557)
==161046==    by 0x30747F: try<isize, std::rt::lang_start_internal::{closure_env#2}> (panicking.rs:521)
==161046==    by 0x30747F: catch_unwind<std::rt::lang_start_internal::{closure_env#2}, isize> (panic.rs:350)
==161046==    by 0x30747F: std::rt::lang_start_internal (rt.rs:141)
==161046==
==161046== 4,960 bytes in 5 blocks are possibly lost in loss record 18 of 20
==161046==    at 0x48455EF: calloc (vg_replace_malloc.c:1328)
==161046==    by 0x4F52553: find_sysfs_devs_nl_cb (ibdev_nl.c:157)
==161046==    by 0x50039E8: nl_cb_call (netlink.h:139)
==161046==    by 0x50039E8: recvmsgs (nl.c:1000)
==161046==    by 0x50039E8: nl_recvmsgs_report (nl.c:1051)
==161046==    by 0x5003E88: nl_recvmsgs (nl.c:1075)
==161046==    by 0x4F57E2F: rdmanl_get_devices (rdma_nl.c:124)
==161046==    by 0x4F526D9: find_sysfs_devs_nl (ibdev_nl.c:200)
==161046==    by 0x4F53724: ibverbs_get_device_list (init.c:560)
==161046==    by 0x4F50533: ibv_get_device_list@@IBVERBS_1.1 (device.c:74)
==161046==    by 0x1B2FFF: sideway::verbs::device::DeviceList::new (device.rs:17)
==161046==    by 0x13F00B: rc_pingpong_split::main (rc_pingpong_split.rs:384)
==161046==    by 0x12EA7A: core::ops::function::FnOnce::call_once (function.rs:250)
==161046==    by 0x157B1D: std::sys::backtrace::__rust_begin_short_backtrace (backtrace.rs:152)
==161046==
==161046== LEAK SUMMARY:
==161046==    definitely lost: 0 bytes in 0 blocks
==161046==    indirectly lost: 0 bytes in 0 blocks
==161046==      possibly lost: 8,560 bytes in 10 blocks
==161046==    still reachable: 36,109 bytes in 113 blocks
==161046==         suppressed: 0 bytes in 0 blocks
==161046== Reachable blocks (those to which a pointer was found) are not shown.
==161046== To see them, rerun with: --leak-check=full --show-leak-kinds=all
==161046==
==161046== For lists of detected and suppressed errors, rerun with: -s
==161046== ERROR SUMMARY: 3 errors from 3 contexts (suppressed: 0 from 0)

@dragonJACson dragonJACson merged commit f78aee2 into main Nov 7, 2024
@dragonJACson dragonJACson deleted the fz/forget-guard branch November 10, 2024 16:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants