WMI GetLoggedOnUser blocking and CPU full on OCS 2.1.0.3

Bug #1300172 reported by p.deprey@linkbynet.com
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
OCS Inventory: Windows Agent
Fix Released
High
Didier Liroulet

Bug Description

Hi OCS team,

On some servers 2003/2003 R2 we detected a serious problem using the new agent 2.1.0.3. (was working fine with 2.0.5).
Servers can take about severals hours to finish the inventory or even sometimes killed by our admin team when our CPU monitoring trigger.

On our investigation, we've seen the process "wmiprvse.exe" using 100% of the CPU when OCSinventory.exe is launched.

last lines of ocsinventory.log:
AGENT => Launching hardware and software checks
 INVENTORY => Loading Download history

Here the weak contains of log "C:\Documents and Settings\All Users\Application Data\OCS Inventory NG\Agent\SysInfo.log ":

WMI Connect: Trying to connect to WMI namespace root\cimv2 on device <Localhost>...OK.
DMI: Trying to initialize COM...OK
DMI: Trying to get raw SMBios data...OK
Registry Connect: Trying to connect to HKEY_LOCAL_MACHINE on device <Localhost>...OK.
WMI GetLoggedOnUser: Trying to find Win32_LoggedOnUser WMI objects...

It seems that OCSinventory.exe is blocked when it checks objects of this WMI class "Win32_LoggedOnUser ".
When using wbemtest to parse this class, we've detected about 28000 objets.
This problem is very present when OCS is executed on a CLUSTER server Windows 2003.

We suspect that this revision can be the cause :
http://bazaar.launchpad.net/~dliroulet/ocsinventory-windows-agent/trunk/revision/457

This problem is very critical for us, we can not continue the migration of ocs 2.0.5=>2.1.0.3

can you check that problem please?

thank you for your support!

Regards,

Pierre

Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi.

Are your computers binded to an AD with more than 28000 users account ?

Regards

Changed in ocsinventory-windows-agent:
importance: Undecided → High
assignee: nobody → Didier Liroulet (dliroulet)
Revision history for this message
p.deprey@linkbynet.com (p-deprey) wrote :

Hi Didier,

The error is actually on 3 servers Windows 2003 :

-a server1 in an AD and MSSQL2005 cluster (main node) => more than 28000 connexion in Win32_LoggedOnUser

-a server2 in workgroup and ORACLE cluster (main node) and a MSSQL 2000 (no cluster) => more than 10000 connexion in Win32_LoggedOnUser

-a server3 in workgroup and MSSQL2005 (no cluster) => more than 3000 connexion in Win32_LoggedOnUser

at this time, these servers are all using MSSQL <=2005 but don't know if it really match with this bug.

Regards,

Pierre.

Revision history for this message
Didier Liroulet (dliroulet) wrote :

Hi.

Could you check on your server if the attached script uses 100% CPU on a long time ?

Cheers

Revision history for this message
p.deprey@linkbynet.com (p-deprey) wrote :

hello Didier,

I test the script on the server with cscript. Here the result:

- During 5 seconds the cpu is at 100% (wmiprvse.exe)
- Then, an error occurs: loggedOnUsers.vbs(18, 6) (null): 0x80041002 and script stopped.

I try to add an "on error resume next" on the vbscript you provide and try again.
The "session start time" message appears every 3 or 4 seconds (seems to be per session detected).
wmiprvse.exe is always 100% cpu until script end.
Total time execution is about 4 minutes.

Regards,

Pierre.

Revision history for this message
p.deprey@linkbynet.com (p-deprey) wrote :

Hi Didier,

I Found this KB : http://support.microsoft.com/kb/2257980

Seems to match with this error 0x80041002 for Win 2003 SP2.

I'll keep you posted about this patching.

Regards,

Pierre

Revision history for this message
p.deprey@linkbynet.com (p-deprey) wrote :

Hello Didier,

The problem is solved. When install these patchs from Microsoft:

For windows 2003 SP2: http://support.microsoft.com/kb/2257980/en
For Winows 2008 : http://support.microsoft.com/kb/2464876/en
For windows 2008 R2: http://support.microsoft.com/kb/2465990/en

this problem was present on 6 servers about 3000.

Anyway, I advice to run all this KB to fix WMI performance or errors:
http://support.microsoft.com/kb/2591403

This bug can be closed.

Regards,

Pierre

Changed in ocsinventory-windows-agent:
status: New → Fix Committed
Changed in ocsinventory-windows-agent:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.