SCCM 2012 R2 query crash on query

Hi,

I have a query resulting in console crash during execution. The query is running for a time and after 2m20 it is crashing. No error message just "The sccm console stop  working".

From the event viewer.

Application: Microsoft.ConfigurationManagement.exe

Framework Version: v4.0.30319

Description: The process was terminated due to an unhandled exception.

Exception Info: System.OutOfMemoryException

Stack:

   at System.Runtime.InteropServices.Marshal.ThrowExceptionForHRInternal(Int32, IntPtr)

at System.Management.ManagementObjectCollection+ManagementObjectEnumerator.MoveNext()

   at Microsoft.ConfigurationManagement.ManagementProvider.WqlQueryEngine.WqlQueryResultsObject+<GetEnumerator>d__0.MoveNext()

   at Microsoft.ConfigurationManagement.AdminConsole.QueryAdapterForUserQueries.DoAction(Microsoft.EnterpriseManagement.UI.DataModel.DataQueryBase, System.Collections.Generic.IList`1<System.Uri>, System.Collections.Generic.IDictionary`2<System.String,System.Object>, System.Collections.Generic.IList`1<Microsoft.EnterpriseManagement.UI.DataModel.IDataItem>, System.String)

   at Microsoft.EnterpriseManagement.UI.DataModel.QueryQueue.StartExecuteQuery(System.Object, Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleJobEventArgs)

   at Microsoft.ConfigurationManagement.AdminConsole.ConsoleJobExceptionHandler.ExecuteJob(System.ComponentModel.IComponent, System.EventHandler`1<Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleJobEventArgs>, System.Object, Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleJobEventArgs)

   at Microsoft.EnterpriseManagement.ConsoleFramework.ConsoleJobsService.JobThread(System.Object)

   at System.Threading.QueueUserWorkItemCallback.WaitCallback_Context(System.Object)

   at System.Threading.ExecutionContext.Run(System.Threading.ExecutionContext, System.Threading.ContextCallback, System.Object, Boolean)

   at System.Threading.QueueUserWorkItemCallback.System.Threading.IThreadPoolWorkItem.ExecuteWorkItem()

   at System.Threading.ThreadPoolWorkQueue.Dispatch()

   at System.Threading._ThreadPoolWaitCallback.PerformWaitCallback()

Any idea?

Thanks,



  • Edited by FRacine Friday, March 20, 2015 12:30 PM
March 20th, 2015 12:19pm

No we did not tweak the memory. I strongly believe seeing the console crashing is not a normal behavior and console should report data as expected. We are a small organisation and I believe bigger organisation would have bigger result easily. The crash is happening a lot before all result come down.

"A lot more stable" ;-)

http://myitforum.com/myitforumwp/2013/02/18/configuration-manager-2012-console-crashes/


  • Edited by FRacine Friday, March 20, 2015 2:03 PM
Free Windows Admin Tool Kit Click here and download it now
March 20th, 2015 1:58pm

Hi,

Any update?

Have you checked the SmsAdminUI.log and Smsprov.log?

Best Regards,

Joyce

March 27th, 2015 5:54am

You could try without join class "SMS_G_System_OPERATING_SYSTEM", because SMS_R_System.OperatingSystemNameandVersion reports almost the same. "Order by" is also not needed, because you can do it in console afterwards.

select SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version, SMS_G_System_ADD_REMOVE_PROGRAMS.Publisher, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.LastLogonUserName, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 6:44am

Hi,

I got a look to smsadmini.log. Nothing very interesting. About smsprov.log, I don't have access to the site server :(

I found on Internet someone had a similar problem with a 10k query result. Sound the problem is with the WMI memory. I asked the sccm admin to get a look to that.

Thanks,

March 27th, 2015 7:45am

I did use that query on SMS 2.0 and 2003 and never got a console crash. We have 1000 computers. I know it is a big result but why would the sccm 2012 R2 behavior would m,ake it crash.

It is because the console result is too big for 2012 R2 or because there are timeout?

You should read this blog post. http://www.enhansoft.com/blog/how-to-perform-a-basic-software-audit

1000 * 186 = 186,000 rows of data, that is a huge!

You should be doing this within SRS, where it can handle this amount of data.

On top of that, did you know that your query will only fine x86 software titles.

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 8:33am

Still crashing
March 27th, 2015 8:42am

It would be better to create two reports. One for Count Programs Group by Name and the second with a filter on program Name.
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 8:49am

Actually we are migrating Vista to Windows 8.1 and the softwares are 32 bits.

I know it is big. We don't have 10000 computers but 1000. I believe it is big but the console is crashing a lot before reaching the 1000 computers. We are crashing at 30 K rows and this was working on SMS 2003 with no problem.

March 27th, 2015 8:56am

It would be better to create two reports. One for Count Programs Group by Name and the second with a filter on program Name.

There are already built-in SSRS reports for this, there is no need to create new ones.

Count of all instances of software registered with Add or Remove Programs

Computers with specific software registered in Add Remove Programs

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 9:02am

I agree that the console should not crash, however I also agree that the console should cut you off after 10,000 rows too, strictly for performance reasons.

SSRS is setup for this type of query. Why use something that clearly was NEVER designed handle almost 200,000 rows of data?

Just because it worked in SMS 2003 doesnt mean that it should work in CM12. There are far too many variables. for example: are you physical or virtual, How are the Hard drive setup, did to adjust the WMI memory limit?  what other queries are happening at the same time? etc.

Anyways, if you want it fixed you need to  open a case with CSS, they are the only ones that can fix this.

March 27th, 2015 9:10am

It would be better to create two reports. One for Count Programs Group by Name and the second with a filter on program Name.

There are already built-in SSRS reports for this, there is no need to create new ones.

Count of all instances of software registered with Add or Remove Programs

Computers with specific software registered in Add Remove Programs

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 9:13am

Garth, I am reading a lot about what you are doing since 10 years on myitforums. I have full respect in your knowledge.

There may be thousands of reasons doing a query and seeing 30k, 100k or more lines appearing. After seeing your result the operator should refine is query to get what he wants. The console should never crash as it is his job reporting the result of query whatever its good or not. I am not running those query daily.

My problem is the console is crashing and people are saying use SSRS. I believe SSRS is great but I am using query and there are reasons why I am not using SSRS.

What I would like to know is there are known official limitations or way to solve that issue. I know it is big. I am not stupid.

What I want is doing what I need not someone saying to me to not do what is suppose to be working.

Best wishes,

March 27th, 2015 9:21am

You could try without join class "SMS_G_System_OPERATING_SYSTEM", because SMS_R_System.OperatingSystemNameandVersion reports almost the same. "Order by" is also not needed, because you can do it in console afterwards.

select SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version, SMS_G_System_ADD_REMOVE_PROGRAMS.Publisher, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.LastLogonUserName, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId


I have tested this and it works for me (about 30'000 lines of data returned).
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 9:25am

Mine is also crashing at around 50K with your query. Did you tweak you WMI memory?

How many computers?


  • Edited by FRacine 18 hours 15 minutes ago
March 27th, 2015 9:33am

Mine is also crashing at around 50K with your query. Did you tweak you WMI memory?

How many computers?



500 computers
Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 10:18am

I will get a look to WMI memory.
March 27th, 2015 10:29am

You could try without join class "SMS_G_System_OPERATING_SYSTEM", because SMS_R_System.OperatingSystemNameandVersion reports almost the same. "Order by" is also not needed, because you can do it in console afterwards.

select SMS_G_System_ADD_REMOVE_PROGRAMS.DisplayName, SMS_G_System_ADD_REMOVE_PROGRAMS.Version, SMS_G_System_ADD_REMOVE_PROGRAMS.Publisher, SMS_R_System.OperatingSystemNameandVersion, SMS_R_System.LastLogonUserName, SMS_R_System.Name from  SMS_R_System inner join SMS_G_System_ADD_REMOVE_PROGRAMS on SMS_G_System_ADD_REMOVE_PROGRAMS.ResourceID = SMS_R_System.ResourceId

Free Windows Admin Tool Kit Click here and download it now
March 27th, 2015 10:41am

Mine is also crashing at around 50K with your query. Did you tweak you WMI memory?

How many computers?


  • Edited by FRacine Friday, March 27, 2015 1:31 PM
March 27th, 2015 1:31pm

Hi,

That's strange. The console process is becoming bigger and bigger during Query running.

Free Windows Admin Tool Kit Click here and download it now
April 1st, 2015 6:28am

This topic is archived. No further replies will be accepted.

Other recent topics Other recent topics