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

[ProfilerAPI] Different reserved region sizes reported for frozen segment #87834

Closed
ww898 opened this issue Jun 20, 2023 · 4 comments · Fixed by #85727
Closed

[ProfilerAPI] Different reserved region sizes reported for frozen segment #87834

ww898 opened this issue Jun 20, 2023 · 4 comments · Fixed by #85727

Comments

@ww898
Copy link
Contributor

ww898 commented Jun 20, 2023

Description

I see different region reserved sizes for the same frozen segment reported by GetGenerationBounds (type=soh2 in log) and GetNonGCHeapBounds (type=foh in log) calls:

0000449C 1 0000027202149FE0 GG::Heaps c=7
	#0 type=poh  base=0000027280000028 size=0000000000003FF0 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#1 type=loh  base=0000027282C00028 size=0000000000050820 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#2 type=soh2 base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8 objectSizeAlignment=8 // <=== here
	#3 type=soh2 base=0000027282800028 size=00000000000151B8 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#4 type=soh1 base=0000027282000028 size=0000000000000000 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#5 type=soh0 base=0000027284C00028 size=000000000010B0A0 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#6 type=foh  base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000 objectSizeAlignment=8 // <=== here

Reproduction Steps

Application to reproduce the issue:

Console.WriteLine("Hello, World!");
Console.ReadLine();

Expected behavior

base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8

Actual behavior

base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8.0-preview.5
Windows 10 Pro 22H2 x64

Other information

No response

@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 Jun 20, 2023
@ghost ghost added the untriaged New issue has not been triaged by the area owner label Jun 20, 2023
@ww898
Copy link
Contributor Author

ww898 commented Jun 21, 2023

ranges[segIdx].rangeLengthReserved = (UINT_PTR)segments[segIdx]->m_Size;

We should subtract sizeof(ObjHeader) in this line

@ghost
Copy link

ghost commented Jun 21, 2023

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

Issue Details

Description

I see different region reserved sizes for the same frozen segment reported by GetGenerationBounds (type=soh2 in log) and GetNonGCHeapBounds (type=foh in log) calls:

0000449C 1 0000027202149FE0 GG::Heaps c=7
	#0 type=poh  base=0000027280000028 size=0000000000003FF0 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#1 type=loh  base=0000027282C00028 size=0000000000050820 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#2 type=soh2 base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8 objectSizeAlignment=8 // <=== here
	#3 type=soh2 base=0000027282800028 size=00000000000151B8 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#4 type=soh1 base=0000027282000028 size=0000000000000000 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#5 type=soh0 base=0000027284C00028 size=000000000010B0A0 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#6 type=foh  base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000 objectSizeAlignment=8 // <=== here

Reproduction Steps

Application to reproduce the issue:

Console.WriteLine("Hello, World!");
Console.ReadLine();

Expected behavior

base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8

Actual behavior

base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8.0-preview.5
Windows 10 Pro 22H2 x64

Other information

No response

Author: ww898
Assignees: -
Labels:

area-GC-coreclr, untriaged, needs-area-label

Milestone: -

@cshung cshung added area-Diagnostics-coreclr and removed untriaged New issue has not been triaged by the area owner needs-area-label An area label is needed to ensure this gets routed to the appropriate area owners labels Jun 21, 2023
@ghost
Copy link

ghost commented Jun 21, 2023

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

Issue Details

Description

I see different region reserved sizes for the same frozen segment reported by GetGenerationBounds (type=soh2 in log) and GetNonGCHeapBounds (type=foh in log) calls:

0000449C 1 0000027202149FE0 GG::Heaps c=7
	#0 type=poh  base=0000027280000028 size=0000000000003FF0 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#1 type=loh  base=0000027282C00028 size=0000000000050820 reservedSize=0000000001FFFFD8 objectSizeAlignment=8
	#2 type=soh2 base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8 objectSizeAlignment=8 // <=== here
	#3 type=soh2 base=0000027282800028 size=00000000000151B8 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#4 type=soh1 base=0000027282000028 size=0000000000000000 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#5 type=soh0 base=0000027284C00028 size=000000000010B0A0 reservedSize=00000000003FFFD8 objectSizeAlignment=8
	#6 type=foh  base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000 objectSizeAlignment=8 // <=== here

Reproduction Steps

Application to reproduce the issue:

Console.WriteLine("Hello, World!");
Console.ReadLine();

Expected behavior

base=0000027202170008 size=0000000000007020 reservedSize=00000000003FFFF8

Actual behavior

base=0000027202170008 size=0000000000007020 reservedSize=0000000000400000

Regression?

No response

Known Workarounds

No response

Configuration

.NET 8.0-preview.5
Windows 10 Pro 22H2 x64

Other information

No response

Author: ww898
Assignees: -
Labels:

area-Diagnostics-coreclr, area-GC-coreclr

Milestone: -

@cshung
Copy link
Member

cshung commented Jun 21, 2023

This work-in-progress PR #85727 will fix it.

@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 21, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jul 1, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Aug 1, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants