[ofw] [PATCH] complib/user: fix timer race conditions
Tzachi Dar
tzachid at mellanox.co.il
Mon Jun 28 00:12:05 PDT 2010
I have supplied programs that show that there is a leak, you can fill free to try them.
I agree that the documentation is not good, but it is "obvious" that DeleteTimerQueue must be called.
See for example http://blogs.msdn.com/b/oldnewthing/archive/2004/12/23/331246.aspx
Thanks
Tzachi
> -----Original Message-----
> From: Hefty, Sean [mailto:sean.hefty at intel.com]
> Sent: Monday, June 28, 2010 8:12 AM
> To: Tzachi Dar; Smith, Stan; Fab Tillier; ofw at lists.openfabrics.org
> Cc: Uri Habusha; Yevgeny Kliteynik
> Subject: RE: [PATCH] complib/user: fix timer race conditions
>
> > That is we cannot run CreateTimerQueueTimer and forget the handle
> being
> > created. We need to make sure that it is cleaned, otherwise we will
> have a
> > very big memory leak on 2008 R2 and handle leacks on 2003.
>
> DeleteTimerQueueEx will block until all previously timer-queue timers
> have completed. DeleteTimerQueueTimer is used to cancel a pending
> timer-queue timer. It's not entirely clear from the documentation, but
> it doesn't appear that CreateTimerQueueTimer must be matched with a
> call to DeleteTimerQueueTimer. E.g. the sample for using timer queues
> doesn't call it.
>
> We should see if it appears that there's any memory leak running with
> these patches applied just to be sure.
>
> - Sean
More information about the ofw
mailing list