Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Crash in System.Net.WebSockets.Client - Illegal memory access #73621

Closed
karelz opened this issue Aug 9, 2022 · 8 comments
Closed

Crash in System.Net.WebSockets.Client - Illegal memory access #73621

karelz opened this issue Aug 9, 2022 · 8 comments
Assignees
Labels
area-System.Net blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-linux Linux OS (any supported distro)
Milestone

Comments

@karelz
Copy link
Member

karelz commented Aug 9, 2022

8/9:

  • 13x hits in Runfo last 120 days (older crashes than PR build 1925920 on 8/5 are from different reasons)
  • 18x hits in Kusto 8/5-8/9 (no crashes failures 6/9-8/4 at all)

Failures are on Linux only, with mix of architectures - arm64, amd64. Regression started on 8/5.

2 notable failures are on Rolling runs:

let crashes = (friendlyNamePrefix : string, includePR : bool) {
cluster('engsrvprod.kusto.windows.net').database('engineeringdata').WorkItems
    | where FriendlyName startswith friendlyNamePrefix
    //| where Queued > ago(7d)
    | where Status == "BadExit"
    | where ExitCode  == 139
    | join kind=inner (cluster('engsrvprod.kusto.windows.net').database('engineeringdata').Jobs
        | where ((Branch == 'refs/heads/main') or (Branch == 'refs/heads/master') or (includePR and (Source startswith "pr/")) or (Branch startswith 'refs/heads/release/6.0'))
        | where Type startswith "test/functional/cli/"
            and not(Properties contains "runtime-staging")
        | summarize arg_max(Finished, Properties, Type, Branch, Source, Started, QueueName) by JobId
        | project-rename JobType = Type) on JobId
    | extend PropertiesJson = parse_json(Properties)
    | extend OS = replace_regex(tostring(PropertiesJson.operatingSystem), @'\((.*)\).*|([^\(].*)', @'\1\2')
    | extend Runtime = iif(PropertiesJson.runtimeFlavor == "mono", "Mono", iif(PropertiesJson.DefinitionName contains "coreclr", "CoreCLR", ""))
    | extend TargetBranch = extractjson("$.['System.PullRequest.TargetBranch']", Properties)
    | extend Architecture = PropertiesJson.architecture
    | extend Scenario = iif(isempty(PropertiesJson.scenario), "--", PropertiesJson.scenario)
    | project-away PropertiesJson
    | order by Finished desc
};
crashes('System.Net.WebSockets.Client', true);
@karelz karelz added area-System.Net os-linux Linux OS (any supported distro) labels Aug 9, 2022
@karelz karelz added this to the 7.0.0 milestone Aug 9, 2022
@ghost
Copy link

ghost commented Aug 9, 2022

Tagging subscribers to this area: @dotnet/ncl
See info in area-owners.md if you want to be subscribed.

Issue Details

8/9:

  • 13x hits in Runfo last 120 days (older crashes than PR build 1925920 on 8/5 are from different reasons)
  • 18x hits in Kusto 8/5-8/9 (no crashes failures 6/9-8/4 at all)

Failures are on Linux only, with mix of architectures - arm64, amd64. Regression started on 8/5.

2 notable failures are on Rolling runs:

let crashes = (friendlyNamePrefix : string, includePR : bool) {
cluster('engsrvprod.kusto.windows.net').database('engineeringdata').WorkItems
    | where FriendlyName startswith friendlyNamePrefix
    //| where Queued > ago(7d)
    | where Status == "BadExit"
    | where ExitCode  == 139
    | join kind=inner (cluster('engsrvprod.kusto.windows.net').database('engineeringdata').Jobs
        | where ((Branch == 'refs/heads/main') or (Branch == 'refs/heads/master') or (includePR and (Source startswith "pr/")) or (Branch startswith 'refs/heads/release/6.0'))
        | where Type startswith "test/functional/cli/"
            and not(Properties contains "runtime-staging")
        | summarize arg_max(Finished, Properties, Type, Branch, Source, Started, QueueName) by JobId
        | project-rename JobType = Type) on JobId
    | extend PropertiesJson = parse_json(Properties)
    | extend OS = replace_regex(tostring(PropertiesJson.operatingSystem), @'\((.*)\).*|([^\(].*)', @'\1\2')
    | extend Runtime = iif(PropertiesJson.runtimeFlavor == "mono", "Mono", iif(PropertiesJson.DefinitionName contains "coreclr", "CoreCLR", ""))
    | extend TargetBranch = extractjson("$.['System.PullRequest.TargetBranch']", Properties)
    | extend Architecture = PropertiesJson.architecture
    | extend Scenario = iif(isempty(PropertiesJson.scenario), "--", PropertiesJson.scenario)
    | project-away PropertiesJson
    | order by Finished desc
};
crashes('System.Net.WebSockets.Client', true);
Author: karelz
Assignees: -
Labels:

area-System.Net, os-linux

Milestone: 7.0.0

@karelz karelz added the blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' label Aug 9, 2022
@CarnaViire
Copy link
Member

#73222 was merged on 8/5 so it might be related. The product change in the PR is minimal, but it added a bunch of tests.

cc @greenEkatherine

@jkotas
Copy link
Member

jkotas commented Aug 9, 2022

This is likely the same root cause as #69125. See my comment at #69125 (comment) . You can confirm it by looking at the stacktrace of the crash using unmanaged debugger (lldb, gdb or windbg).

I would expect that any test that depend on sockets is going to hit #69125 with some frequency.

@wfurt
Copy link
Member

wfurt commented Aug 9, 2022

I'm looking into it...

@karelz karelz assigned wfurt and unassigned greenEkatherine Aug 11, 2022
@hoyosjs
Copy link
Member

hoyosjs commented Aug 13, 2022

@karelz
Copy link
Member Author

karelz commented Aug 15, 2022

Yes, we expect those 2 are dupes -- it was pending verification from @wfurt

@wfurt
Copy link
Member

wfurt commented Aug 22, 2022

There is no failure in main since #73972 was merged.

@karelz
Copy link
Member Author

karelz commented Aug 23, 2022

Fixed in 8.0 (main) in PR #73972 and in 7.0 (RC1) in PR #74367.

@ghost ghost locked as resolved and limited conversation to collaborators Sep 22, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-System.Net blocking-clean-ci Blocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms' os-linux Linux OS (any supported distro)
Projects
None yet
Development

No branches or pull requests

6 participants