Skip to content

Mac_ios flutter_view_ios__start_up is 3.00% flaky #98419

Description

@fluttergithubbot

Activity

  1. added
    engineflutter/engine related. See also e: labels.
    c: flakeTests that sometimes, but not always, incorrectly pass
    on Feb 14, 2022
  2. zanderso commented on Feb 14, 2022

    @zanderso
    Member

    Waiting to see whether this is part of #98426

    /cc @jmagman

  3. keyonghan commented on Feb 14, 2022

    @keyonghan
    Contributor

    These are different issues. The flake here happened on both mac6. and mac 30, with timing out:

    [flutter_view_ios__start_up] [STDOUT] stdout: [  +65 ms] Successfully connected to service protocol: http://127.0.0.1:52824//
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +11 ms] Application running.
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +14 ms] Connected to iPhone
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Tracing startup on iPhone.
    [flutter_view_ios__start_up] [STDOUT] stdout: [   +4 ms] Waiting for application to render first frame...
    
  4. keyonghan commented on Feb 15, 2022

    @keyonghan
    Contributor
  5. zanderso commented on Feb 16, 2022

    @zanderso
    Member

    The first instance of this flake was after landing the Engine roll here #98347, however none of the commits in that roll look suspicious. Looking back several commits from there, I'm also not seeing anything that jumps out as a likely cause.

    The symptom and timeframe match #97958 to some extent. The app is installed, starts up, but then becomes wedged. In the case of this issue, it's after the Observatory comes up, whereas in 97958 it's before, but I think the debugging approach is probably similar. We need to examine the thread backtraces at the point where the app is wedged.

    @jmagman is there any way to do something like #98550 when we already have the Observatory port, or is control over something like that only in the hands of the test harness at that point?

  6. jmagman commented on Feb 16, 2022

    @jmagman
    Member

    @jmagman is there any way to do something like #98550 when we already have the Observatory port, or is control over something like that only in the hands of the test harness at that point?

    The test is timing out at 30 minutes, so we'd need to add a timeout here to give us time to process the failure:

    vmService.service.onExtensionEvent.listen((vm_service.Event event) {
    if (event.extensionKind == 'Flutter.FirstFrame') {
    whenFirstFrameRendered.complete();
    }
    });

    lldb is attached, so it should be possible to trigger a bt dump with enough plumbing (that spot in the code doesn't know anything about the device, just the vm).
    It would be nice to be able to trigger a spindump/sample of an iOS app from macOS, but I don't think that's possible.

  7. jmagman commented on Feb 23, 2022

    @jmagman
    Member

    Host logs: https://logs.chromium.org/logs/flutter/buildbucket/cr-buildbucket/8821834660096740417/+/u/run_flutter_view_ios__start_up/test_stdout

    [flutter_view_ios__start_up] [STDOUT] stdout: [+1410 ms] Observatory URL on device: http://127.0.0.1:64467//
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +25 ms] fopen failed for data file: errno = 2 (No such file or directory)
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Errors found! Invalidating cache...
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Attempting to forward device port 64467 to host port 62239
    [flutter_view_ios__start_up] [STDOUT] stdout: [   +1 ms] executing: /opt/s/w/ir/x/w/recipe_cleanup/tmpzipevwf8/flutter sdk/bin/cache/artifacts/usbmuxd/iproxy 62239:64467 --udid 6498800ec2ecd25eeb6293123de8db9f678b8a0d --debug
    [flutter_view_ios__start_up] [STDOUT] stdout: [+1041 ms] Forwarded port ForwardedPort HOST:62239 to DEVICE:64467
    [flutter_view_ios__start_up] [STDOUT] stdout: [   +2 ms] Forwarded host port 62239 to device port 64467 for Observatory
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +45 ms] Installing and launching... (completed in 33.7s)
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +14 ms] Connecting to service protocol: http://127.0.0.1:62239//
    [flutter_view_ios__start_up] [STDOUT] stdout: [ +141 ms] Launching a Dart Developer Service (DDS) instance at http://127.0.0.1:0/, connecting to VM service at http://127.0.0.1:62239//.
    [flutter_view_ios__start_up] [STDOUT] stdout: [ +123 ms] DDS is listening at http://127.0.0.1:62242/8e2jaNDrwtc=/.
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +76 ms] Successfully connected to service protocol: http://127.0.0.1:62239//
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +15 ms] Application running.
    [flutter_view_ios__start_up] [STDOUT] stdout: [  +30 ms] Connected to Godofredo Contreras’s iPhone
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Tracing startup on Godofredo Contreras’s iPhone.
    [flutter_view_ios__start_up] [STDOUT] stdout: [   +4 ms] Waiting for application to render first frame...
    [timeout]
    

    Device logs:
    Debug server connection

    Feb 18 19:19:23 debugserver[825] <Notice>: [LaunchAttach] successfully attached to pid 826
    

    Engine up

    Feb 18 19:19:50 Runner(Flutter)[826] <Notice>: flutter: Observatory listening on http://127.0.0.1:64467/
    ...
    Feb 18 19:19:50 Runner(UIKitCore)[826] <Notice>: sceneOfRecord: sceneID: sceneID:com.yourcompany.flutterView-default  persistentID: 3D818F3B-89ED-4921-A66A-B35BE0C8E7F2
    Feb 18 19:19:50 Runner(libCoreFSCache.dylib)[826] <Error>: fopen failed for data file: errno = 2 (No such file or directory)
    Feb 18 19:19:50 Runner(libCoreFSCache.dylib)[826] <Error>: Errors found! Invalidating cache...
    

    A peep later for the same process in an irrelevant subsystem a minute later, then nothing after that.

    Feb 18 19:20:49 Runner(CoreAnalytics)[826] <Notice>: Received configuration update from daemon (initial)
    

    Interestingly we have a startup timeline trace, so it's doing something: https://storage.googleapis.com/flutter_logs/flutter/baa2803fe1da00b18c47797abc31db230a64f5df/flutter_view_ios__start_up/c60d2a06-0aaa-4974-b33d-7b4a04cf9bc5/start_up_timeline.json

  8. jmagman commented on Feb 23, 2022

    @jmagman
    Member

    Adding some logging here: #98957

  9. fluttergithubbot commented on Mar 2, 2022

    @fluttergithubbot
    ContributorAuthor

    Current flaky ratio for the past (up to) 100 commits is 12.79%. Flaky number: 11; total number: 86.
    One recent flaky example for a same commit: https://ci.chromium.org/ui/p/flutter/builders/prod/Mac_ios%20flutter_view_ios__start_up/138
    Commit: 872e604
    Flaky builds:
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/98
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/96
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/95
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/87
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/85
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/65
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/64
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/52
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/138
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/132
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/116
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/113
    https://ci.chromium.org/ui/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up/106

    Recent test runs:
    https://flutter-dashboard.appspot.com/#/build?taskFilter=Mac_ios%20flutter_view_ios__start_up

  10. zanderso commented on Mar 2, 2022

    @zanderso
    Member

    The new logging shows up in build 138:

    [flutter_view_ios__start_up] [STDOUT] stdout: [   +3 ms] Waiting for application to render first frame...
    [flutter_view_ios__start_up] [STDOUT] stdout: [+10016 ms] First frame is taking longer than expected...
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Views:
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] id: _flutterView/0x10583ba20 isolate: isolates/2124306436294215
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Received VM events:
    [flutter_view_ios__start_up] [STDOUT] stdout: [        ] Flutter.ServiceExtensionStateChanged: [ExtensionData {extension: ext.flutter.activeDevToolsServerAddress, value: http://127.0.0.1:9100/}]
    [flutter_view_ios__start_up] [STDOUT] stdout:            Flutter.ServiceExtensionStateChanged: [ExtensionData {extension: ext.flutter.connectedVmServiceUri, value: http://127.0.0.1:51289/FmQKMskA6K8=/}]
    [flutter_view_ios__start_up] [STDOUT] stdout:
    
  11. 69 remaining items

  12. added and removed
    P1High-priority issues at the top of the work list
    on Apr 13, 2022
  13. zanderso commented on Apr 13, 2022

    @zanderso
    Member

    623 is a code signing failure.

    636 and 637, I suspect ran before the fix.

    Assigning @keyonghan to comment on whether the codesigning error from 623 has already been addressed. If so, I believe this issue can be closed.

  14. added
    P1High-priority issues at the top of the work list
    and removed on Apr 13, 2022
  15. keyonghan commented on Apr 13, 2022

    @keyonghan
    Contributor

    623 failure is #101861, where devicelab tests are scheduled to run on arm64 bots.

    I will use that bug to enforce mac_model for existing devicelab bots to avoid interaction with different bots.

    From the historical data, no single flake in recent 50 runs: https://ci.chromium.org/p/flutter/builders/staging/Mac_ios%20flutter_view_ios__start_up?limit=50.

    Thanks everyone to address this flaky bug! Closing.

  16. github-actions commented on Apr 27, 2022

    @github-actions

    This thread has been automatically locked since there has not been any recent activity after it was closed. If you are still experiencing a similar issue, please open a new bug, including the output of flutter doctor -v and a minimal reproduction of the issue.

  17. 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

Labels

P1High-priority issues at the top of the work listc: flakeTests that sometimes, but not always, incorrectly passengineflutter/engine related. See also e: labels.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions