Skip to content

System.Text.Json.SourceGeneration.Roslyn3.11.Tests crashes due to an assertion on linux/arm64/debug #65817

Closed

Description

@radical

Hit this on #65752 .Build.

=================================================================
	Native stacktrace:
=================================================================
	0x7f9518ccbc - Unknown

Unhandled Exception:
System.Diagnostics.DebugProvider+DebugAssertException:    at System.Diagnostics.DebugProvider.Fail(String message, String detailMessage) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/DebugProvider.cs:line 22
   at System.Diagnostics.Debug.Fail(String message, String detailMessage) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Debug.cs:line 131
   at System.Diagnostics.Debug.Assert(Boolean condition, String message, String detailMessage) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Debug.cs:line 95
   at System.Diagnostics.Debug.Assert(Boolean condition) in /_/src/libraries/System.Private.CoreLib/src/System/Diagnostics/Debug.cs:line 80
   at System.Text.Json.Serialization.Metadata.JsonTypeInfo.InitializePropCache() in /_/src/libraries/System.Text.Json/src/System/Text/Json/Serialization/Metadata/JsonTypeInfo.Cache.cs:line 574
...

Activity

  1. ghost added
    untriaged
    on Feb 24, 2022
  2. added
    blocking-clean-ci
    on Feb 24, 2022
  3. added this to the 7.0.0 milestone on Feb 28, 2022
  4. removed
    untriaged
    on Feb 28, 2022
  5. radical commented on Mar 5, 2022

    @radical
    MemberAuthor
  6. krwq commented on Mar 7, 2022

    @krwq
    Member

    Note this is about Debug.Assert(PropertyCache == null); in InitializePropCache

    I think this assert is just bogus and should be removed. I assume scenario of re-using same options on multiple threads is a valid one and that could create such problem. The worst case scenario we will double initialize PropertyCache. I'm not sure it makes sense to lock it - at least cannot immediately see anything which could break. Same goes for the similar assert in the InitializeParameterCache

    @eiriktsarpalis @layomia?

  7. eiriktsarpalis commented on Mar 7, 2022

    @eiriktsarpalis
    Member

    I think we should make sure that the instance is initialized before it can be shared across multiple threads.

  8. eiriktsarpalis commented on Mar 28, 2022

    @eiriktsarpalis
    Member

    Duplicate of #60962

  9. ghost locked as resolved and limited conversation to collaborators on Apr 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    area-System.Text.Jsonblocking-clean-cibug

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions