Skip to content

powershell crash with Segmentation fault when run function in debug mode #1058

Closed

Description

I just try below step from https://technet.microsoft.com/en-us/library/hh849961.aspx, and meet powershell crash with Segmentation fault as below:

PS /workspace/PowerShell> function my-alias {
$p = $args[0]
get-alias | where {$_.definition -like "*$p"} | ft definition, name -auto
}
PS /workspace/PowerShell> set-psbreakpoint -command my-alias

 ID Script            Line Command           Variable         Action             -- ------            ---- -------           --------         ------
   0                        my-alias


PS /workspace/PowerShell> my-alias get-content

Entering debug mode. Use h or ? for help.                                                                                                                       Hit Command breakpoint on 'my-alias'

At line:1 char:19
+ function my-alias {
+                   ~
[DBG]: PS /workspace/PowerShell>> s$p = $args[0]
Segmentation fault
root@st-ub14x64-01:/workspace/PowerShell#

Activity

  1. ealexjordan commented on Jun 3, 2016

    @ealexjordan
    Contributor

    This an issue between the development version and v0.4.0. Works on v0.4.0 and not on the development version.

    Powershell debugging broke in one of the following commits:
    5bdb215 - "Don't compile GetComputerInfoCommand.cs"
    d9bf6b0 - "Update files from Source Depot changeset":
    Occured here during source depot merge at line 1412 when the !CORECLR guard was removed in MshSnapinInfo.cs. We are currently blocked on adding Microsoft.PowerShell.Diagnostics as listed in #1042. I will be adding the guard back in along with tests.
    aa5007c -Bumped windows-build

    Tests were passing because we only cover instances of setting breakpoints, not continuing into debugging. Adding those tests now.

  2. added
    Issue-Bug
    on Jun 3, 2016
  3. ealexjordan commented on Jun 3, 2016

    @ealexjordan
    Contributor

    Been told to /cc sergei (@vors) on this.

  4. andyleejordan commented on Jun 14, 2016

    @andyleejordan
    Member

    A (@ealexjordan) sergei (@vors) was this fully resolved?

  5. vors commented on Jun 14, 2016

    @vors
    Collaborator

    I just tried, got Process is terminated due to StackOverflowException. instead of segfault

  6. andyleejordan commented on Jun 16, 2016

    @andyleejordan
    Member

    Fixed for Linux. New problem in host on Windows with nested prompts.

  7. vors commented on Jun 16, 2016

    @vors
    Collaborator

    Keeping the same issue for that? If so, lets move it outside of 0.5.0

  8. andyleejordan commented on Jun 16, 2016

    @andyleejordan
    Member

    Nah, this is resolved. New issue at #1123.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

Issue-Bug

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions