Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Inconsistent pipeline thread stack size #17407

Copy link
Copy link
@fflaten

Description

@fflaten
Issue body actions

Prerequisites

Steps to reproduce

Example 1:

  1. Run Start-Job { function recurse([int]$i) { $i; recurse ($i+1) }; recurse 0 } | Receive-Job -Wait
  2. Run function recurse([int]$i) { $i; recurse ($i+1) }; recurse 0

Example 2 on Windows:
Run the following block directly in Powershell session and then inside a job

$signature = @'
[DllImport("kernel32.dll")]
public static extern void GetCurrentThreadStackLimits(out uint lowLimit, out uint highLimit);
'@

$type = Add-Type -MemberDefinition $signature -Name Win32Pinvoke -PassThru

$low, $high = 0, 0
$type::GetCurrentThreadStackLimits([ref]$low, [ref]$high)
($high - $low)/1MB

Expected behavior

Example 1: Recurse-loop fails on somewhat similar depth.
Example 2: Same/similar stack size reported

Actual behavior

Example 1: Job stops on 1215. Local pipeline (step 2) stops/freezes on 9000+
Example 2: Job reports 1,5MB. Local pipeline reports 9,5MB stack size. 

Error details

No response

Environment data

Name                           Value
----                           -----
PSVersion                      7.2.3
PSEdition                      Core
GitCommitId                    7.2.3
OS                             Microsoft Windows 10.0.22000
Platform                       Win32NT
PSCompatibleVersions           {1.0, 2.0, 3.0, 4.0…}
PSRemotingProtocolVersion      2.3
SerializationVersion           1.1.0.1
WSManStackVersion              3.0

Visuals

No response

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

    Issue-Enhancementthe issue is more of a feature request than a bugthe issue is more of a feature request than a bugWG-RemotingPSRP issues with any transport layerPSRP issues with any transport layer

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.