Repository navigation
Gauge sometimes failed to parse the CPU percentage #45194
Copy link
Copy link
Closed
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Description
See this test run and this test run for examples.
The error log is like the following
Executing: pub global run gauge ioscpugpu new -w 9e4363d6960ef619aad7b987353075b5fdd4ad00 -l 10000 in /Users/flutter/.cocoon/flutter/dev/benchmarks/macrobenchmarks/build
2019-11-19T12:23:52.882340: Hostname: Platform.localHostname
stdout: Running instruments on iOS device 9e4363d6960ef619aad7b987353075b5fdd4ad00 for 10000ms
2019-11-19T12:23:56.910192: Hostname: Platform.localHostname
stdout: Parsing /Users/flutter/.cocoon/flutter/dev/benchmarks/macrobenchmarks/build/instrumentscli0.trace
2019-11-19T12:23:59.487925: Hostname: Platform.localHostname
stdout: 00:00.000.000 0 FPS 15.0% GPU
2019-11-19T12:23:59.490546: Hostname: Platform.localHostname
stderr: Unhandled exception:
stderr: Exception: No valid measurements found.
2019-11-19T12:23:59.490693: Hostname: Platform.localHostname
stderr: #0 IosTraceParser._average (package:gauge/parser.dart:112:7)
stderr: #1 IosTraceParser._computeCpuPercent (package:gauge/parser.dart:105:12)
stderr: #2 IosTraceParser.parseCpuGpu (package:gauge/parser.dart:62:47)
stderr: #3 IosCpuGpuNew.run (package:gauge/commands/ioscpugpu/new.dart:62:40)
stderr:
stderr: #4 CommandRunner.runCommand (package:args/command_runner.dart:197:27)
stderr:
stderr: #5 CommandRunner.run. (package:args/command_runner.dart:112:25)
stderr: #6 new Future.sync (dart:async/future.dart:224:31)
stderr: #7 CommandRunner.run (package:args/command_runner.dart:112:14)
stderr: #8 main (file:///Users/flutter/.pub-cache/hosted/pub.dartlang.org/gauge-0.1.4/bin/gauge.dart:15:10)
stderr: #9 _startIsolate. (dart:isolate-patch/isolate_patch.dart:303:32)
stderr: #10 _RawReceivePortImpl._handleMessage (dart:isolate-patch/isolate_patch.dart:172:12)
2019-11-19T12:23:59.495504: Hostname: Platform.localHostname
"pub" exit code: 255
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
a: tests"flutter test", flutter_test, or one of our tests"flutter test", flutter_test, or one of our testsc: flakeTests that sometimes, but not always, incorrectly passTests that sometimes, but not always, incorrectly passframeworkflutter/packages/flutter repository. See also f: labels.flutter/packages/flutter repository. See also f: labels.
Activity
Log raw output lines for debugging
Log raw output lines for debugging (#47)
Upgrade gauge for debugging
Upgrade gauge for debugging (#45212)
zanderso commentedon Feb 4, 2020
@liyuqian I've seen this come up again recently. Were you able to root-cause this?
liyuqian commentedon Feb 5, 2020
@gaaclarke is working on #45435 which should fix this. @gaaclarke : can you please share some update on that issue? (Let's put the update in #45435 and CC Zach).
gaaclarke commentedon Feb 5, 2020
All my updates are in #45435 . I stopped looking into it when I realized that it will require a big investment to find a workaround (multiple weeks of work).
zanderso commentedon Feb 5, 2020
@gaaclarke Is there some subset of that work that would address the test flakes?
gaaclarke commentedon Feb 5, 2020
I never looked into the test flakes, i've only looked into the problems with the latest versions of XCode. Those problems are able to manifest 100% of the time.
godofredoc commentedon Feb 5, 2020
This problem is affecting over 20% of the test runs even when they are running on the same machine and using Xcode 10.3 and iOS 12.3.
@gaaclarke if the problem is difficult to fix is it possible to mitigate it with some retries?
zanderso commentedon Feb 5, 2020
Even if the underlying problem is difficult to fix, if it is affecting 20% of the test runs, we need to prioritize fixing it.
gaaclarke commentedon Feb 5, 2020
@godofredoc That sounds reasonable to me in the short term. I don't know if the flakey issue is hard to fix. I'm not sure if it's worth looking into, beyond retries, since we want to fix gauge for the new SDK.
I'm not sure if it is clear from the other issue but gauge is built on top of a tool that uses undocumented Apple api's. Apple doesn't provide an api to programmatically process the results of Instruments probes. We should try to communicate that feature request to Apple.
gaaclarke commentedon Feb 5, 2020
I've sent out an email and CC'd @zanderso @liyuqian and @godofredoc so we can get the feature request process running in parallel.
zanderso commentedon Feb 5, 2020
/cc @jmagman who might also be interested in this area.
gaaclarke commentedon Feb 6, 2020
feedback filed: https://feedbackassistant.apple.com/feedback/7566306
ADRT filed: https://docs.google.com/document/d/14lYMwp_ED-2WRMjwEcnfot4raF0Wl3vy2y5HX8M_LzI/edit#
jmagman commentedon Feb 6, 2020
Commented in #45435 (comment)
goderbauer commentedon Feb 27, 2020
From #50367 it sounds like these tests have been disabled for the time being.
It seems like we are tracking re-enabling in #45435. Should we close this bug then?
liyuqian commentedon Feb 27, 2020
Sure, let's close it for now, and see how flaky our new tool would be once #45435 is fixed.
github-actions commentedon Aug 22, 2021
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 -vand a minimal reproduction of the issue.