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

"dotnet-pgo dump" throws "Same type X used as both ValueType and non-ValueType" #61604

Closed
EgorBo opened this issue Nov 15, 2021 · 3 comments · Fixed by #87355
Closed

"dotnet-pgo dump" throws "Same type X used as both ValueType and non-ValueType" #61604

EgorBo opened this issue Nov 15, 2021 · 3 comments · Fixed by #87355
Assignees
Milestone

Comments

@EgorBo
Copy link
Member

EgorBo commented Nov 15, 2021

Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Runtime.InteropServices.GCHandle` used as both ValueType and non-ValueType
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType.SetIsValueType(Boolean isValueType) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemType.cs:line 50
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext.TypeRefSignatureParserProvider.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefSignatureParserProvider.cs:line 138
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeHandle(BlobReader& blobReader, Byte rawTypeKind, Boolean allowTypeSpecifications)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext..ctor(IEnumerable`1 refReaders) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemContext.cs:line 102
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerDumpMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 254
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 224
   at Microsoft.Diagnostics.Tools.Pgo.Program.Main(String[] args) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 129

and

Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Collections.Generic.KeyValuePair`2` used as both ValueType and non-ValueType

@AndyAyersMS @davidwrighton does it ring a bell? I used the latest version of dotnet-pgo tool (7.0.*)

@dotnet-issue-labeler dotnet-issue-labeler bot added area-System.Reflection untriaged New issue has not been triaged by the area owner labels Nov 15, 2021
@ghost
Copy link

ghost commented Nov 15, 2021

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

Issue Details
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Runtime.InteropServices.GCHandle` used as both ValueType and non-ValueType
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType.SetIsValueType(Boolean isValueType) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemType.cs:line 50
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext.TypeRefSignatureParserProvider.GetTypeFromReference(MetadataReader reader, TypeReferenceHandle handle, Byte rawTypeKind) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefSignatureParserProvider.cs:line 138
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeTypeHandle(BlobReader& blobReader, Byte rawTypeKind, Boolean allowTypeSpecifications)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeType(BlobReader& blobReader, Boolean allowTypeSpecifications, Int32 typeCode)
   at System.Reflection.Metadata.Ecma335.SignatureDecoder`2.DecodeMethodSignature(BlobReader& blobReader)
   at Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemContext..ctor(IEnumerable`1 refReaders) in /_/src/coreclr/tools/dotnet-pgo/TypeRefTypeSystem/TypeRefTypeSystemContext.cs:line 102
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerDumpMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 254
   at Microsoft.Diagnostics.Tools.Pgo.Program.InnerMain(CommandLineOptions commandLineOptions) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 224
   at Microsoft.Diagnostics.Tools.Pgo.Program.Main(String[] args) in /_/src/coreclr/tools/dotnet-pgo/Program.cs:line 129

and

Microsoft.Diagnostics.Tools.Pgo.TypeRefTypeSystem.TypeRefTypeSystemType
Unhandled exception. System.Exception: Same type `[S.P.CoreLib]System.Collections.Generic.KeyValuePair`2` used as both ValueType and non-ValueType

@AndyAyersMS @davidwrighton does it ring a bell? I used the latest version of dotnet-pgo tool (7.0.*)

Author: EgorBo
Assignees: -
Labels:

area-System.Reflection, untriaged

Milestone: -

@AndyAyersMS
Copy link
Member

No, not familiar with this one.

@jakobbotsch
Copy link
Member

Hmm, I tried to fix this problem in #52963. I wonder why we are seeing it again.

@jeffschwMSFT jeffschwMSFT removed the untriaged New issue has not been triaged by the area owner label Jan 11, 2022
@mangod9 mangod9 modified the milestones: 7.0.0, Future Jul 19, 2022
@trylek trylek mentioned this issue May 3, 2023
46 tasks
@davidwrighton davidwrighton self-assigned this Jun 9, 2023
davidwrighton added a commit to davidwrighton/runtime that referenced this issue Jun 9, 2023
@ghost ghost added the in-pr There is an active PR which will close this issue when it is merged label Jun 9, 2023
@ghost ghost removed the in-pr There is an active PR which will close this issue when it is merged label Jun 12, 2023
@ghost ghost locked as resolved and limited conversation to collaborators Jul 13, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
6 participants