You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Assert failure: m_alignpad == 0 in libraries tests #70231
m_alignpad is 0 in the dump. It means that it got cleared between the assert condition was checked and the crash dump was taken.
The most likely explanation is that there is a race condition between GCHeap::NextObj and the memory clearing for newly allocated objects in the GC that causes GCHeap::NextObj to return next object that was not cleared yet. @dotnet/gc Could you please take a look?
changed the title [-]Assert failure: m_alignpad == 0 in System.IO.Pipes.Tests[/-][+]Assert failure: m_alignpad == 0 in libraries tests[/+]on Jun 20, 2022
@Maoni0 has a fix already. I also found a reasonably frequent repro last week - the readytorun\coreroot_determinism\coreroot_determinism coreclr test and run it with her fix over the weekend. Before the fix, it reproed about every 80 iterations. With the fix, 1000 iterations have passed without any repro.
Reacted by Mukund Raghav Sharma (Moko), Maoni Stephens and karb0f0s
Thank you very much, @EgorBo! Based on your list of instructions, I was able to fairly quickly repro the assertion failure on my Windows desktop and have confirmed that after:
Removing the demotion check:
// if ((g == 0) && hp->settings.demotion)// return NULL;//could be racing with another core allocating
the assertion failure doesn't occur based on running the tests overnight.
The main question I had was: how do I find out which test did the assertion failure occur for?
Right now, I get a pretty general message that there was an assertion failure for a System.Collections.Test but no indication as to which test it failed on:
@mrsharm in my repro you can append -verbose after -notrait category=failing and xunit will print test names
I think it were diffrient tests each run and I wasn't able to reproduce the issue when I was asking xunit to run just one test specifically (via -method xx)
This assert can be hit for many different GC holes, GC heap corruptions and GC bugs. It is important to at least capture the stacktrace where the assert is hit, and track different stack traces by separate issues.
I think it is unlikely that the Linux arm crash you have seen is same root cause as this issue. I expect that it is going to have a different stacktrace. Unfortunately, we cannot tell for sure since no dump was collected.
I am closing this as non-actionable. If you see a test failing with this assert, do not re-activate this issue. Instead open a new issue and capture stack trace where the assert is hit in the issue description.
Reacted by Kunal Pathak and Mukund Raghav Sharma (Moko)
Activity
jkotas commentedon Jun 4, 2022
This is failing in the next-object validation.
m_alignpadis 0 in the dump. It means that it got cleared between the assert condition was checked and the crash dump was taken.The most likely explanation is that there is a race condition between
GCHeap::NextObjand the memory clearing for newly allocated objects in the GC that causesGCHeap::NextObjto return next object that was not cleared yet. @dotnet/gc Could you please take a look?BruceForstall commentedon Jun 5, 2022
Same assert here: #68511
BruceForstall commentedon Jun 5, 2022
The same assert happened for jitminopts in System.Text.RegularExpressions.Unit.Tests on win-x64:
https://dev.azure.com/dnceng/public/_build/results?buildId=1807559&view=ms.vss-test-web.build-test-results-tab&runId=48105794&resultId=197597&paneView=dotnet-dnceng.dnceng-build-release-tasks.helix-test-information-tab
mdh1418 commentedon Jun 6, 2022
Same assert failed on System.Buffers.Tests https://dev.azure.com/dnceng/public/_build/results?buildId=1809197&view=ms.vss-test-web.build-test-results-tab&runId=48130508&resultId=197594&paneView=debug in this unrelated PR #70194
[-]Assert failure: m_alignpad == 0 in System.IO.Pipes.Tests[/-][+]Assert failure: m_alignpad == 0 in libraries tests[/+]17 remaining items
EgorBo commentedon Jul 17, 2022
note: doesn't repro when I change optimization level from
-O2to-O0forcee_wks_core(Checked config)janvorli commentedon Jul 18, 2022
@Maoni0 has a fix already. I also found a reasonably frequent repro last week - the readytorun\coreroot_determinism\coreroot_determinism coreclr test and run it with her fix over the weekend. Before the fix, it reproed about every 80 iterations. With the fix, 1000 iterations have passed without any repro.
Maoni0 commentedon Jul 18, 2022
thanks so much @janvorli for verifying. @mrsharm will be submitting a PR.
Maoni0 commentedon Jul 18, 2022
and thanks @EgorBo for finding another test that repros consistently.
mrsharm commentedon Jul 19, 2022
Thank you very much, @EgorBo! Based on your list of instructions, I was able to fairly quickly repro the assertion failure on my Windows desktop and have confirmed that after:
the assertion failure doesn't occur based on running the tests overnight.
The main question I had was: how do I find out which test did the assertion failure occur for?
Right now, I get a pretty general message that there was an assertion failure for a System.Collections.Test but no indication as to which test it failed on:
If we know the exact test, we'll have a quicker repro with a more targeted run.
EgorBo commentedon Jul 19, 2022
@mrsharm in my repro you can append
-verboseafter-notrait category=failingand xunit will print test namesI think it were diffrient tests each run and I wasn't able to reproduce the issue when I was asking xunit to run just one test specifically (via
-method xx)kunalspathak commentedon Aug 9, 2022
This is still failing in libraries-pgo leg on linux-arm
https://helixre107v0xdeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-50c328df6da7462690/System.Numerics.Vectors.Tests/1/console.1ae6f61a.log?helixlogtype=result
https://dev.azure.com/dnceng/public/_build/results?buildId=1927773&view=results
jkotas commentedon Aug 9, 2022
This assert can be hit for many different GC holes, GC heap corruptions and GC bugs. It is important to at least capture the stacktrace where the assert is hit, and track different stack traces by separate issues.
I think it is unlikely that the Linux arm crash you have seen is same root cause as this issue. I expect that it is going to have a different stacktrace. Unfortunately, we cannot tell for sure since no dump was collected.
I am closing this as non-actionable. If you see a test failing with this assert, do not re-activate this issue. Instead open a new issue and capture stack trace where the assert is hit in the issue description.
kunalspathak commentedon Aug 10, 2022
It seems that it is inconsistent. Tried reproing it but doesn't repro. I will keep an eye and open new issue.