Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Fixes issue #21484 createdump segfaults #21534

Merged
merged 2 commits into from
Jan 10, 2019

Conversation

mikem8361
Copy link
Member

Issue #21484: createdump segfaults with ASP.NET app

The problem is the ClrDataModule Request faulted on a dynamic module
getting the file layout flag.

Fixed the Request code not get the file layout and in the crash dump
code skip any dynamic modules.

Issue #21485: fix EnumProcessModules hPseudoCurrentProcess bug.

Issue #21484: createdump segfaults with ASP.NET app

The problem is the ClrDataModule Request faulted on a dynamic module
getting the file layout flag.

Fixed the Request code not get the file layout and in the crash dump
code skip any dynamic modules.

Issue #21485: fix EnumProcessModules hPseudoCurrentProcess bug.
@mikem8361 mikem8361 added this to the 2.2.2 milestone Dec 13, 2018
@mikem8361 mikem8361 self-assigned this Dec 13, 2018
@mikem8361
Copy link
Member Author

mikem8361 commented Dec 13, 2018

Description

The createdump utility segfaults with ASP.NET Core 2.2 applications.

Customer Impact

Customers can't create a core dump and diagnostic there ASP.NET app or any .NET Core that has dynamic modules.

Regression?

Not a regression.

Risk

Low. Affects Linux only.

CR

Jan Kotas has review this.

@mikem8361 mikem8361 added area-Diagnostics Servicing-consider Issue for next servicing release review labels Dec 13, 2018
@mikem8361
Copy link
Member Author

@Maoni0, does it make sense that GC heap globals like ephemeral_heap_segment and finalize_queue were null for some apps?

@Maoni0
Copy link
Member

Maoni0 commented Jan 4, 2019

ephemeral_heap_segment and finalize_queue are initialized during CLR init (in InitializeGarbageCollector) so if the runtime is loaded they should not be null. note that in SVR GC these are per heap members whereas in WKS these are statics (ie, dac global vars)

Copy link
Member

@noahfalk noahfalk left a comment

Choose a reason for hiding this comment

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

LGTM

GC heap globals like ephemeral_heap_segment and finalize_queue are
null/invalid for a server GC. Add a check to skip the workstation GC
memory enumeration if server. The server memory enumeration already
skips if workstation GC.

The dynamic module fix is still needed, createdump would have still hit
this problem after the GC heap fix.

Report the entire generation table in EnumWksGlobalMemoryRegions and
EnumSvrGlobalMemoryRegions (dotnet#20233).
@mikem8361
Copy link
Member Author

@dotnet-bot test Windows_NT x64 Formatting

@mikem8361
Copy link
Member Author

@dotnet-bot test Ubuntu arm Cross Checked Innerloop Build and Test

@mikem8361
Copy link
Member Author

@jamshedd what about ship room approval for this 2.2 PR?

@jamshedd
Copy link
Member

jamshedd commented Jan 8, 2019

@russk to follow up on test coverage with @mikem8361 .

@mikem8361
Copy link
Member Author

I tested createdump manually on ubuntu and fedora against a webapp. I also ran our diagnostictests against the changes and everything succeeds. The diagnostic tests contain createdump tests.

@RussKeldorph
Copy link

@mikem8361 Are you adding/have you added test coverage that would have caught this? I assume there was a hole before; shiproom would like to know if it is plugged.

@mikem8361
Copy link
Member Author

I haven't added any additional test coverage yet. I created issue #21892 to track this.

@RussKeldorph
Copy link

@mikem8361 ok, so it sounds like in any case any additional test coverage wouldn't be included in this change since it wouldn't be in the coreclr repo. Thanks for the additional issue to track that.

@jamshedd jamshedd added servicing-approved-2.2 Servicing-approved Approved for servicing release and removed Servicing-consider Issue for next servicing release review servicing-approved-2.2 labels Jan 10, 2019
@jamshedd
Copy link
Member

Approved for 2.2.2.

@RussKeldorph RussKeldorph merged commit 124a95e into dotnet:release/2.2 Jan 10, 2019
@mikem8361 mikem8361 deleted the createdump2.2 branch January 14, 2019 19:02
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
area-Diagnostics Servicing-approved Approved for servicing release
Projects
None yet
5 participants