New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 752571 link

Starred by 1 user

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Mac
Pri: 3
Type: Bug



Sign in to add a comment

Mac browser_tests always print "AlertNotificationService: XPC connection invalidated."

Project Member Reported by rsesek@chromium.org, Aug 4 2017

Issue description

Chrome Version: bbdda25082ad81b0ed6d70a8c2cd15033df8979c
OS: macOS 10.12.6

What steps will reproduce the problem?
(1) Run browser_tests
(2) See "[37088:4099:0804/125036.571395:WARNING:notification_platform_bridge_mac.mm(577)] AlertNotificationService: XPC connection invalidated." printed for almost every test

What is the expected result?
No log message.

What happens instead?
Log message.

Please use labels and text to provide additional information.
I tried deferring the creation of the NSXPCConnection from -[AlertDispatcherImpl init] to lazily creating it in -[AlertDispatcherImpl serviceProxy]. But it did not solve the problem, because -[AlertDispatcherImpl getDisplayedAlertsForProfileId:incognito:notificationCenter:callback:] is called early in startup:

0   libbase.dylib                       0x000000011d27257e base::debug::StackTrace::StackTrace() + 174
1   libbase.dylib                       0x000000011d27263d base::debug::StackTrace::StackTrace() + 29
2   libbase.dylib                       0x000000011d2708ec base::debug::StackTrace::StackTrace() + 28
3   browser_tests                       0x0000000105da4556 -[AlertDispatcherImpl serviceProxy] + 86
4   browser_tests                       0x0000000105da3498 -[AlertDispatcherImpl getDisplayedAlertsForProfileId:incognito:notificationCenter:callback:] + 184
5   browser_tests                       0x0000000105da1d22 NotificationPlatformBridgeMac::GetDisplayed() const + 178
6   browser_tests                       0x0000000105d85fc4 NativeNotificationDisplayService::GetDisplayed() + 196
7   browser_tests                       0x0000000105db4102 PlatformNotificationServiceImpl::GetDisplayedNotifications() + 1426
8   libcontent.dylib                    0x000000012a4216b0 content::PlatformNotificationContextImpl::Initialize() + 1024
9   libcontent.dylib                    0x000000012ab8ce9d content::StoragePartitionImpl::Create() + 3181
10  libcontent.dylib                    0x000000012aba43b2 content::StoragePartitionImplMap::Get() + 1186
11  libcontent.dylib                    0x0000000129851e4f content::() + 95
12  libcontent.dylib                    0x0000000129851d9d content::BrowserContext::GetStoragePartition() + 589
13  libcontent.dylib                    0x0000000129852139 content::BrowserContext::GetDefaultStoragePartition() + 25
14  browser_tests                       0x000000010604a950 ProfileImpl::DoFinalInit() + 4624
15  browser_tests                       0x000000010604e86e ProfileImpl::OnLocaleReady() + 2126
16  browser_tests                       0x0000000106049697 ProfileImpl::OnPrefsLoaded() + 455
17  browser_tests                       0x0000000106048cf8 ProfileImpl::ProfileImpl() + 9128
18  browser_tests                       0x0000000106044f0b ProfileImpl::ProfileImpl() + 43
19  browser_tests                       0x0000000106044625 Profile::CreateProfile() + 933
20  browser_tests                       0x00000001060d7d75 ProfileManager::CreateProfileHelper() + 261
21  browser_tests                       0x00000001060c819b ProfileManager::CreateAndInitializeProfile() + 491
22  browser_tests                       0x00000001060c7c55 ProfileManager::GetProfile() + 309
23  browser_tests                       0x000000010b4d0ce6 GetStartupProfile() + 86
24  browser_tests                       0x00000001059aeb47 (anonymous namespace)::CreatePrimaryProfile() + 791
25  browser_tests                       0x00000001059aca0b ChromeBrowserMainParts::PreMainMessageLoopRunImpl() + 2891
26  browser_tests                       0x00000001059abe0d ChromeBrowserMainParts::PreMainMessageLoopRun() + 253
27  libcontent.dylib                    0x000000012986e8e0 content::BrowserMainLoop::PreMainMessageLoopRun() + 336
28  libcontent.dylib                    0x0000000129875a8d int base::internal::FunctorTraits<int () + 125
29  libcontent.dylib                    0x00000001298759d4 int base::internal::InvokeHelper<false, int>::MakeItSo<int () + 68
30  libcontent.dylib                    0x0000000129875963 int base::internal::Invoker<base::internal::BindState<int () + 99
31  libcontent.dylib                    0x000000012987586c base::internal::Invoker<base::internal::BindState<int () + 44
32  libcontent.dylib                    0x000000012ab34d5d base::Callback<>::Run() const + 61
33  libcontent.dylib                    0x000000012ab8a360 content::StartupTaskRunner::RunAllTasksNow() + 528
34  libcontent.dylib                    0x000000012986a8b6 content::BrowserMainLoop::CreateStartupTasks() + 1910
35  libcontent.dylib                    0x000000012987950f content::BrowserMainRunnerImpl::Initialize() + 2047
36  libcontent.dylib                    0x000000012986260d content::BrowserMain() + 285
37  libcontent.dylib                    0x000000012bef2c79 content::RunNamedProcessTypeMain() + 585
38  libcontent.dylib                    0x000000012bef44e0 content::ContentMainRunnerImpl::Run() + 1280
39  libcontent.dylib                    0x000000012bef127d content::ContentServiceManagerMainDelegate::RunEmbedderProcess() + 61
40  libembedder.dylib                   0x000000013637e607 service_manager::Main() + 1911
41  libcontent.dylib                    0x000000012bef29e9 content::ContentMain() + 89
42  browser_tests                       0x0000000107345edf content::BrowserTestBase::SetUp() + 4927
43  browser_tests                       0x0000000105775ce7 InProcessBrowserTest::SetUp() + 1879
44  browser_tests                       0x00000001023a5a2d PushMessagingBrowserTest::SetUp() + 1453
45  browser_tests                       0x00000001038d126e void testing::internal::HandleSehExceptionsInMethodIfSupported<testing::Test, void>() + 126
46  browser_tests                       0x00000001038acbd2 void testing::internal::HandleExceptionsInMethodIfSupported<testing::Test, void>() + 114
47  browser_tests                       0x00000001038acab4 testing::Test::Run() + 116
48  browser_tests                       0x00000001038adbfd testing::TestInfo::Run() + 221
49  browser_tests                       0x00000001038aef5c testing::TestCase::Run() + 236
50  browser_tests                       0x00000001038bc42a testing::internal::UnitTestImpl::RunAllTests() + 922
51  browser_tests                       0x00000001038d45ee bool testing::internal::HandleSehExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>() + 126
52  browser_tests                       0x00000001038bc012 bool testing::internal::HandleExceptionsInMethodIfSupported<testing::internal::UnitTestImpl, bool>() + 114
53  browser_tests                       0x00000001038bbef2 testing::UnitTest::Run() + 370
54  browser_tests                       0x00000001057d1311 RUN_ALL_TESTS() + 17
55  browser_tests                       0x00000001057d06a1 base::TestSuite::Run() + 337
56  browser_tests                       0x000000010570e8f2 ChromeTestSuiteRunner::RunTestSuite() + 82
57  browser_tests                       0x000000010570ea69 ChromeTestLauncherDelegate::RunTestSuite() + 57
58  browser_tests                       0x000000010743a57e content::LaunchTests() + 734
59  browser_tests                       0x000000010570f960 LaunchChromeTests() + 48
60  browser_tests                       0x000000010570e7b9 main + 153
61  libdyld.dylib                       0x00007fffe9373235 start + 1



For graphics-related bugs, please copy/paste the contents of the about:gpu
page at the end of this report.

 
Forgot to note: this is because browser_tests is not a bundled binary, like Chromium.app is. And so when XPC tries to find the current executable XCPServices/ directory, it fails and marks the connection as invalidated.

Comment 2 by peter@chromium.org, Aug 8 2017

Cc: joh...@chromium.org
We shouldn't be starting the XPC service on profile start really. We do this because PlatformNotificationContextImpl::Initialize() calls GetDisplayedNotifications() to apply prune-on-start behaviour that used to be sensible for the message center.

I *think* we can remove that call now. I've uploaded a CL and am running try-bots to verify.

https://chromium-review.googlesource.com/606008
Project Member

Comment 3 by sheriffbot@chromium.org, Aug 8

Labels: Hotlist-Recharge-Cold
Status: Untriaged (was: Available)
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue.

Sorry for the inconvenience if the bug really should have been left as Available.

For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
Owner: peter@chromium.org
Status: Assigned (was: Untriaged)
Over to peter@, who had a CL per #2 :)
Labels: Hotlist-DesktopUIToolingRequired Hotlist-DesktopUIChecked
*** UI Mass Triage ***

Sign in to add a comment