Stack Overflow in powershell causing a crash when nonexistent PSSnapIn is mentioned in a PSC1 file #1289
Comments
Fixed and merged |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Steps to reproduce
Expected behavior
No stack overflow but an error is expected with exception as PSConsoleLoadException.
Actual behavior
Stack Overflow when having a PSC1 file with an invalid pssnapin.
Environment data
Full stackover stack trace:
DBGENG: PDB symbols loaded for 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\clr.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\assembly\NativeImages_v4.0.30319_64\mscorlib\e96b4590c579d08edc2e60cc3e5ae997\mscorlib.ni.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\System32\KERNEL32.dll'
SYMSRV: 'System.Management.Automation.ni.dll' - No files with that filename and index registered, store: http://symweb
SYMSRV: 'System.Management.Automation.ni.dll' - No files with that filename and index registered, store: http://symweb
SYMSRV: 'System.Management.Automation.ni.dll' - No files with that filename and index registered, store: http://symweb
SYMSRV: 'System.Management.Automation.ni.dll' - No files with that filename and index registered, store: http://symweb
DBGENG: PDB symbols loaded for 'C:\Windows\System32\KERNELBASE.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\mscoreei.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\SYSTEM32\MSCOREE.DLL'
DBGENG: PDB symbols loaded for 'C:\Windows\System32\USER32.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\System32\ole32.dll'
*** ERROR: Symbol file could not be found. Defaulted to export symbols for C:\PowerShellTest\PowerShell\Win8\PowerShell\legacy\wttlog.dll -
DBGENG: PDB symbols loaded for 'C:\Windows\System32\combase.dll'
DBGENG: PDB symbols loaded for 'C:\Windows\assembly\NativeImages_v4.0.30319_64\System.Core\46ebe2b057622677cfc3fd04f47081c0\System.Core.ni.dll'
Integrated managed debugging does not support enumeration of symbols.
DUMP_CLASS: 2
DUMP_QUALIFIER: 0
FAULTING_IP:
System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message()+98
00007ffd`adb14d58 488945d0 mov qword ptr [rbp-30h],rax
EXCEPTION_RECORD: (.exr -1)
ExceptionAddress: 00007ffdad868a23 (System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString()+0x0000000000000023)
ExceptionCode: c00000fd (Stack overflow)
ExceptionFlags: 00000001
NumberParameters: 2
Parameter[0]: 0000000000000001
Parameter[1]: 000000001c7f5f88
FAULTING_THREAD: 000007a4
DEFAULT_BUCKET_ID: CLR_EXCEPTION
PROCESS_NAME: TTest.exe
ERROR_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.
EXCEPTION_CODE: (NTSTATUS) 0xc00000fd - A new guard page for the stack cannot be created.
EXCEPTION_CODE_STR: c00000fd
EXCEPTION_PARAMETER1: 0000000000000001
EXCEPTION_PARAMETER2: 000000001c7f5f88
RECURRING_STACK: From frames 0x3 to 0x0
WATSON_BKT_PROCSTAMP: 5771c5d7
WATSON_BKT_PROCVER: 10.0.14378.1000
PROCESS_VER_PRODUCT: Microsoft (R) Windows (R) Operating System
WATSON_BKT_MODULE: System.Management.Automation.ni.dll
WATSON_BKT_MODSTAMP: 5776c9dc
WATSON_BKT_MODOFFSET: 1138a23
WATSON_BKT_MODVER: 3.0.0.0
BUILD_VERSION_STRING: 10.0.14379.1000 (rs1_srv_ps_dev.160628-1500)
MODLIST_WITH_TSCHKSUM_HASH: dc2e614ec83b65d18a416bc53dc93288798fe4f9
MODLIST_SHA1_HASH: de37c21a79fc5e85525a6c979b3207839671423f
NTGLOBALFLAG: 0
APPLICATION_VERIFIER_FLAGS: 0
USER_LCID_STR: ENU
PRODUCT_TYPE: 3
SUITE_MASK: 402
ANALYSIS_SESSION_HOST: DEV-14379-593
ANALYSIS_SESSION_TIME: 07-05-2016 11:00:30.0239
ANALYSIS_VERSION: 10.0.14332.1057 amd64fre
MANAGED_CODE: 1
MANAGED_ENGINE_MODULE: clr
MANAGED_ANALYSIS_PROVIDER: SOS
MANAGED_THREAD_ID: 7a4
MANAGED_EXCEPTION_ADDRESS: 2411170
MANAGED_THREAD_CMD_CALLSTACK: "~~[0x7a4]s; !sos.clrstack"
MANAGED_THREAD_CMD_STACKOBJECTS: "~~[0x7a4]s; !sos.dso"
LAST_CONTROL_TRANSFER: from 00007ffdadb14d58 to 00007ffdad868a23
THREAD_ATTRIBUTES:
THREAD_SHA1_HASH_MOD_FUNC: 24a10747a61080a6d8f48b91d782e1b33166a060
THREAD_SHA1_HASH_MOD_FUNC_OFFSET: 6241d114f205d501447aaf156ab9aa9093722236
OS_LOCALE: en-US
PROBLEM_CLASSES:
STACK_OVERFLOW
Tid [0x11]
Frame [0x00]
CLR_EXCEPTION
BUGCHECK_STR: CLR_EXCEPTION_STACK_OVERFLOW
STACK_TEXT:
00000000
1c7f5f60 00007ffd
ad868a23 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x2300000000
1c7f6030 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f60a0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6120 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f61f0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6260 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f62e0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f63b0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6420 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f64a0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6570 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f65e0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6660 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6730 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f67a0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6820 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f68f0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6960 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f69e0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6ab0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6b20 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6ba0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6c70 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6ce0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6d60 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6e30 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f6ea0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f6f20 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f6ff0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7060 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f70e0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f71b0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7220 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f72a0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7370 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f73e0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f7460 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7530 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f75a0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f7620 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f76f0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7760 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f77e0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f78b0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7920 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f79a0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7a70 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7ae0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f7b60 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7c30 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7ca0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f7d20 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7df0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f7e60 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f7ee0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f7fb0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8020 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f80a0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8170 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f81e0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8260 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8330 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f83a0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8420 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f84f0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8560 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f85e0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f86b0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8720 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f87a0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8870 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f88e0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8960 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8a30 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8aa0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8b20 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8bf0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8c60 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8ce0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8db0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8e20 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f8ea0 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f8f70 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f8fe0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f9060 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f9130 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInException.get_Message+0x9800000000
1c7f91a0 00007ffd
ad8b86fb System_Management_Automation_ni!System.Management.Automation.ParentContainsErrorRecordException.get_Message+0xbb00000000
1c7f9220 00007ffd
ad868b30 System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+0x13000000000
1c7f92f0 00007ffd
adb14d58 System_Management_Automation_ni!System.Management.Automation.Runspaces.PSSnapInExcepRETRACER_ANALYSIS_TAG_STATUS: DEBUG_FLR_EXCEPTION_CODE is not 0xc0000005
THREAD_SHA1_HASH_MOD: 8d9dc88c0e30a2dcc71af2604a1788382dd552c9
FOLLOWUP_IP:
System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString()+23
00007ffd`ad868a23 f3ab rep stos dword ptr [rdi]
FAULT_INSTR_CODE: 8b48abf3
FAULTING_SOURCE_LINE: C:\projects\powershell\src\System.Management.Automation\engine\ErrorPackage.cs
FAULTING_SOURCE_FILE: C:\projects\powershell\src\System.Management.Automation\engine\ErrorPackage.cs
FAULTING_SOURCE_LINE_NUMBER: 1700
SYMBOL_STACK_INDEX: 0
SYMBOL_NAME: System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+23
FOLLOWUP_NAME: wintriag
MODULE_NAME: System_Management_Automation_ni
IMAGE_NAME: System.Management.Automation.dll
DEBUG_FLR_IMAGE_TIMESTAMP: 5776c9dc
STACK_COMMAND: ** Pseudo Context ** ; kb
FAILURE_BUCKET_ID: CLR_EXCEPTION_c00000fd_System.Management.Automation.dll!System.Management.Automation.ErrorRecord.ToString
BUCKET_ID: CLR_EXCEPTION_STACK_OVERFLOW_System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+23
PRIMARY_PROBLEM_CLASS: CLR_EXCEPTION_STACK_OVERFLOW_System_Management_Automation_ni!System.Management.Automation.ErrorRecord.ToString+23
FAILURE_EXCEPTION_CODE: c00000fd
FAILURE_IMAGE_NAME: System.Management.Automation.dll
BUCKET_ID_IMAGE_STR: System.Management.Automation.dll
FAILURE_MODULE_NAME: System_Management_Automation_ni
BUCKET_ID_MODULE_STR: System_Management_Automation_ni
FAILURE_FUNCTION_NAME: System.Management.Automation.ErrorRecord.ToString
BUCKET_ID_FUNCTION_STR: System.Management.Automation.ErrorRecord.ToString
BUCKET_ID_OFFSET: 23
BUCKET_ID_MODTIMEDATESTAMP: 5776c9dc
BUCKET_ID_MODCHECKSUM: 0
BUCKET_ID_MODVER_STR: 3.0.0.0
BUCKET_ID_PREFIX_STR: CLR_EXCEPTION_STACK_OVERFLOW_
FAILURE_PROBLEM_CLASS: CLR_EXCEPTION
FAILURE_SYMBOL_NAME: System.Management.Automation.dll!System.Management.Automation.ErrorRecord.ToString
WATSON_STAGEONE_URL: http://watson.microsoft.com/StageOne/TTest.exe/10.0.14378.1000/5771c5d7/System.Management.Automation.ni.dll/3.0.0.0/5776c9dc/c00000fd/01138a23.htm?Retriage=1
TARGET_TIME: 2016-07-05T18:01:44.000Z
OSBUILD: 14379
OSSERVICEPACK: 1000
SERVICEPACK_NUMBER: 0
OS_REVISION: 0
OSPLATFORM_TYPE: x64
OSNAME: Windows 10
OSEDITION: Windows 10 Server Enterprise TerminalServer DataCenter SingleUserTS
USER_LCID: 0
OSBUILD_TIMESTAMP: 2016-06-28 20:23:29
BUILDDATESTAMP_STR: 160628-1500
BUILDLAB_STR: rs1_srv_ps_dev
BUILDOSVER_STR: 10.0.14379.1000
ANALYSIS_SESSION_ELAPSED_TIME: 1225f
ANALYSIS_SOURCE: UM
FAILURE_ID_HASH_STRING: um:clr_exception_c00000fd_system.management.automation.dll!system.management.automation.errorrecord.tostring
FAILURE_ID_HASH: {a0fa6f12-3ea4-5786-5326-cf511d81a7d8}
FAILURE_ID_REPORT_LINK: http://go.microsoft.com/fwlink/?LinkID=397724&FailureHash=a0fa6f12-3ea4-5786-5326-cf511d81a7d8
Followup: wintriag
The text was updated successfully, but these errors were encountered: