Skip to content

[maccatalyst][arm64] Flaky test failure in CI : Failed to get bundle information #63572

Closed

Description

@MaximLipnin

It's a flaky test failure - happens on some rolling builds, e.g.

https://helixre8s23ayyeko0k025g8.blob.core.windows.net/dotnet-runtime-refs-heads-main-f31599a56a244094b0/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests/1/console.0bcd8cf3.log?sv=2019-07-07&se=2022-01-29T20%3A27%3A51Z&sr=c&sp=rl&sig=5fySqKzsC5uO1MRG386a0QXb9%2F1gy7vUks196tsrzKs%3D

+ sudo launchctl asuser 505 sudo -u helix-runner sh ./xharness-runner.apple.sh --target maccatalyst --command-timeout 2280 --timeout 00:30:00 --launch-timeout 00:30:00 --includes-test-runner --expected-exit-code 0 --app /tmp/helix/working/A2A0091A/w/BF0409FF/e/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests.app --output-directory /tmp/helix/working/A2A0091A/w/BF0409FF/uploads
XHarness command issued: apple test --app /tmp/helix/working/A2A0091A/w/BF0409FF/e/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests.app --output-directory /tmp/helix/working/A2A0091A/w/BF0409FF/uploads --target maccatalyst --timeout 00:30:00 --xcode /Applications/Xcode13.app -v --launch-timeout 00:30:00
[12:28:45] info: Preparing run for maccatalyst
[12:28:45] info: Getting app bundle information from '/tmp/helix/working/A2A0091A/w/BF0409FF/e/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests.app'
[12:28:45] dbug: 
[12:28:45] dbug: Running /usr/libexec/PlistBuddy -c "Print CFBundleName" /tmp/helix/working/A2A0091A/w/BF0409FF/e/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests.app/Contents/Info.plist
[12:28:45] dbug: Process PlistBuddy exited with 0
[12:28:45] dbug: 
[12:28:45] dbug: Running /usr/libexec/PlistBuddy -c "Print CFBundleIdentifier" /tmp/helix/working/A2A0091A/w/BF0409FF/e/Microsoft.Extensions.Configuration.EnvironmentVariables.Tests.app/Contents/Info.plist
[12:29:01] dbug: Process 56292 didn't exit within 00:00:15 and will be killed
[12:29:01] dbug: Killing process tree of 56292...
[12:29:01] dbug: Pids to kill: 56292
[12:29:01] dbug: Running lldb diagnostics for pid 56292
[12:29:01] dbug: Printing backtrace for pid=56292
[12:29:10] dbug: (lldb) command source -s 0 '/var/folders/2_/8s76ml311gv142wwl15flm3c0000gs/T/tmp6WvMua.tmp'
[12:29:10] dbug: Executing commands in '/var/folders/2_/8s76ml311gv142wwl15flm3c0000gs/T/tmp6WvMua.tmp'.
[12:29:10] dbug: (lldb) process attach --pid 56292
[12:29:10] dbug: error: attach failed: no such process.
[12:29:10] dbug: 56292 Execution timed out after 15 seconds and the process was killed.
[12:29:10] dbug: Process PlistBuddy exited with 0
[12:29:10] fail: Failed to get bundle information: net.dot.Microsoft.Extensions.Configuration.EnvironmentVariables.Tests
                 
[12:29:10] dbug: Saving diagnostics data to '/tmp/helix/working/A2A0091A/w/BF0409FF/e/diagnostics.json'
XHarness exit code: 79 (FAILED_TO_GET_BUNDLE_INFO)

Activity

  1. ghost added
    untriaged
    on Jan 10, 2022
  2. steveisok commented on Jan 11, 2022

    @steveisok
    Member

    @premun Any idea what would be the cause?

  3. removed
    untriaged
    on Jan 11, 2022
  4. added this to the 7.0.0 milestone on Jan 11, 2022
  5. premun commented on Jan 11, 2022

    @premun
    Member

    Seems like Plistbuddy, which is the apple tool that pulls the properties out of plists for us, times out (but also returns the right response).

    This

    [12:29:10] fail: Failed to get bundle information: net.dot.Microsoft.Extensions.Configuration.EnvironmentVariables.Tests
    

    comes from here:

    var result = await _processManager.ExecuteCommandAsync(PlistBuddyPath, args, log, commandOutput, commandOutput, TimeSpan.FromSeconds(15), cancellationToken: cancellationToken);
    
    if (!result.Succeeded)
    {
        throw new Exception($"Failed to get bundle information: {commandOutput}");
    }

    We can bump the 15 second timeout or we can ignore the timeout. This operation should be quick as it only parses the XML so not sure bumping will help as it might be just hanging somewhere.

  6. steveisok commented on Jan 11, 2022

    @steveisok
    Member

    Since this appears to be flaky, can we bump the timeout and see if that helps?

  7. premun commented on Jan 12, 2022

    @premun
    Member

    The new XHarness with increased timeout is here: #63680

  8. premun commented on Jan 12, 2022

    @premun
    Member

    It's merged so let's give it a few days for it to propagate to all PR branches and let's see if we see this still

  9. premun commented on Jan 19, 2022

    @premun
    Member

    Then I propose reverting the timeout and just ignoring the fact it times out since PlistBuddy still returns what we need. If it does not, we will fail later

  10. premun commented on Jan 19, 2022

    @premun
    Member

    @MaximLipnin do you know how to get logs from more repros easily? I am wondering if it only happens when getting CFBundleIdentifier

  11. MaximLipnin commented on Jan 19, 2022

    @MaximLipnin
    ContributorAuthor

    @MaximLipnin do you know how to get logs from more repros easily? I am wondering if it only happens when getting CFBundleIdentifier

    Maybe something like this?

    WorkItems 
    | where Started > now(-30d)  
    | where ExitCode == 79
    | join kind= inner (
       Jobs  | where Started > now(-30d) | project  QueueName , JobId, Build, Type, Source 
    ) on JobId
    | summarize count() by ExitCode, QueueName, Started, Source
    | order by Started desc
    
  12. premun commented on Jan 28, 2022

    @premun
    Member

    @MaximLipnin it has been a couple of days. Are we seeing any more of these issues?

  13. MaximLipnin commented on Jan 28, 2022

    @MaximLipnin
    ContributorAuthor

    @premun Seems it's gone, at least, I dont see it anymore

  14. MaximLipnin commented on Jan 28, 2022

    @MaximLipnin
    ContributorAuthor

    I'm closing it as resolved, thanks to @premun for addressing.

  15. ghost locked as resolved and limited conversation to collaborators on Feb 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

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions