Skip to content

Conversation

@github-actions
Copy link
Contributor

@github-actions github-actions bot commented Jan 11, 2024

ICorDebugHeapEnum::Next fails to iterate the heap. It stems from this check. For ephemeral segment/region - we should always report gen 0 to ensure initialization of the first object in the allocating ephemeral segment. Fix the reporting to consistently use gen0.

Backport of #96640 to release/8.0-staging

/cc @hoyosjs @cshung

Customer Impact

Customer reported inability to walk the heap using ICorDebugHeapEnum::Next.

Testing

Manual testing of the scenario shows the regression is solved. Debugger tests show no regression. Currently waiting for customer to confirm current builds fix the reported issue for their scenario.

Risk

Low. The only scenario that can regress out of this change is precisely the one that's broken. This is fully contained to the
DAC and has no application runtime impact.

@ghost
Copy link

ghost commented Jan 11, 2024

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

Issue Details

Backport of #96640 to release/8.0-staging

/cc @hoyosjs @cshung

Customer Impact

Testing

Risk

IMPORTANT: If this backport is for a servicing release, please verify that:

  • The PR target branch is release/X.0-staging, not release/X.0.

  • If the change touches code that ships in a NuGet package, you have added the necessary package authoring and gotten it explicitly reviewed.

Author: github-actions[bot]
Assignees: -
Labels:

area-Diagnostics-coreclr

Milestone: -

@hoyosjs hoyosjs added the Servicing-consider Issue for next servicing release review label Jan 11, 2024
@hoyosjs hoyosjs requested a review from cshung January 11, 2024 20:33
@hoyosjs hoyosjs added this to the 8.0.x milestone Jan 11, 2024
@hoyosjs hoyosjs added the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jan 11, 2024
Copy link
Contributor

@cshung cshung left a comment

Choose a reason for hiding this comment

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

Thanks for the back port

@hoyosjs hoyosjs requested a review from cshung January 11, 2024 23:25
Copy link
Member

@jeffschwMSFT jeffschwMSFT left a comment

Choose a reason for hiding this comment

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

approved. we will take for consideration in 8.0.x

@carlossanlop
Copy link
Contributor

@cshung have you sent an email to Tactics requesting approval?

Friendly reminder that Tuesday January 16th 4pm is the Code Complete deadline for the February Release. If all requirements are met, please merge your PR before that date and time to ensure this fix gets included in that Release.

@cshung
Copy link
Contributor

cshung commented Jan 12, 2024

@cshung have you sent an email to Tactics requesting approval?

Friendly reminder that Tuesday January 16th 4pm is the Code Complete deadline for the February Release. If all requirements are met, please merge your PR before that date and time to ensure this fix gets included in that Release.

I think @hoyosjs did, but I will let him confirm.

@jeffschwMSFT jeffschwMSFT added Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review labels Jan 12, 2024
@jeffschwMSFT jeffschwMSFT modified the milestones: 8.0.x, 8.0.2 Jan 12, 2024
@jeffschwMSFT
Copy link
Member

it was approved in mail. can we look at the ci failures? when can we remove the no_merge label?

@carlossanlop
Copy link
Contributor

carlossanlop commented Jan 12, 2024

Edit: confirmed offline the failure is unrelated.

The failure does not look familiar:

...
2024-01-11T20:49:54.2931479Z     DwarfDump -> /__w/1/s/artifacts/tests/coreclr/linux.x64.Debug/nativeaot/SmokeTests/DwarfDump/DwarfDump/DwarfDump.dll
2024-01-11T20:49:55.0250253Z     Generating native code
2024-01-11T20:49:55.0905937Z     Generating native code
2024-01-11T20:49:55.2824425Z     ReferencedAssembly1 -> /__w/1/s/artifacts/tests/coreclr/linux.x64.Debug/nativeaot/GenerateUnmanagedEntryPoints/ReferencedAssembly1/ReferencedAssembly1/ReferencedAssembly1.dll
2024-01-11T20:49:55.2887994Z     DynamicGenerics -> /__w/1/s/artifacts/tests/coreclr/linux.x64.Debug/nativeaot/SmokeTests/DynamicGenerics/DynamicGenerics/DynamicGenerics.dll
2024-01-11T20:49:55.4513222Z     Generating native code
2024-01-11T20:49:55.6303385Z     Optimizing assemblies for size may change the behavior of the app. Be sure to test after publishing. See: https://aka.ms/dotnet-illink
2024-01-11T20:49:55.6883452Z     Generating native code
2024-01-11T20:49:56.8072497Z     Unhandled Exception: System.TypeInitializationException: A type initializer threw an exception. To determine which type, inspect the InnerException's StackTrace property.
2024-01-11T20:49:56.8073487Z      ---> System.NullReferenceException: Object reference not set to an instance of an object.
2024-01-11T20:49:56.8073861Z        at System.Threading.LowLevelSpinWaiter.SpinWaitForCondition(Func`2, Object, Int32, Int32) + 0x7e
2024-01-11T20:49:56.8074178Z        at System.Threading.LowLevelLock.WaitAndAcquire() + 0x69
2024-01-11T20:49:56.8074422Z        at System.Threading.LowLevelLock.Acquire() + 0x29
2024-01-11T20:49:56.8074691Z        at System.Threading.WaitSubsystem.LockHolder..ctor(LowLevelLock) + 0x1d
2024-01-11T20:49:56.8075002Z        at System.Threading.WaitSubsystem.SetEvent(WaitSubsystem.WaitableObject) + 0x28
2024-01-11T20:49:56.8075274Z        at System.Threading.WaitSubsystem.SetEvent(IntPtr) + 0x2a
2024-01-11T20:49:56.8075522Z        at System.Threading.EventWaitHandle.Set() + 0x45
2024-01-11T20:49:56.8075771Z        at System.Threading.Lock.AwakeWaiterIfNeeded() + 0xe6
2024-01-11T20:49:56.8076001Z        at System.Threading.Lock.ReleaseCore() + 0x54
2024-01-11T20:49:56.8076242Z        at System.Threading.Lock.ReleaseByThread(Int32) + 0x58
2024-01-11T20:49:56.8076475Z        at System.Threading.Lock.Release() + 0x30
2024-01-11T20:49:56.8076708Z        at System.Threading.LockHolder.Dispose() + 0x1c
2024-01-11T20:49:56.8077101Z        at System.Runtime.CompilerServices.ClassConstructorRunner.Cctor.GetCctor(StaticClassConstructionContext*) + 0x34d
2024-01-11T20:49:56.8077476Z        at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x6b
2024-01-11T20:49:56.8077924Z        at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0x1b
2024-01-11T20:49:56.8078285Z        at System.Threading.LowLevelLock..cctor() + 0x3e
2024-01-11T20:49:56.8078602Z        at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x162
2024-01-11T20:49:56.8079088Z        --- End of inner exception stack trace ---
2024-01-11T20:49:56.8079410Z        at System.Runtime.CompilerServices.ClassConstructorRunner.EnsureClassConstructorRun(StaticClassConstructionContext*) + 0x151
2024-01-11T20:49:56.8079824Z        at System.Runtime.CompilerServices.ClassConstructorRunner.CheckStaticClassConstructionReturnGCStaticBase(StaticClassConstructionContext*, Object) + 0x1b
2024-01-11T20:49:56.8080172Z        at System.Threading.LowLevelLock.WaitAndAcquire() + 0x3e
2024-01-11T20:49:56.8080606Z        at System.Threading.LowLevelLock.Acquire() + 0x29
2024-01-11T20:49:56.8080855Z        at System.Threading.WaitSubsystem.LockHolder..ctor(LowLevelLock) + 0x1d
2024-01-11T20:49:56.8081186Z        at System.Threading.WaitSubsystem.WaitableObject.Wait(WaitSubsystem.ThreadWaitInfo, Int32, Boolean, Boolean) + 0x3a
2024-01-11T20:49:56.8081534Z        at System.Threading.WaitSubsystem.Wait(WaitSubsystem.WaitableObject, Int32, Boolean, Boolean) + 0x66
2024-01-11T20:49:56.8081830Z        at System.Threading.LowLevelLifoSemaphore.WaitCore(Int32) + 0x2b
2024-01-11T20:49:56.8082116Z        at System.Threading.LowLevelLifoSemaphore.WaitForSignal(Int32) + 0x71
2024-01-11T20:49:56.8082411Z        at System.Threading.LowLevelLifoSemaphore.Wait(Int32, Boolean) + 0x349
2024-01-11T20:49:56.8082698Z        at System.Threading.PortableThreadPool.WorkerThread.WorkerThreadStart() + 0x15d
2024-01-11T20:49:56.8082951Z        at ilc!<BaseAddress>+0x13381b3
2024-01-11T20:49:56.8083182Z        at System.Threading.Thread.StartHelper.RunWorker() + 0x6a
2024-01-11T20:49:56.8083426Z        at System.Threading.Thread.StartHelper.Run() + 0x8a
2024-01-11T20:49:56.8083676Z        at System.Threading.Thread.StartThread(IntPtr) + 0xde
2024-01-11T20:49:56.8083970Z        at System.Threading.Thread.ThreadEntryPoint(IntPtr) + 0x20
2024-01-11T20:49:57.2252705Z /__w/1/s/artifacts/bin/coreclr/linux.x64.Debug/build/Microsoft.NETCore.Native.targets(308,5): error MSB3073: The command ""/__w/1/s/artifacts/bin/coreclr/linux.x64.Debug/ilc-published/ilc" @"/__w/1/s/artifacts/tests/coreclr/obj/linux.x64.Debug/Managed/nativeaot/SmokeTests/DwarfDump/DwarfDump/native/DwarfDump.ilc.rsp"" exited with code 134. [/__w/1/s/src/tests/nativeaot/SmokeTests/DwarfDump/DwarfDump.csproj] [/__w/1/s/src/tests/build.proj]

@hoyosjs hoyosjs removed the NO-MERGE The PR is not ready for merge yet (see discussion for detailed reasons) label Jan 12, 2024
@cshung cshung merged commit 683da71 into release/8.0-staging Jan 16, 2024
@cshung cshung deleted the backport/pr-96640-to-release/8.0-staging branch January 16, 2024 19:11
@github-actions github-actions bot locked and limited conversation to collaborators Feb 16, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants