* IWARP Valgrind Issue
@ 2017-06-26 16:57 Dan Coombs
[not found] ` <CY4PR19MB12215AF6E7225113294CF8DB8BDF0-48YGSBrqCmz95OYN2XvIqNvXXbHMiUzJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Dan Coombs @ 2017-06-26 16:57 UTC (permalink / raw)
To: linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Hello,
I'm getting a valgrind error when using the cxgb4/iw_cxgb4 drivers for a Chelsio IWARP card.
System info:
Distribution: Ubuntu 16.04.2 LTS
Kernel: 4.4.0-79-generic
Hardware: Chelsio T420-BT
Drivers:
Chelsio T4/T5/T6 Offload Network Driver - version 3.2.0.0
Chelsio T420-BT rev 2
iw_cxgb4:Chelsio T4/T5/T6 RDMA Driver - version 3.2.0.0
Bug:
Running with sudo valgrind --leak-check=full --undef-value-errors=no
12,720 bytes in 1 blocks are definitely lost in loss record 146 of 150
Call stack:
ibv_create_cq (verbs.c:328)
c4iw_create_cq (verbs.c:245)
calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so)
Code simply opens the device, creates a completion channel and a completion queue with ibv_create_*, then destroys the completion queue and completion channel with ibv_destroy_*.
Thanks,
Dan --
To unsubscribe from this list: send the line "unsubscribe linux-rdma" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <CY4PR19MB12215AF6E7225113294CF8DB8BDF0-48YGSBrqCmz95OYN2XvIqNvXXbHMiUzJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>]
* RE: IWARP Valgrind Issue [not found] ` <CY4PR19MB12215AF6E7225113294CF8DB8BDF0-48YGSBrqCmz95OYN2XvIqNvXXbHMiUzJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org> @ 2017-06-26 20:45 ` Steve Wise 2017-06-26 23:08 ` Dan Coombs 0 siblings, 1 reply; 3+ messages in thread From: Steve Wise @ 2017-06-26 20:45 UTC (permalink / raw) To: 'Dan Coombs', linux-rdma-u79uwXL29TY76Z2rM5mHXA Cc: 'Michael Chen' Hey Dan: > > Hello, > > I'm getting a valgrind error when using the cxgb4/iw_cxgb4 drivers for a Chelsio > IWARP card. > > System info: > Distribution: Ubuntu 16.04.2 LTS > Kernel: 4.4.0-79-generic > Hardware: Chelsio T420-BT > Drivers: > Chelsio T4/T5/T6 Offload Network Driver - version 3.2.0.0 > Chelsio T420-BT rev 2 > iw_cxgb4:Chelsio T4/T5/T6 RDMA Driver - version 3.2.0.0 > This is Chelsio's Unified Wire package, yes? > > Bug: > > Running with sudo valgrind --leak-check=full --undef-value-errors=no > > 12,720 bytes in 1 blocks are definitely lost in loss record 146 of 150 > > > Call stack: > > ibv_create_cq (verbs.c:328) > c4iw_create_cq (verbs.c:245) > calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > > Code simply opens the device, creates a completion channel and a completion > queue with ibv_create_*, then destroys the completion queue and completion > channel with ibv_destroy_*. > That looks like a bug in Chelsio's Unified Wire libcxgb4 core (ie not in the upstream rdma-core libcxgb4 code). I See the leak. Something like this should probably fix it. diff -r fbf715bf1eb7 linux_libs/libcxgb4/src/verbs.c --- a/linux_libs/libcxgb4/src/verbs.c Fri Jun 23 13:44:07 2017 -0700 +++ b/linux_libs/libcxgb4/src/verbs.c Mon Jun 26 13:43:52 2017 -0700 @@ -304,6 +304,7 @@ int c4iw_destroy_cq(struct ibv_cq *ibcq) dev->cqid2ptr[chp->cq.cqid] = NULL; pthread_spin_unlock(&dev->lock); + free(chp->cq.swiq_queue); free(chp->cq.sw_queue); free(chp); return 0; Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: IWARP Valgrind Issue 2017-06-26 20:45 ` Steve Wise @ 2017-06-26 23:08 ` Dan Coombs 0 siblings, 0 replies; 3+ messages in thread From: Dan Coombs @ 2017-06-26 23:08 UTC (permalink / raw) To: Steve Wise, linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: 'Michael Chen' Thanks Steve, this is Chelsio's Unified Wire package. That additional line fixed the leak. - Dan From: Steve Wise <swise-7bPotxP6k4+P2YhJcF5u+vpXobYPEAuW@public.gmane.org> Sent: Monday, June 26, 2017 3:45:44 PM To: Dan Coombs; linux-rdma-u79uwXL29TY76Z2rM5mHXA@public.gmane.org Cc: 'Michael Chen' Subject: RE: IWARP Valgrind Issue Hey Dan: > > Hello, > > I'm getting a valgrind error when using the cxgb4/iw_cxgb4 drivers for a Chelsio > IWARP card. > > System info: > Distribution: Ubuntu 16.04.2 LTS > Kernel: 4.4.0-79-generic > Hardware: Chelsio T420-BT > Drivers: > Chelsio T4/T5/T6 Offload Network Driver - version 3.2.0.0 > Chelsio T420-BT rev 2 > iw_cxgb4:Chelsio T4/T5/T6 RDMA Driver - version 3.2.0.0 > This is Chelsio's Unified Wire package, yes? > > Bug: > > Running with sudo valgrind --leak-check=full --undef-value-errors=no > > 12,720 bytes in 1 blocks are definitely lost in loss record 146 of 150 > > > Call stack: > > ibv_create_cq (verbs.c:328) > c4iw_create_cq (verbs.c:245) > calloc (in /usr/lib/valgrind/vgpreload_memcheck-amd64-linux.so) > > Code simply opens the device, creates a completion channel and a completion > queue with ibv_create_*, then destroys the completion queue and completion > channel with ibv_destroy_*. > That looks like a bug in Chelsio's Unified Wire libcxgb4 core (ie not in the upstream rdma-core libcxgb4 code). I See the leak. Something like this should probably fix it. diff -r fbf715bf1eb7 linux_libs/libcxgb4/src/verbs.c --- a/linux_libs/libcxgb4/src/verbs.c Fri Jun 23 13:44:07 2017 -0700 +++ b/linux_libs/libcxgb4/src/verbs.c Mon Jun 26 13:43:52 2017 -0700 @@ -304,6 +304,7 @@ int c4iw_destroy_cq(struct ibv_cq *ibcq) dev->cqid2ptr[chp->cq.cqid] = NULL; pthread_spin_unlock(&dev->lock); + free(chp->cq.swiq_queue); free(chp->cq.sw_queue); free(chp); return 0; Steve. -- To unsubscribe from this list: send the line "unsubscribe linux-rdma" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2017-06-26 23:08 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-06-26 16:57 IWARP Valgrind Issue Dan Coombs
[not found] ` <CY4PR19MB12215AF6E7225113294CF8DB8BDF0-48YGSBrqCmz95OYN2XvIqNvXXbHMiUzJvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2017-06-26 20:45 ` Steve Wise
2017-06-26 23:08 ` Dan Coombs
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox