Quantcast
Channel: Performance Analysis of Logs (PAL) Tool
Viewing all articles
Browse latest Browse all 913

Commented Unassigned: PAL v2.4 analysis job may hang at 100 percent completion. [25419]

$
0
0
I’d like to describe a hang event that occurred in my environment in hopes that you will be able to determine the cause to prevent it from occurring in future releases.

On my Windows 7 x64 machine, I've executed a long running analysis job on a large BLG that came from 2008 R2. Due to [bug ID 25416](https://pal.codeplex.com/workitem/25416), it took most of the day and then it hung at 100% completion showing: _Analysis 431 of 432 RunningThreads: 1/3_. See the attached screenshot for more info.

Execution command:
```
C:\Program Files\PAL\PAL>start /LOW /WAIT Powershell -NoProfile ".\PAL.ps1" -Log 'Y:\Some Path To My\Blg_file.blg' -ThresholdFile 'C:\Program Files\PAL\PAL\IIS.xml' -Interval 'AUTO' -IsOutputHtml $True -HtmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].htm' -IsOutputXml $False -XmlOutputFileName '[LogFileName]_PAL_ANALYSIS_[DateTimeStamp].xml' -AllCounterStats $True -NumberOfThreads 3 -IsLowPriority $True -OS '64-bit Windows Server 2008 R2' -PhysicalMemory '8' -UserVa '2048'
```

The problem occurred shortly after 7:44 PM when all child PowerShell processes have exited: see the attached DebugDiag log for the sequence of PowerShell process creations and exits.
7:44 PM is the last modified timestamp for PAL generated graphs, but HTML report is 0 bytes in size.

It would appear as parent process ID 7308 (hung PowerShell) did not get the memo that children are done, or perhaps some exceptions that took place prevent it from completing the execution.

Recent exceptions:
```
0:000> !threads
ThreadCount: 10
UnstartedThread: 0
BackgroundThread: 4
PendingThread: 0
DeadThread: 5
Hosted Runtime: no
PreEmptive Lock
ID OSID ThreadOBJ State GC GC Alloc Context Domain Count APT Exception
0 1 1f30 00000000022a69f0 200a220 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 MTA System.Security.SecurityException (0000000003166ca0)
3 2 114c 00000000022c02f0 b220 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 MTA (Finalizer)
4 3 12f4 0000000002a9a9a0 200b020 Enabled 000000010cd0cb68:000000010cd0d5a8 00000000022a3c30 0 MTA System.Management.Automation.ScriptBlockToPowerShellNotSupportedException (000000005702e120)
7 4 1b14 000000000228d1b0 80a220 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 MTA (Threadpool Completion Port)
8 c 2718 000000001c4f8f20 80a220 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 MTA (Threadpool Completion Port)
XXXX 5 0 000000001c4c2a40 1801820 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 Ukn (Threadpool Worker)
XXXX b 0 0000000002281c60 1801820 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 Ukn (Threadpool Worker)
XXXX 6 0 000000001c4ef780 1801820 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 Ukn (Threadpool Worker)
XXXX 9 0 000000001c4ceba0 1801820 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 Ukn (Threadpool Worker)
XXXX a 0 000000001c4eacd0 1801820 Enabled 0000000000000000:0000000000000000 00000000022a3c30 0 Ukn (Threadpool Worker)
0:000> !pe 0000000003166ca0
Exception object: 0000000003166ca0
Exception type: System.Security.SecurityException
Message: Requested registry access is not allowed.
InnerException: <none>
StackTrace (generated):
SP IP Function
000000000018D650 000007FEEE7EECD8 mscorlib_ni!Microsoft.Win32.RegistryKey.OpenSubKey(System.String, Boolean)+0x9f1e18
000000000018D6C0 000007FF005B79D5 System!System.Diagnostics.EventLog.FindSourceRegistration(System.String, System.String, Boolean)+0x135

StackTraceString: <none>
HResult: 8013150a
0:000> !pe 000000005702e120
Exception object: 000000005702e120
Exception type: System.Management.Automation.ScriptBlockToPowerShellNotSupportedException
Message: Can only convert a script block that contains exactly one pipeline or command. Expressions or control structures aren't permitted. Make sure the script block contains exactly one pipeline or command.
InnerException: <none>
StackTrace (generated):
SP IP Function
000000001DC0CB20 000007FF0088671C System_Management_Automation!System.Management.Automation.ScriptBlock.<GetCommandNodesForPowerShellConversion>b__2(System.String)+0x6c
000000001DC0CB80 000007FF008865A9 System_Management_Automation!System.Management.Automation.ScriptBlock.GetSimplePipeline(System.Action`1<System.String>)+0x99
000000001DC0CBC0 000007FF008864A9 System_Management_Automation!System.Management.Automation.ScriptBlock.GetCommandNodesForPowerShellConversion(System.Management.Automation.ExecutionContext)+0x89
000000001DC0CC20 000007FF00885F66 System_Management_Automation!System.Management.Automation.ScriptBlock.GetPowerShell(System.Management.Automation.ExecutionContext, System.Nullable`1<Boolean>, System.Object[])+0x156
000000001DC0CD20 000007FF00884E57 System_Management_Automation!Microsoft.PowerShell.Commands.PSExecutionCmdlet.BeginProcessing()+0xb7

StackTraceString: <none>
HResult: 80131501

```

Please see the attached log for call stacks and other details.
I have the hang dumps and wouldn't mind sharing if that’s what you need to make progress.
Comments: ** Comment from web user: ClintH **

I've put in as much code as I can think of when creating and managing threads. It's all there in PAL.ps1 near line 4400. I'm open to feedback on how to manage the threads better.


Viewing all articles
Browse latest Browse all 913

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>