Skip to content

Test failure System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_File(format: Gnu) #69474

Description

@VincentBu

Run: runtime-coreclr libraries-jitstress 20220517.1

Failed test:

net7.0-Linux-Release-arm64-CoreCLR_checked-no_tiered_compilation-(Ubuntu.1804.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20210531091519-97d8652

- System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_File(format: Gnu)

Error message:

Assert.Equal() Failure
Expected: 2022-05-17T07:50:14.0000000+00:00
Actual:   2022-05-17T07:50:13.0000000+00:00


Stack trace
   at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.VerifyPlatformSpecificMetadata(String filePath, TarEntry entry) in /_/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Unix.cs:line 194
   at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_File(TarFormat format) in /_/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.cs:line 110
   at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
   at System.Reflection.RuntimeMethodInfo.InvokeNonEmitUnsafe(Object obj, IntPtr* arguments, Span`1 argsForTemporaryMonoSupport, BindingFlags invokeAttr) in /_/src/coreclr/System.Private.CoreLib/src/System/Reflection/RuntimeMethodInfo.CoreCLR.cs:line 383

No kusto information.

Activity

  1. ghost added
    untriagedNew issue has not been triaged by the area owner
    on May 18, 2022
  2. jkotas commented on May 29, 2022

    @jkotas
    Member

    Failed in #69948

    This is failing often enough to deserve blocking-clean-ci label.

  3. added
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on May 29, 2022
  4. MichalStrehovsky commented on May 31, 2022

    @MichalStrehovsky
    Member

    Also failed in #69838. Different test, but likely the same problem (the seconds are off by one):

    Exception Message

    Assert.Equal() Failure
    Expected: 2022-05-30T03:28:53.0000000+00:00
    Actual: 2022-05-30T03:28:52.0000000+00:00

    Stack Trace

    at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.VerifyPlatformSpecificMetadata(String filePath, TarEntry entry) in //src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Unix.cs:line 195
    at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_SymbolicLink(TarFormat format, Boolean createTarget) in /
    /src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.cs:line 207
    at InvokeStub_TarWriter_WriteEntry_File_Tests.Add_SymbolicLink(Object, Object, IntPtr*)
    at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)

  5. carlossanlop commented on May 31, 2022

    @carlossanlop
    Contributor

    The Kusto query tells me this is happening in:

    • PRs only (no rolling builds)
    • Linux only, specifically Ubuntu 18.04 and redhat 7.
    • x64 and arm architectures.
    Jobs
    | project JobId, Source, Build, Started, Type
    | where Started > ago(15d)
    | where Type startswith "test/functional/cli/innerloop"
    | where Source == "pr/public/dotnet/runtime/refs/heads/main" or Source startswith "pr/public/dotnet/runtime/refs/pull"
    | join kind=inner
    	(TestResults | project Result, WorkItemId, JobId, WorkItemFriendlyName, Method, StackTrace, WorkItemName) on JobId
    | where Result == "Fail"
    | where Method == "Add_File"
    | where WorkItemFriendlyName == "System.Formats.Tar.Tests"
    | where StackTrace has "VerifyPlatformSpecificMetadata"
    | join kind=inner 
        (WorkItems | project WorkItemId, QueueName) on WorkItemId

    There are 22 hits in the last 30 days.

    As Michal mentioned, the test is failing because the timestamp comparison is differing by one second. This is strange, because the archive entry's timestamp that is converted from integer to DateTimeOffset is what is set in the file that the test extracts to disk. Then the test uses very similar logic to read that timestamp from the extracted file directly, and compares it. The number should be the same.

    Update: Pushed PR #69997 to disable the test to unblock PRs.

  6. added this to the 7.0.0 milestone on May 31, 2022
  7. 1 remaining item

  8. removed
    blocking-clean-ciBlocking PR or rolling runs of 'runtime' or 'runtime-extra-platforms'
    on Jun 6, 2022
  9. danmoseley commented on Jun 6, 2022

    @danmoseley
    Contributor

    removing label as test was disabled.

  10. VincentBu commented on Jun 13, 2022

    @VincentBu
    ContributorAuthor

    Failed again in: runtime-coreclr libraries-jitstressregs 20220612.1

    Failed test:

    net7.0-windows-Release-arm64-CoreCLR_checked-jitstressregs4-Windows.10.Arm64v8.Open
    
    - System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_File(format: Gnu)
    
    

    Error message:

    Assert.Equal() Failure
    Expected: 50
    Actual:   49
    
    
    Stack trace
       at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.VerifyTimestamp(DateTime expected, DateTimeOffset actual) in /_/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Windows.cs:line 76
       at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.VerifyPlatformSpecificMetadata(String filePath, TarEntry entry) in /_/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.Windows.cs:line 63
       at System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_File(TarEntryFormat format) in /_/src/libraries/System.Formats.Tar/tests/TarWriter/TarWriter.WriteEntry.File.Tests.cs:line 111
       at InvokeStub_TarWriter_WriteEntry_File_Tests.Add_File(Object, Object, IntPtr*)
       at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
    
  11. MichalStrehovsky commented on Jun 13, 2022

    @MichalStrehovsky
    Member

    I haven't looked in detail but it looked like whatever we're validating here was roundripped through a floating-point number in the TAR file format - that raises a red flag around precisions and off-by-one roundings. It should be possible to validate this is caused by rounding by roundtripping all possible integer timestamps within one second through the file format and seeing what comes out on the integer side again.

  12. carlossanlop commented on Jun 13, 2022

    @carlossanlop
    Contributor

    I haven't looked in detail but it looked like whatever we're validating here was roundripped through a floating-point number in the TAR file format - that raises a red flag around precisions and off-by-one roundings. It should be possible to validate this is caused by rounding by roundtripping all possible integer timestamps within one second through the file format and seeing what comes out on the integer side again.

    Thank you, @MichalStrehovsky. I am currently working on changing all the tar tests to avoid expecting exact values. But I will also test what you're suggesting, in case the conversion logic from/to DateTimeOffset/double is wrong.

    cc @tannergooding @dakersnar

  13. tannergooding commented on Jun 13, 2022

    @tannergooding
    Member

    There may be a bug for certain values, but it is worth noting that guaranteeing roundtripping for long->double->long isn't possible because its by definition a lossy operation for integers over 2^52.

  14. ghost added
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 21, 2022
  15. MichalStrehovsky commented on Jun 21, 2022

    @MichalStrehovsky
    Member

    Another similarly looking failure in System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink:

        System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink [FAIL]
          Assert.Equal() Failure
          Expected: 27
          Actual:   28
          Stack Trace:
            /_/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs(311,0): at System.Formats.Tar.Tests.TarTestsBase.CompareDateTimeOffsets(DateTimeOffset expected, DateTimeOffset actual)
            /_/src/libraries/System.Formats.Tar/tests/TarEntry/TarEntry.Conversion.Tests.Base.cs(152,0): at System.Formats.Tar.Tests.TarTestsConversionBase.ConvertAndVerifyEntry(TarEntry originalEntry, TarEntryType entryType, TarEntryFormat formatToConvert, DateTimeOffset initialNow)
            /_/src/libraries/System.Formats.Tar/tests/TarEntry/TarEntry.Conversion.Tests.Base.cs(45,0): at System.Formats.Tar.Tests.TarTestsConversionBase.TestConstructionConversionBackAndForth(TarEntryType originalEntryType, TarEntryFormat firstAndLastFormat, TarEntryFormat formatToConvert)
            /_/src/libraries/System.Formats.Tar/tests/TarEntry/V7TarEntry.Conversion.Tests.cs(218,0): at System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink()
               at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
            /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs(69,0): at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr)
        System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_CharacterDevice [SKIP]
          Condition(s) not met: "IsRemoteExecutorSupportedAndOnUnixAndSuperUser"
        System.Formats.Tar.Tests.TarWriter_WriteEntry_File_Tests.Add_Fifo [SKIP]
          Condition(s) not met: "IsRemoteExecutorSupportedAndOnUnixAndSuperUser"
      Finished:    System.Formats.Tar.Tests
    === TEST EXECUTION SUMMARY ===
       System.Formats.Tar.Tests  Total: 440, Errors: 0, Failed: 1, Skipped: 3, Time: 3.042s
    

    There are several tests with this failure mode, but only one of them got disabled. #69997 (comment)

    The latest one hit in https://dev.azure.com/dnceng/public/_build/results?buildId=1835642&view=logs&jobId=ee1d0ee6-ff1e-56e7-4a8c-87d1cd9cc235.

    I'm putting back blocking clean CI label.

  16. VincentBu commented on Jun 22, 2022

    @VincentBu
    ContributorAuthor

    Failed again in: runtime-coreclr libraries-jitstress 20220621.1

    Failed test:

    net7.0-Linux-Release-arm64-CoreCLR_checked-jitstress1-(Ubuntu.1804.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20210531091519-97d8652
    
    - System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink
    
    net7.0-Linux-Release-arm64-CoreCLR_checked-jitstress2-(Ubuntu.1804.Arm64.Open)[email protected]/dotnet-buildtools/prereqs:ubuntu-18.04-helix-arm64v8-20210531091519-97d8652
    
    - System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink
    
    

    Error message:

    Assert.Equal() Failure
    Expected: 44
    Actual:   45
    
    
    Stack trace
       at System.Formats.Tar.Tests.TarTestsBase.CompareDateTimeOffsets(DateTimeOffset expected, DateTimeOffset actual) in /_/src/libraries/System.Formats.Tar/tests/TarTestsBase.cs:line 311
       at System.Formats.Tar.Tests.TarTestsConversionBase.ConvertAndVerifyEntry(TarEntry originalEntry, TarEntryType entryType, TarEntryFormat formatToConvert, DateTimeOffset initialNow) in /_/src/libraries/System.Formats.Tar/tests/TarEntry/TarEntry.Conversion.Tests.Base.cs:line 152
       at System.Formats.Tar.Tests.TarTestsConversionBase.TestConstructionConversionBackAndForth(TarEntryType originalEntryType, TarEntryFormat firstAndLastFormat, TarEntryFormat formatToConvert) in /_/src/libraries/System.Formats.Tar/tests/TarEntry/TarEntry.Conversion.Tests.Base.cs:line 45
       at System.Formats.Tar.Tests.V7TarEntry_Conversion_Tests.Constructor_ConversionGnu_BackAndForth_SymbolicLink() in /_/src/libraries/System.Formats.Tar/tests/TarEntry/V7TarEntry.Conversion.Tests.cs:line 218
       at System.RuntimeMethodHandle.InvokeMethod(Object target, Void** arguments, Signature sig, Boolean isConstructor)
       at System.Reflection.MethodInvoker.Invoke(Object obj, IntPtr* args, BindingFlags invokeAttr) in /_/src/libraries/System.Private.CoreLib/src/System/Reflection/MethodInvoker.cs:line 64
    
  17. ghost removed
    in-prThere is an active PR which will close this issue when it is merged
    on Jun 23, 2022
  18. ghost locked as resolved and limited conversation to collaborators on Jul 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions