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

Assertion failed 'i < BitSetTraits::GetSize(env)' #111344

Closed
EgorBo opened this issue Jan 13, 2025 · 2 comments · Fixed by #111432
Closed

Assertion failed 'i < BitSetTraits::GetSize(env)' #111344

EgorBo opened this issue Jan 13, 2025 · 2 comments · Fixed by #111432
Assignees
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs in-pr There is an active PR which will close this issue when it is merged Known Build Error Use this to report build issues in the .NET Helix tab
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Jan 13, 2025

Assert failure(PID 4212 [0x00001074], Thread: 5160 [0x1428]): Assertion failed 'i < BitSetTraits::GetSize(env)' in 'System.Transactions.DtcProxyShim.OletxHelper:Retry(System.Action)' during 'Clone loops' (IL size 61; hash 0x61211853; Tier1-OSR)

    File: D:\a\_work\1\s\src\coreclr\jit\bitsetasshortlong.h:299
    Image: C:\h\w\AAB00918\p\dotnet.exe

Build Information

Build: https://dev.azure.com/dnceng-public/public/_build/results?buildId=914793&view=ms.vss-test-web.build-test-results-tab&runId=24152400&resultId=215618&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab
Build error leg or test failing:

Error Message

Fill the error message using step by step known issues guidance.

{
  "ErrorMessage": "Assertion failed 'i < BitSetTraits::GetSize(env)'",
  "BuildRetry": false,
  "ExcludeConsoleLog": false
}

Known issue validation

Build: 🔎 https://dev.azure.com/dnceng-public/public/_build/results?buildId=914793
Error message validated: [Assertion failed 'i < BitSetTraits::GetSize(env)']
Result validation: ✅ Known issue matched with the provided build.
Validation performed at: 1/13/2025 9:38:44 AM UTC

Report

Build Definition Test Pull Request
914793 dotnet/runtime System.Transactions.Local.Tests.WorkItemExecution

Summary

24-Hour Hit Count 7-Day Hit Count 1-Month Count
0 1 1
@EgorBo EgorBo added the Known Build Error Use this to report build issues in the .NET Helix tab label Jan 13, 2025
@dotnet-issue-labeler dotnet-issue-labeler bot added the needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners label Jan 13, 2025
@dotnet-policy-service dotnet-policy-service bot added the untriaged New issue has not been triaged by the area owner label Jan 13, 2025
@EgorBo EgorBo added area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs and removed needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jan 13, 2025
@AndyAyersMS
Copy link
Member

Probably one of my changes

@AndyAyersMS
Copy link
Member

AndyAyersMS commented Jan 14, 2025

Here the loop backedge is a catch return

Trees after Find loops

---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BBnum BBid ref try hnd preds           weight   IBC [IL range]   [jump]                            [EH region]        [flags]
---------------------------------------------------------------------------------------------------------------------------------------------------------------------
BB01 [0011]  1                             1      0 [???..???)-> BB03(1)                 (always)                     i IBC internal
BB03 [0001]  2       BB14,BB01           100      2 [003..004)-> BB04(1)                 (always)                     i IBC bwd bwd-target osr-entry
BB04 [0002]  1  0    BB03                100      2 [004..???)-> BB06(0),BB05(1)         ( cond ) T0      try {       i IBC keep bwd
BB05 [0013]  1  0    BB04                100      2 [???..???)-> BB15(1)                 (always) T0                  i IBC keep internal hascall gcsafe nullcheck bwd
BB06 [0014]  1  0    BB04                  0      0 [???..???)-> BB07(1)                 (always) T0                  i IBC rare keep internal hascall gcsafe bwd
BB07 [0012]  1  0    BB06                  0      0 [00C..00C)-> BB15(1)                 (always) T0      }           i IBC rare keep internal bwd
BB08 [0003]  1     0                       0.00   0 [00C..014)-> BB10(0.48),BB09(0.52)   ( cond )    H0   filter {    i IBC keep hascall bwd
BB09 [0004]  1     0 BB08                  0.00   0 [014..018)-> BB11(1)                 (always)    H0               i IBC bwd
BB10 [0005]  1     0 BB08                  0.00   0 [018..027)-> BB11(1)                 (always)    H0               i IBC hascall gcsafe bwd
BB11 [0006]  2     0 BB09,BB10             0.00   0 [027..029)-> BB12(1)                 (fltret)    H0   }           i IBC keep bwd
BB12 [0007]  2     0 BB11                  0.00   0 [029..031)-> BB14(1),BB13(0)         ( cond )    H0   filtHnd {   i IBC keep bwd
BB14 [0009]  1     0 BB12                  0.00   0 [033..03C)-> BB03(1)                 ( cret )    H0               i IBC hascall gcsafe bwd bwd-src
BB13 [0008]  1     0 BB12                  0      0 [031..033)                           (throw )    H0   }           i IBC rare hascall bwd
BB15 [0010]  2       BB07,BB05           100      2 [03C..03D)                           (return)                     i IBC
---------------------------------------------------------------------------------------------------------------------------------------------------------------------

L00 header: BB03
  Members (11): [BB03..BB12];BB14
  Entry: BB01 -> BB03
  Exit: BB07 -> BB15; BB05 -> BB15; BB12 -> BB13
  Back: BB14 -> BB03

The lexical last block is BB14 and that's where we put the slow path preheader, but it's in the middle of a handler region that we need to clone, and this confuses the cloning code.

AndyAyersMS added a commit to AndyAyersMS/runtime that referenced this issue Jan 14, 2025
In some unusual cases the last block of a loop might be in the middle of a
handler region (say the loop backedge is in a catch, and the catch has
alternate flow that exits the loop).

Make sure that we properly place the slow loop preheader into the same EH regions
as the fast loop preheader.

Fixes dotnet#111344
@dotnet-policy-service dotnet-policy-service bot added the in-pr There is an active PR which will close this issue when it is merged label Jan 14, 2025
@JulieLeeMSFT JulieLeeMSFT removed the untriaged New issue has not been triaged by the area owner label Jan 14, 2025
@JulieLeeMSFT JulieLeeMSFT added this to the 10.0.0 milestone Jan 14, 2025
AndyAyersMS added a commit that referenced this issue Jan 15, 2025
)

In some unusual cases the last block of a loop might be in the middle of a
handler region (say the loop backedge is in a catch, and the catch has
alternate flow that exits the loop).

Make sure that we properly place the slow loop preheader into the same EH regions
as the fast loop preheader.

Fixes #111344
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area-CodeGen-coreclr CLR JIT compiler in src/coreclr/src/jit and related components such as SuperPMI blocking-clean-ci-optional Blocking optional rolling runs in-pr There is an active PR which will close this issue when it is merged Known Build Error Use this to report build issues in the .NET Helix tab
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants