Details
-
Bug
-
Status: Resolved
-
Critical
-
Resolution: Fixed
-
Powershell 2.0.2
-
$PSVersionTable
C:\Source\puppetlabs-powershell> $PSVersionTable
Name Value
---- -----
PSVersion 5.1.14393.0
PSEdition Desktop
PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...}
BuildVersion 10.0.14393.0
CLRVersion 4.0.30319.42000
WSManStackVersion 3.0
PSRemotingProtocolVersion 2.3
SerializationVersion 1.1.0.1
$PSVersionTable C:\Source\puppetlabs-powershell> $PSVersionTable Name Value ---- ----- PSVersion 5.1.14393.0 PSEdition Desktop PSCompatibleVersions {1.0, 2.0, 3.0, 4.0...} BuildVersion 10.0.14393.0 CLRVersion 4.0.30319.42000 WSManStackVersion 3.0 PSRemotingProtocolVersion 2.3 SerializationVersion 1.1.0.1
-
Modules
-
3
-
Modules 2016-09-21, Modules 2016-10-05, Modules 2016-10-19, Modules 2016-11-16
Description
Running the powershell module in a Puppet apply on latest Windows 10 (Anniversary Update) hangs during execution.
Repro:
Ensure Powershell is version 5.1.14393.0
Manifest:
exec { "test":
|
command => 'Write-Host "Hello"',
|
provider => powershell,
|
}
|
Use Puppet Module 2.0.2 from the forge
Execute the manifest with puppet apply. Make sure you add --debug to see the bad output
Debug output
Debug: Puppet::Type::Exec::ProviderPosix: feature posix is missing
|
Debug: Puppet::Type::Exec::ProviderShell: feature posix is missing
|
Debug: Creating default schedules
|
Debug: Loaded state in 0.01 seconds
|
Debug: Loaded state in 0.00 seconds
|
Info: Applying configuration version '1470351109'
|
Debug: /Stage[main]/Main/Dot_net_core::Install[test]/Exec[dot_net_core_install_C:/source/puppetconf-2016/temp/base/dnc]/before: subscribes to Notify[xxxx dotnet-win-x64.1.0.0.zip]
|
Debug: 2016-08-04 15:51:50 -0700 C:\WINDOWS\system32\WindowsPowershell\v1.0\powershell.exe -NoProfile -NonInteractive -NoLogo -ExecutionPolicy Bypass -Command - is running as pid: 13716
|
Debug: Waited 50 milliseconds...
|
Debug: Waited 50 milliseconds...
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> param(
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> [Parameter()]$exitcode,
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> [Parameter()]$output,
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> [Parameter()]$errormessage
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> )
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:23
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + function New-XmlResult
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing function body in function declaration.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : MissingFunctionBody
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: Waited 50 milliseconds...
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> # we make our own xml because ConvertTo-Xml makes hard to parse xml ruby side
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> # and we need to be sure
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> $xml = [xml]@"
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> <ReturnResult>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> <Property Name='exitcode'>$($exitcode)</Property>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:35
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + function Invoke-PowerShellUserCode
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing function body in function declaration.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : MissingFunctionBody
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:9 char:11
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + $Code,
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing expression after ','.
|
|
Debug: Waited 50 milliseconds...
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> <Property Name='errormessage'>$([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes([string]$errormessage)))</Property>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> <Property Name='stdout'>$([System.Convert]::ToBase64String([System.Text.Encoding]::UTF8.GetBytes([string]$output)))</Property>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> </ReturnResult>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> "@
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> $xml.OuterXml
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:9 char:10
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + $Code,
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing ')' in function parameter list.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:1
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + {
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing closing '}' in statement block or type definition.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : MissingExpressionAfterToken
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: Waited 50 milliseconds...
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> IsPublic IsSerial Name BaseType
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> -------- -------- ---- --------
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> True True String System.Object
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> IsPublic IsSerial Name BaseType
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> -------- -------- ---- --------
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> True True Int32 System.ValueType
|
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:16
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + $EventName,
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Missing expression after ','.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : MissingExpressionAfterToken
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:3
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + )
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Unexpected token ')' in expression or statement.
|
|
Debug: Waited 50 milliseconds...
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : UnexpectedToken
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Exception calling "OpenExisting" with "1" argument(s): "Empty name is not legal.
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> Parameter name: name"
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> At line:1 char:3
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + $event = [System.Threading.EventWaitHandle]::OpenExisting($EventNam ...
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + CategoryInfo : NotSpecified: (:) [], MethodInvocationException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE> + FullyQualifiedErrorId : ArgumentException
|
|
Debug: 2016-08-04 15:51:50 -0700 PIPE>
|
|
Debug: Wait object signaled
|
Debug: Waited 300 total milliseconds.
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> At line:1 char:6
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + try
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> The Try statement is missing its statement block.
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + FullyQualifiedErrorId : MissingTryStatementBlock
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> At line:163 char:1
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + }
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + ~
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> Unexpected token '}' in expression or statement.
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + CategoryInfo : ParserError: (:) [], ParentContainsErrorRecordException
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE> + FullyQualifiedErrorId : UnexpectedToken
|
|
Debug: 2016-08-04 15:51:51 -0700 PIPE>
|
|
Debug: 2016-08-04 15:51:51 -0700 PowerShell initialization complete for pid: 13716
|
Debug: Waited 50 milliseconds...
|
Attachments
Issue Links
- blocks
-
MODULES-3977 DSC - WMF 5.1 (PS 5.1.14393) hangs while using dsc module
-
- Resolved
-
- is blocked by
-
MODULES-3144 PowerShell - Draining stdout / stderr pipes should be done in separate threads
-
- Closed
-
-
MODULES-3833 (SPIKE) Investigate using named pipe instead of STDIN for Powershell Manager
-
- Resolved
-
-
MODULES-3875 PowerShell - Improve PowerShellManager Resilience to Failure
-
- Resolved
-
- relates to
-
MODULES-3977 DSC - WMF 5.1 (PS 5.1.14393) hangs while using dsc module
-
- Resolved
-
-
MODULES-4066 Powershell not executing on Windows Server 2016 Standard (or silently failing)
-
- Closed
-
-
MODULES-3831 Powershell manager (DSC) does not work on PS 5.1.14393
-
- Closed
-
-
MODULES-3832 Powershell manager (IIS) does not work on PS 5.1.14393
-
- Closed
-
-
IMAGES-13 Puppet Apply Powershell issue with Windows-2016 RTM
-
- Resolved
-
-
MODULES-3945 PowerShell - Add cross-platform support
-
- Resolved
-
-
MODULES-3943 PowerShell - Ensure direct writes to stdout / stderr streams are redirected and captured
-
- Closed
-