New issue
Advanced search Search tips

Issue 682567 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Feb 2017
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

PingLoaderTest leaks pending URLLoader requests

Project Member Reported by toyoshim@chromium.org, Jan 19 2017

Issue description

When I run webkit_unit_tests, the first run of FontResourceTest.ResourceFetcherRevalidateDeferedResourceFromTwoInitiators fails, but the second run passes.

Here is the crash log of the first run, and the check fails with non mocked URL: https://localhost/bar.html.
[27513:27513:0119/151729.038969:4994781403836:FATAL:weburl_loader_mock_factory_impl.cc(146)] Check failed: false.
#0 0x7f570aa3c8de base::debug::StackTrace::StackTrace()
#1 0x7f570aa60ddb logging::LogMessage::~LogMessage()
#2 0x0000013dd557 blink::WebURLLoaderMockFactoryImpl::LoadRequest()
#3 0x0000013dcd22 blink::WebURLLoaderMockFactoryImpl::serveAsynchronousRequests()
#4 0x000000e98fc5 blink::FontResourceTest_ResourceFetcherRevalidateDeferedResourceFromTwoInitiators_Test::TestBody()
#5 0x0000013c931e testing::Test::Run()
#6 0x0000013ca040 testing::TestInfo::Run()
#7 0x0000013ca4d7 testing::TestCase::Run()
#8 0x0000013d17c7 testing::internal::UnitTestImpl::RunAllTests()
#9 0x0000013d13da testing::UnitTest::Run()
#10 0x000001398671 base::TestSuite::Run()
#11 0x0000006d6995 (anonymous namespace)::runHelper()
#12 0x000001399b3d base::(anonymous namespace)::LaunchUnitTestsInternal()
#13 0x0000013999b4 base::LaunchUnitTests()
#14 0x0000006d6923 main
#15 0x7f570242bf45 __libc_start_main
#16 0x0000005f34c1 <unknown>

This is because PingLoaderTest leaks pending requests inside WebURLLoaderMock, and the next test's serveAsynchronousRequests() see the request as an unregistered URL.

We can confirm that we can not reproduce this issue on running only FontResourceTest, but happens on running after PingLoaderTest as
webkit_unit_tests --gtest_filter=PingLoaderTest.\*:FontResourceTest.\*

 
Status: Started (was: Assigned)
Project Member

Comment 2 by bugdroid1@chromium.org, Feb 7 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/2d15a4c1a0667a7e9f6d46946a39ba4a79be518f

commit 2d15a4c1a0667a7e9f6d46946a39ba4a79be518f
Author: japhet <japhet@chromium.org>
Date: Tue Feb 07 19:28:20 2017

Fix PingLoaderTest crashing the next test

Pings can't be cancelled or otherwise accessed once started, so ensure the
mocked network request is served before the test completes and the mocked
load is unregistered.

BUG= 682567 

Review-Url: https://codereview.chromium.org/2682533002
Cr-Commit-Position: refs/heads/master@{#448693}

[modify] https://crrev.com/2d15a4c1a0667a7e9f6d46946a39ba4a79be518f/third_party/WebKit/Source/core/loader/PingLoaderTest.cpp

Status: Fixed (was: Started)

Sign in to add a comment