GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Improve call counting mechanism by kouvel · Pull Request #32250 · dotnet/runtime

Conversation

@kouvel

@kouvel kouvel commented Feb 13, 2020 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Commit 1
    • Reverts commit f954c6b, which reverted PR Improve call counting mechanism #1457 due to issues
  • Commit 2
    • Fixes crashes and assertion failures seen by the original change, fixes Crashes caused by "Improve call counting mechanism" change #29934
    • The crashes were caused by commit 6aa3c70 in the original PR
    • Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
      • The remaining call count decremented by the stub is in the call counting info
      • The only way to get a code version / method desc from a stub is to go through the call counting info
    • Got one repro of the assertion failure in leakwheel GC test triggered assert #22786 and JIT.Methodical failing on coreclr outerloop #24664 (fixes JIT.Methodical failing on coreclr outerloop #24664) and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for an object used by code versioning, messing up some data and making it look like the code version is not active when it actually is according to the dump
    • Fixed with a partial revert of the above commit. Added back the Complete stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
  • Commit 3
    • Public static functions of CallCountingManager that may be called through the debugger may occur before static initialization, added a check for null as suggested in Fix createdump DAC segfault #29892

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kouvel kouvel added the area-TieredCompilation-coreclr label Feb 13, 2020
@kouvel kouvel added this to the 5.0 milestone Feb 13, 2020
@kouvel
kouvel requested review from davidwrighton and noahfalk February 13, 2020 21:18
@kouvel kouvel self-assigned this Feb 13, 2020
@kouvel

kouvel commented Feb 13, 2020

Copy link
Copy Markdown
Contributor Author

Got a consistent repro of the crash after a few hours of running a CoreFX test suite, verified no repro after fix after 12+ hours. Got one repro of the assertion failure, currently running again after fix, will continue running overnight.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kouvel

kouvel commented Feb 14, 2020

Copy link
Copy Markdown
Contributor Author

No assertion failure after 12+ hours after fix. Rebased to fix conflicts.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kouvel kouvel closed this Feb 18, 2020
@kouvel kouvel reopened this Feb 18, 2020
noahfalk
noahfalk approved these changes Feb 27, 2020
View reviewed changes

@noahfalk noahfalk left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@kouvel

kouvel commented Feb 28, 2020

Copy link
Copy Markdown
Contributor Author

Thanks @noahfalk! Rebased to latest to run through the checks again.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kouvel

kouvel commented Feb 28, 2020

Copy link
Copy Markdown
Contributor Author

Failures are same as #32951

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

davidwrighton
davidwrighton approved these changes Feb 28, 2020
View reviewed changes

@davidwrighton davidwrighton left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Koundinya Veluri added 3 commits March 2, 2020 11:21
Koundinya Veluri
Improve call counting mechanism
d27a377
- Commit 1
  - Reverts commit f954c6b, which reverted PR #1457 due to issues
- Commit 2
  - Fixes crashes and assertion failures seen by the original change, fixes #29934
  - The crashes were caused by commit 6aa3c70 in the original PR
  - Call counting infos cannot be deleted when the corresponding call counting stubs may still run, because:
    - The remaining call count decremented by the stub is in the call counting info
    - The only way to get a code version / method desc from a stub is to go through the call counting info
  - Got one repro of the assertion failure in #22786 and it is most likely caused by the same issue, following heap corruption from modifying a deleted call counting info where the memory is reused for a `NativeCodeVersionNode`, messing up the method desc pointer
  - Fixed with a partial revert of the above commit. Added back the `Complete` stage and then call counting infos are deleted only after it's ensured that call counting stubs won't be used (shortly before deleting them).
- Commit 3
  - Public static functions of `CallCountingManager` that may be called through the debugger may occur before static initialization, added a check for null as suggested in #29892
Koundinya Veluri
Fix crashes and assertion failures seen by the original change
2032c7e
Koundinya Veluri
Add check for null for some functions callable from the debugger
ca19f1c
@kouvel

kouvel commented Mar 2, 2020

Copy link
Copy Markdown
Contributor Author

Rebased to fix conflict

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@kouvel
kouvel merged commit f30ea37 into dotnet:master Mar 3, 2020
@kouvel
kouvel deleted the CallCounting branch March 3, 2020 15:55
@kouvel kouvel mentioned this pull request Mar 4, 2020
Func-eval while runtime is suspended may not run due to deadlock (timing issue) #1537
Closed
@davmason davmason mentioned this pull request Mar 11, 2020
Remove asserts that were firing during rejit tests #33492
Merged
gbalykov added a commit to gbalykov/runtime that referenced this pull request Apr 4, 2020
@gbalykov
Fix Linux x86 build
38271a5
Related to dotnet#32250
jkotas pushed a commit that referenced this pull request Apr 6, 2020
@gbalykov
Fix Linux x86 build (#34548)
9a58ab8
* Fix Linux x86 build

Related to #33005

* Fix Linux x86 build

Related to #33653, #33005

* Fix Linux x86 build

Related to #32250
@davmason davmason mentioned this pull request May 29, 2020
Remove runtime suspension when updating active IL version in ReJIT #13442
Closed
@richlander richlander mentioned this pull request Jun 6, 2020
Improving P95+ latency #37534
Closed
@ghost ghost locked as resolved and limited conversation to collaborators Dec 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Reviewers

@noahfalk noahfalk noahfalk approved these changes
@davidwrighton davidwrighton davidwrighton approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

@kouvel kouvel

Labels

area-TieredCompilation-coreclr

Projects

None yet

Milestone

5.0.0

Development

Successfully merging this pull request may close these issues.

Crashes caused by "Improve call counting mechanism" change JIT.Methodical failing on coreclr outerloop

Uh oh!

There was an error while loading. Please reload this page.

3 participants

@kouvel @noahfalk @davidwrighton
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.