New issue
Advanced search Search tips

Issue 792776 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Mar 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug
Proj-Servicification

Blocked on:
issue 789644

Blocking:
issue 632361



Sign in to add a comment

NoStatePrefetch has failing browser_tests when run with NetworkService

Project Member Reported by falken@chromium.org, Dec 7 2017

Issue description

There are some disabled tests in testing/buildbot/filters/mojo.fyi.network_browser_tests.filter, which is used when --enable-features=NetworkService is used.

Most recently https://chromium-review.googlesource.com/c/chromium/src/+/695221 landed tests that are failing:
NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookie/1
NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookie/0
NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookieCrossDomain/0
NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookieCrossDomain/1

Failing build: https://ci.chromium.org/buildbot/chromium.fyi/Mojo%20Linux/7974

Output:
[ RUN      ] NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookie/1
Xlib:  extension "RANDR" missing on display ":99".
[13800:14001:1206/045526.060849:ERROR:bus.cc(394)] Failed to connect to the bus: Could not parse server address: Unknown address type (examples of valid types are "tcp" and on UNIX "unix")
[13800:13993:1206/045526.069036:WARNING:child_process_launcher_helper_posix.cc(118)] Ignoring invalid file v8_context_snapshot.bin
[13800:13800:1206/045526.075941:WARNING:password_store_factory.cc(241)] Using basic (unencrypted) store for password storage. See https://chromium.googlesource.com/chromium/src/+/master/docs/linux_password_storage.md for more information about password storage options.
[13800:13993:1206/045526.119703:WARNING:child_process_launcher_helper_posix.cc(118)] Ignoring invalid file v8_context_snapshot.bin
[14015:14015:1206/045526.176583:WARNING:gpu_info.cc(103)] No active GPU found, returning primary GPU.
[14018:14018:1206/045526.241298:ERROR:nss_util.cc(650)] Error initializing NSS with a persistent database (sql:/home/chrome-bot/.pki/nssdb): NSS error code: -8126
[14018:14101:1206/045526.272613:WARNING:simple_synchronous_entry.cc(1170)] Could not open platform files for entry.
[14018:14101:1206/045526.274551:ERROR:simple_index_file.cc(308)] Failed to write the temporary index file
[13800:13993:1206/045526.330774:WARNING:child_process_launcher_helper_posix.cc(118)] Ignoring invalid file v8_context_snapshot.bin
[13800:14099:1206/045526.352158:WARNING:embedded_test_server.cc(228)] Request not handled. Returning 404: /favicon.ico
[14018:14075:1206/045546.467401:ERROR:simple_index_file.cc(308)] Failed to write the temporary index file
BrowserTestBase received signal: Terminated. Backtrace:
#0 0x0000051ad46c base::debug::StackTrace::StackTrace()
#1 0x00000580eae2 content::(anonymous namespace)::DumpStackTraceSignalHandler()
#2 0x7f3798442cb0 <unknown>
#3 0x7f37984fcc5d __poll
#4 0x7f379dbf5fe4 <unknown>
#5 0x7f379dbf60ec g_main_context_iteration
#6 0x0000051d7ca2 base::MessagePumpGlib::Run()
#7 0x0000051d2efc base::MessageLoop::Run()
#8 0x000005204e06 base::RunLoop::Run()
#9 0x000002476d30 prerender::NoStatePrefetchBrowserTest_PrefetchCookie_Test::RunTestOnMainThread()
#10 0x00000580e801 content::BrowserTestBase::ProxyRunTestOnMainThreadLoop()
#11 0x0000052ee0dd ChromeBrowserMainParts::PreMainMessageLoopRunImpl()
#12 0x0000052ecdbd ChromeBrowserMainParts::PreMainMessageLoopRun()
#13 0x000003b462c1 content::BrowserMainLoop::PreMainMessageLoopRun()
#14 0x000003fd6c25 content::StartupTaskRunner::RunAllTasksNow()
#15 0x000003b447ea content::BrowserMainLoop::CreateStartupTasks()
#16 0x000003b49998 content::BrowserMainRunnerImpl::Initialize()
#17 0x000003b42252 content::BrowserMain()
#18 0x00000518c29b content::RunNamedProcessTypeMain()
#19 0x00000518cd76 content::ContentMainRunnerImpl::Run()
#20 0x00000718b934 service_manager::Main()
#21 0x00000518b5e1 content::ContentMain()
#22 0x00000580e41e content::BrowserTestBase::SetUp()
#23 0x00000528756b InProcessBrowserTest::SetUp()
#24 0x00000316aa01 testing::Test::Run()
#25 0x00000316b530 testing::TestInfo::Run()
#26 0x00000316ba17 testing::TestCase::Run()
#27 0x000003172047 testing::internal::UnitTestImpl::RunAllTests()
#28 0x000003171cc7 testing::UnitTest::Run()
#29 0x00000529d7a2 base::TestSuite::Run()
#30 0x00000519fbf2 ChromeTestSuiteRunner::RunTestSuite()
#31 0x000005847a89 content::LaunchTests()
#32 0x00000519ffc1 LaunchChromeTests()
#33 0x00000519fb4e main
#34 0x7f379842df45 __libc_start_main
#35 0x000001fa102a _start
 
Project Member

Comment 1 by bugdroid1@chromium.org, Dec 7 2017

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

commit d0ff46718a77df43167bb4c6149ab3723d8f8923
Author: Matt Falkenhagen <falken@chromium.org>
Date: Thu Dec 07 02:35:50 2017

Network Service: Sheriffing: Disable new NoStatePrefetch tests.

These were added in r522067 and are failing.

Bug:  792776 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: I512e7a63765f9a8911d7271a9458aa699e902eaa
NOTRY: true
TBR: jam
Reviewed-on: https://chromium-review.googlesource.com/813315
Reviewed-by: Matt Falkenhagen <falken@chromium.org>
Commit-Queue: Matt Falkenhagen <falken@chromium.org>
Cr-Commit-Position: refs/heads/master@{#522311}
[modify] https://crrev.com/d0ff46718a77df43167bb4c6149ab3723d8f8923/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Blockedon: 789644
Cc: rdsmith@chromium.org
Randy---

I think this is a problem with how the CookieStore under the network service behaves in browser tests.

Cookies seem to be persisted via simple_index_file.cc, eg SimpleIndexFile::SyncWriteToDisk.

When run without the network service, in a browser test the SimpleIndexFile::SyncWriteToDisk runs under the same process as the IO thread of the browser test.

When run with the network service feature enabled, the SyncWriteToDisk takes place in a different process (perhaps the network service?). This process does not seem to have write access to the index file needed to store the cookie: while the directory appears to be writeable, the temp_index_filename creation failes with EPERM.

So I suspect this is related to  crbug.com/789644 , with the added detail that it depends on the process setup in browser tests, which may be different from normal execution.
Cc: tsepez@chromium.org
Matt: Why do you say they are being persisted via simple_index_file.cc?  My understanding of cookie persistence is that it goes through SQLite.  The routines you mention sound like they have more to do with the HttpCache.

Having said that, your explanation still makes sense to me, and sounds like a result of the sandboxing work Tom is doing.  I don't personally think it has much to do with configuring the cookie store--at the file system access level, there aren't going to be any changes to how that's done pre- and post- 789644.

Tom, any suggestions for a bug to mark this as blocked on?  Or is this something someone should be looking at now?

Oh, interesting. I don't know about any of the internals and assumed it was cookies being persisted; the only difference between these failing tests and other (passing under network service) tests in this suite is the cookies getting set. Everything should be hitting the cache in an identical way.

But, at any rate, sandboxing, yes. That's the stuff :)
Cc: -rdsmith@chromium.org

Comment 6 by jam@chromium.org, Mar 6 2018

Owner: jam@chromium.org
Status: Started (was: Untriaged)
Project Member

Comment 7 by bugdroid1@chromium.org, Mar 6 2018

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

commit 4181ad2a90c08107e7c4d8de650423369cec6b95
Author: John Abd-El-Malek <jam@chromium.org>
Date: Tue Mar 06 14:55:46 2018

Fix NoStatePrefetchBrowserTest/NoStatePrefetchBrowserTest.PrefetchCookie* tests with network service.

The tests were using the net::CookieStore class which can't be used when running with the network
service, since net/ runs in a different process. Instead use the CookieManager mojo interface which
works in both cases.

I also didn't do the polling since if the page navigated, we can be sure that the cookies committed
and the next access to them will find them.

Bug:  792776 
Cq-Include-Trybots: master.tryserver.chromium.linux:linux_mojo
Change-Id: Ifdd5be72cabd73923224b9e3c495ba7c43b52c05
Reviewed-on: https://chromium-review.googlesource.com/950481
Reviewed-by: Matthew Cary <mattcary@chromium.org>
Commit-Queue: John Abd-El-Malek <jam@chromium.org>
Cr-Commit-Position: refs/heads/master@{#541103}
[modify] https://crrev.com/4181ad2a90c08107e7c4d8de650423369cec6b95/chrome/browser/prerender/prerender_nostate_prefetch_browsertest.cc
[modify] https://crrev.com/4181ad2a90c08107e7c4d8de650423369cec6b95/testing/buildbot/filters/mojo.fyi.network_browser_tests.filter

Comment 8 by jam@chromium.org, Mar 6 2018

Status: Fixed (was: Started)

Sign in to add a comment