Fix ash_unittests crash on chromeos VMs (not linux-chromeos) |
||||||
Issue descriptionSee the following build where I tried running ash_unittests in cros VMs: https://ci.chromium.org/p/chromium/builders/luci.chromium.try/chromeos-amd64-generic-rel/50507 All tests crash with the following error: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8940455833145754624/+/steps/ash_unittests__with_patch_/0/logs/TrayKeyboardBrightnessTest.DetailedViewVisibilityChangesDuringTabletMode/0 ie: [13311:13311:0720/122944.199585:278067462:FATAL:statistics_provider.cc(318)] Check failed: load_statistics_started_. Looks like some service isn't getting initialized properly in the test. Perhaps the fake provider should be used instead? https://codesearch.chromium.org/chromium/src/chromeos/system/fake_statistics_provider.h?rcl=5c4bc1ff53af81b21ba55479c492e085cfd10ec2&l=20 FTR, this crash is avoided on linux-chromeos since the IsRunningOnVm() call quits early due to: https://codesearch.chromium.org/chromium/src/chromeos/system/statistics_provider.cc?rcl=0d313e2262a7d677b569046ece3b9630517061b1&l=451
,
Jul 25
Unless that crash is related to my changes (which it doesn't look like) I won't be able to work on StatisticsProvider, sorry.
,
Jul 27
,
Jul 27
,
Jul 30
Instructions for how to run in the vm are here: https://www.google.com/url?q=https://chromium.googlesource.com/chromiumos/docs/%2B/master/cros_vm.md&sa=D&source=hangouts&ust=1533081024099000&usg=AFQjCNFJgyk9PWVf0pTIcM9XT1SNwk3uyg . After building run with $outdir/bin/run_$test .
,
Aug 3
Slightly more direct link for the doc in #5: https://chromium.googlesource.com/chromiumos/docs/+/master/cros_vm.md#run-a-chrome-gtest-binary-in-the-vm
,
Aug 3
,
Aug 3
This DCHECK is also failing, but I think it's because I have dcheck_always_on: [2611/2686] IsLockScreenNotificationsEnabled/MessageCenterViewTest.SizeAfterRemove/0 (0 ms) [3102:3112:0803/145824.224696:229743618:ERROR:kill_posix.cc(83)] Unable to terminate process group 8908: No such process (3) Failed to get out-of-band test success data, dumping full stdio below: [8908:8908:0803/145824.147566:229666488:FATAL:thread_task_runner_handle.cc(29)] Check failed: current. Error: This caller requires a single-threaded context (i.e. the current task needs to run from a SingleThreadTaskRunner). #0 0x587bb6c9777c base::debug::StackTrace::StackTrace() #1 0x587bb6c35a30 logging::LogMessage::~LogMessage() #2 0x587bb6c76bbe base::ThreadTaskRunnerHandle::Get() #3 0x587bb68397a4 ui::(anonymous namespace)::OzonePlatformGbm::InitializeGPU() #4 0x587bb67ef30a ui::OzonePlatform::InitializeForGPU() #5 0x587bb71e44b3 gl::(anonymous namespace)::InitializeOneOffHelper() #6 0x587bb7c96fd7 ash::AshTestSuite::Initialize() #7 0x587bb6cde4d3 base::TestSuite::Run() #8 0x587bb6ce01df base::(anonymous namespace)::LaunchUnitTestsInternal() #9 0x587bb6ce002e base::LaunchUnitTests() #10 0x587bb61dfdee main #11 0x7a7591f29736 __libc_start_main #12 0x587bb5cf5b19 _start
,
Aug 3
Ah, that looks like bug 859246. Try adding the gn arg "ozone_platform_headless = true" and rerunning the test w/ "--ozone-platform=headless"
,
Sep 28
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd945756bd1a77e4a80afaa00342232765bdafb0 commit bd945756bd1a77e4a80afaa00342232765bdafb0 Author: Scott Violet <sky@chromium.org> Date: Fri Sep 28 23:42:03 2018 ash: make AshTestHelper register FakeStatisticsProvider This is necessary when running ash_unittests in chromeos vm as we hit some DCHECKs otherwise (the real StatisticsProvider DCHECKs that it was initialized). BUG=866114 TEST=test only change Change-Id: I0ad82f28f266460a6c9dccc23e86566750aed8f4 Reviewed-on: https://chromium-review.googlesource.com/1252853 Reviewed-by: James Cook <jamescook@chromium.org> Commit-Queue: Scott Violet <sky@chromium.org> Cr-Commit-Position: refs/heads/master@{#595252} [modify] https://crrev.com/bd945756bd1a77e4a80afaa00342232765bdafb0/ash/test/ash_test_helper.cc [modify] https://crrev.com/bd945756bd1a77e4a80afaa00342232765bdafb0/ash/test/ash_test_helper.h
,
Oct 1
I believe I've fixed the StatisticsProvider issue this was originally against. Hopefully this is fixed now.
,
Oct 2
The statistics-provider crash is fixed and most tests now pass, but it looks like there's a small subset that segfault in display::GetDisplayPower(): https://ci.chromium.org/p/chromium/builders/luci.chromium.try/chromeos-amd64-generic-rel/99802 example stack trace: https://logs.chromium.org/logs/chromium/buildbucket/cr-buildbucket.appspot.com/8933830194062306544/+/steps/ash_unittests__with_patch_/0/logs/PowerEventObserverTest.EndWallpaperAnimationOnSuspendWhileLocked/0 Maybe some assumption about there being a physical display? Feel free to wontfix if the added benefit of running this suite on cros isn't worth fixing the crashes.
,
Dec 10
Not planning to work on this. |
||||||
►
Sign in to add a comment |
||||||
Comment 1 by sky@chromium.org
, Jul 21