Windows Vista Tips

Windows Vista Tips > Newsgroups > Windows Update > QueryHistory API causes memory leak svchost

Reply
Thread Tools Display Modes

QueryHistory API causes memory leak svchost

 
 
Brian E
Guest
Posts: n/a

 
      10-17-2007
It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
steadily until it returns an out of memory error code. This is on a XP SP2
system.

To reproduce, copy the code below into a vbs file and run it using the
cscript program. If you examine svchost memory usage in task manager, you
will see it grow.

Set objSession = CreateObject("Microsoft.Update.Session")
Set objSearcher = objSession.CreateUpdateSearcher
While 1
Set colHistory = objSearcher.QueryHistory(1, 1)
Set colHistory = Nothing
Wend

Could someone please confirm that this is a bug in WUAPI and suggest a
workaround (or perhaps a fix)? Thanks.
 
Reply With Quote
 
 
 
 
Brian E
Guest
Posts: n/a

 
      10-17-2007
Another thing I noticed: if you change the QueryHistory parameters to include
a larger range [e.g. QueryHistory(0, 10)] the memory leak is more pronounced.

"Brian E" wrote:

> It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
> svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
> steadily until it returns an out of memory error code. This is on a XP SP2
> system.
>
> To reproduce, copy the code below into a vbs file and run it using the
> cscript program. If you examine svchost memory usage in task manager, you
> will see it grow.
>
> Set objSession = CreateObject("Microsoft.Update.Session")
> Set objSearcher = objSession.CreateUpdateSearcher
> While 1
> Set colHistory = objSearcher.QueryHistory(1, 1)
> Set colHistory = Nothing
> Wend
>
> Could someone please confirm that this is a bug in WUAPI and suggest a
> workaround (or perhaps a fix)? Thanks.

 
Reply With Quote
 
MowGreen [MVP]
Guest
Posts: n/a

 
      10-17-2007
See if this explains anything:

QueryHistory Method of the IUpdateSearcher Interface
http://msdn2.microsoft.com/en-us/library/aa386532.aspx

There's a link at the bottom of the page to submit feedback to MS.


MowGreen [MVP 2003-2008]
===============
*-343-* FDNY
Never Forgotten
===============


Brian E wrote:

> Another thing I noticed: if you change the QueryHistory parameters to include
> a larger range [e.g. QueryHistory(0, 10)] the memory leak is more pronounced.
>
> "Brian E" wrote:
>
>
>>It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
>>svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
>>steadily until it returns an out of memory error code. This is on a XP SP2
>>system.
>>
>>To reproduce, copy the code below into a vbs file and run it using the
>>cscript program. If you examine svchost memory usage in task manager, you
>>will see it grow.
>>
>>Set objSession = CreateObject("Microsoft.Update.Session")
>>Set objSearcher = objSession.CreateUpdateSearcher
>>While 1
>>Set colHistory = objSearcher.QueryHistory(1, 1)
>>Set colHistory = Nothing
>>Wend
>>
>>Could someone please confirm that this is a bug in WUAPI and suggest a
>>workaround (or perhaps a fix)? Thanks.

 
Reply With Quote
 
MowGreen [MVP]
Guest
Posts: n/a

 
      10-19-2007
I looked for that but, in MS' infinite wisdom, couldn't find a relevant
link without standing on my head. <w>
Here's the URL for submitting feedback to the Microsoft Update Team:
http://blogs.technet.com/mu/contact.aspx

Perhaps that's the best way for the public to submit a bug to them [?]

MowGreen [MVP 2003-2008]
===============
*-343-* FDNY
Never Forgotten
===============


Brian E wrote:

> Thanks. I have submitted feedback, but I think it is only for documentation
> comments. Is there a way to submit a bug?
>
> "MowGreen [MVP]" wrote:
>
>
>>See if this explains anything:
>>
>>QueryHistory Method of the IUpdateSearcher Interface
>>http://msdn2.microsoft.com/en-us/library/aa386532.aspx
>>
>>There's a link at the bottom of the page to submit feedback to MS.
>>
>>
>>MowGreen [MVP 2003-2008]
>>===============
>> *-343-* FDNY
>>Never Forgotten
>>===============
>>
>>
>>Brian E wrote:
>>
>>
>>>Another thing I noticed: if you change the QueryHistory parameters to include
>>>a larger range [e.g. QueryHistory(0, 10)] the memory leak is more pronounced.
>>>
>>>"Brian E" wrote:
>>>
>>>
>>>
>>>>It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
>>>>svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
>>>>steadily until it returns an out of memory error code. This is on a XP SP2
>>>>system.
>>>>
>>>>To reproduce, copy the code below into a vbs file and run it using the
>>>>cscript program. If you examine svchost memory usage in task manager, you
>>>>will see it grow.
>>>>
>>>>Set objSession = CreateObject("Microsoft.Update.Session")
>>>>Set objSearcher = objSession.CreateUpdateSearcher
>>>>While 1
>>>>Set colHistory = objSearcher.QueryHistory(1, 1)
>>>>Set colHistory = Nothing
>>>>Wend
>>>>
>>>>Could someone please confirm that this is a bug in WUAPI and suggest a
>>>>workaround (or perhaps a fix)? Thanks.

>>

 
Reply With Quote
 
Brian E
Guest
Posts: n/a

 
      10-19-2007
Thanks. I have submitted this issue there.

"MowGreen [MVP]" wrote:

> I looked for that but, in MS' infinite wisdom, couldn't find a relevant
> link without standing on my head. <w>
> Here's the URL for submitting feedback to the Microsoft Update Team:
> http://blogs.technet.com/mu/contact.aspx
>
> Perhaps that's the best way for the public to submit a bug to them [?]
>
> MowGreen [MVP 2003-2008]
> ===============
> *-343-* FDNY
> Never Forgotten
> ===============
>
>
> Brian E wrote:
>
> > Thanks. I have submitted feedback, but I think it is only for documentation
> > comments. Is there a way to submit a bug?
> >
> > "MowGreen [MVP]" wrote:
> >
> >
> >>See if this explains anything:
> >>
> >>QueryHistory Method of the IUpdateSearcher Interface
> >>http://msdn2.microsoft.com/en-us/library/aa386532.aspx
> >>
> >>There's a link at the bottom of the page to submit feedback to MS.
> >>
> >>
> >>MowGreen [MVP 2003-2008]
> >>===============
> >> *-343-* FDNY
> >>Never Forgotten
> >>===============
> >>
> >>
> >>Brian E wrote:
> >>
> >>
> >>>Another thing I noticed: if you change the QueryHistory parameters to include
> >>>a larger range [e.g. QueryHistory(0, 10)] the memory leak is more pronounced.
> >>>
> >>>"Brian E" wrote:
> >>>
> >>>
> >>>
> >>>>It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
> >>>>svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
> >>>>steadily until it returns an out of memory error code. This is on a XP SP2
> >>>>system.
> >>>>
> >>>>To reproduce, copy the code below into a vbs file and run it using the
> >>>>cscript program. If you examine svchost memory usage in task manager, you
> >>>>will see it grow.
> >>>>
> >>>>Set objSession = CreateObject("Microsoft.Update.Session")
> >>>>Set objSearcher = objSession.CreateUpdateSearcher
> >>>>While 1
> >>>>Set colHistory = objSearcher.QueryHistory(1, 1)
> >>>>Set colHistory = Nothing
> >>>>Wend
> >>>>
> >>>>Could someone please confirm that this is a bug in WUAPI and suggest a
> >>>>workaround (or perhaps a fix)? Thanks.
> >>

>

 
Reply With Quote
 
Brian E
Guest
Posts: n/a

 
      10-22-2007
Could someone from Microsoft please take a look at this? This is causing a
real problem for us out in the field where customer machines gradually run
out of memory and have to be rebooted. Thanks.

"Brian E" wrote:

> It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
> svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
> steadily until it returns an out of memory error code. This is on a XP SP2
> system.
>
> To reproduce, copy the code below into a vbs file and run it using the
> cscript program. If you examine svchost memory usage in task manager, you
> will see it grow.
>
> Set objSession = CreateObject("Microsoft.Update.Session")
> Set objSearcher = objSession.CreateUpdateSearcher
> While 1
> Set colHistory = objSearcher.QueryHistory(1, 1)
> Set colHistory = Nothing
> Wend
>
> Could someone please confirm that this is a bug in WUAPI and suggest a
> workaround (or perhaps a fix)? Thanks.

 
Reply With Quote
 
Brian E
Guest
Posts: n/a

 
      11-30-2007
In case anyone is wondering, Microsoft did get back to me on this. This is a
confirmed issue that will be addressed in a future version of windows update.

"Brian E" wrote:

> It appears that IUpdateSearcher: QueryHistory causes a small memory leak in
> svchost.exe. If I repeatedly call this API in a loop, svchost.exe grows
> steadily until it returns an out of memory error code. This is on a XP SP2
> system.
>
> To reproduce, copy the code below into a vbs file and run it using the
> cscript program. If you examine svchost memory usage in task manager, you
> will see it grow.
>
> Set objSession = CreateObject("Microsoft.Update.Session")
> Set objSearcher = objSession.CreateUpdateSearcher
> While 1
> Set colHistory = objSearcher.QueryHistory(1, 1)
> Set colHistory = Nothing
> Wend
>
> Could someone please confirm that this is a bug in WUAPI and suggest a
> workaround (or perhaps a fix)? Thanks.

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Memory Leak? majmac Windows Vista General Discussion 1 01-27-2008 09:36 AM
svchost.exe memory leak? annacolleen Windows Vista Performance 5 04-17-2007 10:52 AM
Memory leak Kyaw Windows Vista General Discussion 8 02-22-2007 08:54 PM
Memory leak too much. David Cleland Windows Media Player 1 05-14-2004 12:26 AM
Memory Leak Marsha Windows Update 1 12-29-2003 03:58 PM



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59