Skip to content

Mac_ios microbenchmarks_ios fails with random seed 225627159 #156506

Closed as not planned

Activity

  1. added
    P0Critical issues such as a build break or regression
    on Oct 9, 2024
  2. added
    in triagePresently being triaged by the triage team
    team-infraOwned by Infrastructure team
    and removed
    in triagePresently being triaged by the triage team
    on Oct 10, 2024
  3. changed the title [-]`Mac_ios microbenchmarks_ios` failing very frequently[/-] [+]`Mac_ios microbenchmarks_ios` fails with random seed 225627159[/+] on Oct 10, 2024
  4. christopherfujino commented on Oct 10, 2024

    @christopherfujino
    ContributorAuthor

    It appears this was failing due to the daily random seed used for ordering the tests: 225627159. I'm reducing the priority on this since today it is no longer failing, and assigning to @jtmcdole to debug.

  5. added
    P2Important issues not at the top of the work list
    triaged-infraTriaged by Infrastructure team
    and removed
    P0Critical issues such as a build break or regression
    on Oct 10, 2024
  6. jtmcdole commented on Oct 10, 2024

    @jtmcdole
    Member

    Yep - this failed locally for me on the first microbenchmark run in the seed (layout/text_intrinsic_bench.dart)

  7. jason-simmons commented on Oct 10, 2024

    @jason-simmons
    Member

    I was able to reproduce this by:

    The error occurs when two calls to LiveTestWidgetsFlutterBinding.handleBeginFrame happen with no handleDrawFrame call in between.

    Bad state: handleBeginFrame() called before previous handleDrawFrame()
     #0      LiveTestWidgetsFlutterBinding.handleBeginFrame (package:flutter_test/src/binding.dart:1788)
     #1      BenchmarkingBinding.handleBeginFrame (package:microbenchmarks/benchmark_binding.dart:15)
     #2      SchedulerBinding._handleBeginFrame (package:flutter/src/scheduler/binding.dart:1155)
     #6      _invoke1 (dart:ui/hooks.dart:330)
     #7      PlatformDispatcher._beginFrame (dart:ui/platform_dispatcher.dart:405)
     #8      _beginFrame (dart:ui/hooks.dart:272)
    
    

    On my setup that happened due to a race between the handleBeginFrame calls made by WidgetTester.pumpBenchmark and handleBeginFrame calls initiated by the engine in response to system events.

    Shortly after launching the benchmark the iOS engine received an event that triggered a call to updateViewportMetrics. This causes the engine to schedule a frame and call handleBeginFrame at the next vsync. If that handleBeginFrame happens during a frame interval started by pumpBenchmark, then you get the exception above.

    @goderbauer Would it make sense for LiveTestWidgetsFlutterBinding to be less strict about the interleaving of handleBeginFrame and handleDrawFrame calls? The test framework can not assume that it has complete control over frame scheduling.

    Instead of throwing,LiveTestWidgetsFlutterBinding.handleBeginFrame could warn about an unexpected handleBeginFrame and skip the call to the superclass.

  8. jtmcdole commented on Oct 11, 2024

    @jtmcdole
    Member

    I'm currently moving to cycle the microbenchmarks from native, with new a FlutterEngine created for each to keep the test time low and try to stabilize the test numbers.

  9. added
    ⏳Bot is counting down the days until it unassigns the issue
    on Feb 14, 2025
  10. flutter-triage-bot commented on Feb 14, 2025

    @flutter-triage-bot

    This issue is assigned to @jtmcdole but has had no recent status updates. Please consider unassigning this issue if it is not going to be addressed in the near future. This allows people to have a clearer picture of what work is actually planned. Thanks!

  11. flutter-triage-bot commented on May 3, 2025

    @flutter-triage-bot

    This issue was assigned to @jtmcdole but has had no status updates in a long time. To remove any ambiguity about whether the issue is being worked on, the assignee was removed.

  12. removed
    ⏳Bot is counting down the days until it unassigns the issue
    on May 3, 2025
  13. github-actions commented on Jun 11, 2025

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

  14. locked as resolved and limited conversation to collaborators on Jun 11, 2025
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

    P2Important issues not at the top of the work listteam-infraOwned by Infrastructure team

    Type

    No type

    Projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions