The strange case of missing inventory data


Luca Ansaloni, a colleague of mine we’re working on a large SCCM deployment with, reported an issue on SCCM agents not reporting hardware inventory, but being operative for all other functions. The issue affected 2% to 3% of all deployed agents  so it deserved a further analysis. Luca found out it was related to the CCM_SystemDevices query. Specifically in InventoryAgent.log he found:

<![LOG[Collection: Namespace = \\.\root\cimv2\sms; Query = SELECT __CLASS, __PATH, __RELPATH, CompatibleIDs, DeviceID, HardwareIDs, IsPnP, Name FROM CCM_SystemDevices; Timeout = 600 secs.]LOG]!><time="10:03:26.608+-60" date="02-13-2009" component="InventoryAgent" context="" type="1" thread="792" file="collectiontask.cpp:347">
<![LOG[Failed to add an instance of class CCM_SystemDevices to historical store: 80041001]LOG]!><time="10:03:27.561+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="collectiontask.cpp:452">
<![LOG[Failed to AddReport() for CCM_SystemDevices class to historical store: 80041001]LOG]!><time="10:03:27.561+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="collectiontask.cpp:458">
<![LOG[Collection: (80040900) Failed to update Data Store]LOG]!><time="10:03:27.561+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="invcommon.cpp:190">
<![LOG[Raising event:
[SMS_CodePage(850), SMS_LocaleID(1040)]
instance of CLIMSG_HINV_WARNING_QUERYFAILURE
{
    ClientID = "GUID:B6F1572D-7271-4439-9C25-86EF6E4A851C";
    Data1 = "SELECT __CLASS, __PATH, __RELPATH, CompatibleIDs, DeviceID, HardwareIDs, IsPnP, Name FROM CCM_SystemDevices";
    Data2 = "";
    Data3 = "";
    DateTime = "20090213090327.577000+000";
    InventoryActionID = "{00000000-0000-0000-0000-000000000001}";
    MachineName = "H003597";
    ProcessID = 3600;
    SiteCode = "HG0";
    ThreadID = 792;
};
]LOG]!><time="10:03:27.608+-60" date="02-13-2009" component="InventoryAgent" context="" type="1" thread="792" file="event.cpp:525">
<![LOG[Failed to process instances of CCM_SystemDevices: 80040900]LOG]!><time="10:03:27.608+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="collectiontask.cpp:361">
<![LOG[Collection: Cycle failed: 80040900]LOG]!><time="10:03:27.624+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="collectiontask.cpp:271">
<![LOG[Inventory: Collection Task completed in 5.062 seconds]LOG]!><time="10:03:27.624+-60" date="02-13-2009" component="InventoryAgent" context="" type="1" thread="792" file="agentstate.cpp:787">
<![LOG[Inventory: Collection task failed to completed successfully. No report will be sent.]LOG]!><time="10:03:27.624+-60" date="02-13-2009" component="InventoryAgent" context="" type="3" thread="792" file="agentstate.cpp:826">

Imo here we have a first issue, not yet acknowledged by PSS, if a single query fails to insert data in the WBEM store the hw inventory must not fail, it must return everything it can collect and generate a status message for the failed queries.

Whichever the case the issue needed to be solved. As it turned out the affected clients had some snapshot volumes defined by VSS (volsnap.sys) and some of the generic volumes created contained not printable chars n their display name. These chars wreck havoc the entire hw inventory process. Here we have a second issue, the PSS acknowledged, volume name must not have unprintable chars: this is currently being investigates by the OS team.

clip_image002

The workaround Luca found is to uninstall the device and let the system discover it again hoping it won’t add the unprintable chars. He automated the uninstall using devcon.exe and used a software distribution to recover the broken agents. It worked in 100% of the cases.

Credits to Luca.

– Daniele

This posting is provided "AS IS" with no warranties, and confers no rights.

Technorati Tags: ,,
  1. #1 by Russell Johnson on April 8, 2013 - 6:08 pm

    Collection: Namespace = \\.\root\cimv2\sms; Query = SELECT __CLASS, __PATH, __RELPATH, CompatibleIDs, DeviceID, HardwareIDs, IsPnP, Name FROM CCM_SystemDevices; Timeout = 600 secs. 04/08/13 7:56:35 AM InventoryAgent 3744 (0x0EA0)
    Failed to add an instance of class CCM_SystemDevices to historical store: 8004100A 04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    Failed to AddReport() for CCM_SystemDevices class to historical store: 8004100A 04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    Collection: (80040900) Failed to update Data Store 04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    Raising event:
    [SMS_CodePage(437), SMS_LocaleID(1033)]
    instance of CLIMSG_HINV_WARNING_QUERYFAILURE
    {
    ClientID = “GUID:05CC9A0C-C65C-43B1-B5CF-87EC8DBFD08D”;
    Data1 = “SELECT __CLASS, __PATH, __RELPATH, CompatibleIDs, DeviceID, HardwareIDs, IsPnP, Name FROM CCM_SystemDevices”;
    Data2 = “”;
    Data3 = “”;
    DateTime = “20130408145636.063000+000”;
    InventoryActionID = “{00000000-0000-0000-0000-000000000001}”;
    MachineName = “TEST-SURFACE”;
    ProcessID = 1720;
    SiteCode = “NBG”;
    ThreadID = 3744;
    };
    04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    Failed to process instances of CCM_SystemDevices: 80040900 04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    Collection: Cycle failed: 80040900 04/08/13 7:56:36 AM InventoryAgent 3744 (0x0EA0)
    ==============================================================================================
    I think it has to do with the USB 3.0 eXtensible Host Controller. wbemtest indicates a “” for one of the devices. I used wmi explorer and found this Host Controller was the only other device not accounted for in wbemtest. wmi explorer lists the name as “Intel(R) USB 3.0 eXtensible Host Controller – 0100 (Microsoft)#13#10”, and I think the “#13#10” indicates some nonsensical characters. The friendly name in the registry is weird, so I think that’s athe actual problem: “FriendlyName”=”@System32\\drivers\\usbxhci.sys,#1073807361;%1 USB 3.0 eXtensible Host Controller – %2 (Microsoft);(Intel(R),0100)”. As far as I can tell, al the other devices with Friendly Names look normal like “Bluetooth Device (Personal Area Network)”.
    I’ve removed and re-discovered the eXtensible Host Controller, but that didn’t help. I’m considering editing the FriendlyName and testing that.

    • #2 by Russell Johnson on April 8, 2013 - 11:27 pm

      Oops, can’t edit the friendly name. Looks like a call to PSS…

    • #3 by Daniele Grandini on April 18, 2013 - 6:11 am

      From what I can read errors are related to the historical store, did you try to zap and rebuild the wmi store?

  2. #4 by Russell Johnson on April 7, 2013 - 12:56 am

    I am unable to run a h/w inventory on a Microsoft Surface running Win 8 Ent. This is the standard query: Collection: Namespace = \\.\root\cimv2\sms; Query = SELECT __CLASS, __PATH, __RELPATH, CompatibleIDs, DeviceID, HardwareIDs, IsPnP, Name FROM CCM_SystemDevices; Timeout = 600 secs.

    I’ve found via wbemtest that the “Timeout” parameter causes an invalid query error. if I remove the Timeout section, the query runs without error in wbemtest.

    Anyone know a way around this? Thanks!

    • #5 by Daniele Grandini on April 8, 2013 - 7:33 am

      how long does the query take from wbemtest?

      • #6 by Russell Johnson on April 8, 2013 - 5:14 pm

        Hi Daniele,
        The query response is just about instaneous.

    • #7 by Daniele Grandini on April 8, 2013 - 5:33 pm

      uhm I just tried on a WS2012 machine and on a Win8 machine without any glitch, the syntax is correct. In webemtest you probably cannot use the timeout directive (can’t remember to have ever used it in WMI queries). Which error are you getting in inventoryagent.log?

  3. #8 by Roel Janssens on December 22, 2010 - 11:12 am

    Many Many Many thanks Daniele, there was indead a strange character in HKLM\…\Uninstall :-)

  4. #9 by Iain on November 11, 2009 - 4:46 am

    Hi Daniele, we are seeing almost exactly the same issue however checking the generic volume display name did not show similar unprintable characters.

    I suspect that something else may have similar corruption but I can’t figure out how Luca discovered where the invalid characters were from. Was there a particular log file that gave an indication?

    Cheers,

    Iain

    • #10 by Daniele Grandini on November 12, 2009 - 9:59 am

      Hi Iain,
      you should find the culprit in InventoryAgent.log.

      • #11 by Iain on November 23, 2009 - 2:16 am

        Yeah I looked at the inventory agent log and it says that the issue is in:

        Collection: Namespace = \\.\root\cimv2\sms; Query = SELECT __CLASS, __PATH, __RELPATH, ARPDisplayName, CM_DSLID, EvidenceSource, InstallDate, InstallDirectoryValidation, InstalledLocation, InstallSource, InstallType, Language, LocalPackage, ProductCode, ProductID, ProductName, ProductVersion, Publisher, RegisteredUser, ServicePack, SoftwareCode, SoftwarePropertiesHash, SoftwarePropertiesHashEx, UninstallString, UpgradeCode, VersionMajor, VersionMinor FROM SMS_InstalledSoftware; Timeout = 600 secs. InventoryAgent 22/11/2009 3:05:36 PM 5756 (0x167C)
        Failed to add an instance of class SMS_InstalledSoftware to historical store: 80041001 InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Failed to AddReport() for SMS_InstalledSoftware class to historical store: 80041001 InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Collection: (80040900) Failed to update Data Store InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Raising event:
        [SMS_CodePage(850), SMS_LocaleID(3081)]
        instance of CLIMSG_HINV_WARNING_QUERYFAILURE
        {
        ClientID = “GUID:93E0EB00-D97E-48FD-BB60-C42FE9FFD73B”;
        Data1 = “SELECT __CLASS, __PATH, __RELPATH, ARPDisplayName, CM_DSLID, EvidenceSource, InstallDate, InstallDirectoryValidation, InstalledLocation, InstallSource, InstallType, Language, LocalPackage, ProductCode, ProductID, ProductName, ProductVersion, Publisher, RegisteredUser, ServicePack, SoftwareCode, SoftwarePropertiesHash, SoftwarePropertiesHashEx, UninstallString, UpgradeCode, VersionMajor, VersionMinor FROM SMS_InstalledSoftware”;
        Data2 = “”;
        Data3 = “”;
        DateTime = “20091122053538.468000+000”;
        InventoryActionID = “{00000000-0000-0000-0000-000000000001}”;
        MachineName = “G743DTS04”;
        ProcessID = 2492;
        SiteCode = “S64”;
        ThreadID = 5756;
        };
        InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Failed to process instances of SMS_InstalledSoftware: 80040900 InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Collection: Cycle failed: 80040900 InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Inventory: Collection Task completed in 9.047 seconds InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)
        Inventory: Collection task failed to completed successfully. No report will be sent. InventoryAgent 22/11/2009 3:05:38 PM 5756 (0x167C)

        But I can’t see how I work out what is invalid in these instances it displays. Any ideas as to how I determine where the issues is from the above?

        Regards,

        Iain

      • #12 by Iain on November 24, 2009 - 7:25 am

        Hi Daniele,

        Yeah I know that the inventory agent log lists similar errors, ehat I can’t figure out is how you knew to look in the snapshot volume in device manager.?

      • #13 by Daniele Grandini on November 25, 2009 - 12:04 pm

        Hi Ian,
        sorry for the delay answering your questions, I took a little vacation. Basically you should take the WMI query and execute it via CIM studio or wbem test, in your case, since it’s related to add/remove program you can check the following registry key for “strange” chars: HKLM\Sw\Microsoft\Windows\CurrentVersion\Uninstall

        Daniele

Leave a reply to Daniele Grandini Cancel reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.