DCHECK (/ANR?) in lock_impl_posix.cc likely due to site notification channel migration |
|||
Issue descriptionChrome Version: ToT and since at least 64.0.3267.2 OS: Android What steps will reproduce the problem? (1) Disable site notification channels: $ build/android/adb_chrome_public_command_line --disable-features=SiteNotificationChannels (2) Grant notification permission to a site, e.g. tests.peter.sh/notification-generator/ (3) Enable site notification channels: $ build/android/adb_chrome_public_command_line --enable-features=SiteNotificationChannels (4) Restart Chrome (eg by swiping away from recents and reopening) What is the expected result? Chrome opens normally What happens instead? On release, chrome hangs, just display a blank non-interactive screen. On debug, we hit a DCHECK: I 124.045s Main pid: 5921, tid: 5921, name: chromium.chrome >>> org.chromium.chrome <<< I 124.045s Main signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr -------- I 124.045s Main [FATAL:lock_impl_posix.cc(74)] Check failed: rv == 0 (35 vs. 0). Resource deadlock would occur I 124.046s Main r0 00000000 r1 00001721 r2 00000006 r3 00000008 I 124.046s Main r4 00001721 r5 00001721 r6 ff914ed8 r7 0000010c I 124.046s Main r8 ff915374 r9 0000005e sl ff914f24 fp 00000000 I 124.046s Main ip 00000000 sp ff914ec8 lr f40ea3b7 pc f411a91c I 124.046s Main I 124.046s Main Stack Trace: I 124.046s Main RELADDR FUNCTION FILE:LINE I 124.046s Main 0004a91c tgkill+12 /system/lib/libc.so I 124.046s Main 0001a3b3 abort+54 /system/lib/libc.so I 124.046s Main v------> base::debug::(anonymous namespace)::DebugBreak() /usr/local/google/home/awdf/repos/clankium/src/base/debug/debugger_posix.cc:228 I 124.046s Main 00096495 base::debug::BreakDebugger()+21 /usr/local/google/home/awdf/repos/clankium/src/base/debug/debugger_posix.cc:258 I 124.046s Main 000a7a99 logging::LogMessage::~LogMessage()+601 /usr/local/google/home/awdf/repos/clankium/src/base/logging.cc:846 I 124.046s Main 000d3993 base::internal::LockImpl::Lock()+103 /usr/local/google/home/awdf/repos/clankium/src/base/synchronization/lock_impl_posix.cc:74 I 124.046s Main 001d1045 base::Lock::Acquire()+7 /usr/local/google/home/awdf/repos/clankium/src/base/synchronization/lock.h:45 I 124.046s Main 0075ebbb content_settings::ContentSettingsPref::SetWebsiteSetting(ContentSettingsPattern const&, ContentSettingsPattern const&, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&, base::Time, base::Value*)+299 /usr/local/google/home/awdf/repos/clankium/src/components/content_settings/core/browser/content_settings_pref.cc:135 I 124.046s Main 0075fbf7 content_settings::PrefProvider::GetWebsiteSettingLastModified(ContentSettingsPattern const&, ContentSettingsPattern const&, ContentSettingsType, std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const&)+23 /usr/local/google/home/awdf/repos/clankium/src/components/content_settings/core/browser/content_settings_pref_provider.cc:176 I 124.047s Main 0042d775 NotificationChannelsProviderAndroid::MigrateToChannelsIfNecessary(PrefService*, content_settings::ProviderInterface*)+153 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/notifications/notification_channels_provider_android.cc:193 I 124.047s Main 003c9dc1 HostContentSettingsMapFactory::BuildServiceInstanceFor(content::BrowserContext*) const+305 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/content_settings/host_content_settings_map_factory.cc:111 I 124.047s Main 00006c5b RefcountedBrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const+7 /usr/local/google/home/awdf/repos/clankium/src/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc:91 I 124.047s Main 00007b07 RefcountedKeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool)+139 /data/data/org.chromium.chrome/incremental-install-files/lib/libkeyed_service_core.cr.so I 124.047s Main 00006bfb RefcountedBrowserContextKeyedServiceFactory::GetServiceForBrowserContext(content::BrowserContext*, bool)+3 /usr/local/google/home/awdf/repos/clankium/src/components/keyed_service/content/refcounted_browser_context_keyed_service_factory.cc:52 I 124.047s Main 003c9be9 HostContentSettingsMapFactory::GetForProfile(Profile*)+61 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/content_settings/host_content_settings_map_factory.cc:58 I 124.047s Main 00511b4b SearchPermissionsService::SearchPermissionsService(Profile*)+87 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/android/search_permissions/search_permissions_service.cc:145 I 124.047s Main 00511af7 SearchPermissionsService::SearchPermissionsService(Profile*)+3 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/android/search_permissions/search_permissions_service.cc:143 I 124.047s Main 00006935 BrowserContextKeyedServiceFactory::BuildServiceInstanceFor(base::SupportsUserData*) const+13 /usr/local/google/home/awdf/repos/clankium/src/components/keyed_service/content/browser_context_keyed_service_factory.cc:98 I 124.047s Main 00006f89 KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool)+173 /usr/local/google/home/awdf/repos/clankium/src/components/keyed_service/core/keyed_service_factory.cc:89 I 124.047s Main 000066b5 DependencyManager::CreateContextServices(base::SupportsUserData*, bool)+133 /data/data/org.chromium.chrome/incremental-install-files/lib/libkeyed_service_core.cr.so I 124.047s Main 00005503 BrowserContextDependencyManager::DoCreateBrowserContextServices(content::BrowserContext*, bool)+47 /usr/local/google/home/awdf/repos/clankium/src/components/keyed_service/content/browser_context_dependency_manager.cc:47 I 124.047s Main v------> ~ScopedHistogramTimer3 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_impl.cc:895 I 124.047s Main 0048a235 ProfileImpl::OnLocaleReady()+357 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_impl.cc:898 I 124.047s Main 00489281 ProfileImpl::OnPrefsLoaded(Profile::CreateMode, bool)+117 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_impl.cc:905 I 124.048s Main 00489179 ProfileImpl::ProfileImpl(base::FilePath const&, Profile::Delegate*, Profile::CreateMode, scoped_refptr<base::SequencedTaskRunner>)+1089 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_impl.cc:416 I 124.048s Main v------> std::__ndk1::__atomic_base<int, false>::store(int, std::__ndk1::memory_order) volatile /usr/local/google/home/awdf/repos/clankium/src/third_party/android_tools/ndk/sources/cxx-stl/llvm-libc++/libcxx/include/atomic:831 I 124.048s Main v------> base::subtle::NoBarrier_Store(int volatile*, int) /usr/local/google/home/awdf/repos/clankium/src/base/atomicops_internals_portable.h:117 I 124.048s Main 004887ab Profile::CreateProfile(base::FilePath const&, Profile::Delegate*, Profile::CreateMode)+235 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_impl.cc:292 I 124.048s Main v------> ~ScopedHistogramTimer0 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_manager.cc:1303 I 124.048s Main 004940af ProfileManager::CreateProfileHelper(base::FilePath const&)+91 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_manager.cc:1306 I 124.048s Main 004919f9 ProfileManager::CreateAndInitializeProfile(base::FilePath const&)+125 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_manager.cc:1385 I 124.048s Main 004918a1 ProfileManager::GetProfile(base::FilePath const&)+93 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_manager.cc:496 I 124.048s Main v------> ScopedTracer /usr/local/google/home/awdf/repos/clankium/src/base/trace_event/trace_event.h:1091 I 124.048s Main 00491857 ProfileManager::GetProfile(base::FilePath const&)+19 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/profiles/profile_manager.cc:496 I 124.048s Main v------> (anonymous namespace)::CreatePrimaryProfile(content::MainFunctionParams const&, base::FilePath const&, base::CommandLine const&) /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/chrome_browser_main.cc:438 I 124.048s Main 003b9943 ChromeBrowserMainParts::PreMainMessageLoopRunImpl()+623 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/chrome_browser_main.cc:1568 I 124.048s Main 003b9659 ChromeBrowserMainParts::PreMainMessageLoopRun()+29 /usr/local/google/home/awdf/repos/clankium/src/chrome/browser/chrome_browser_main.cc:1195 I 124.048s Main 00828fbd content::BrowserMainLoop::PreMainMessageLoopRun()+45 /usr/local/google/home/awdf/repos/clankium/src/content/browser/browser_main_loop.cc:1189 I 124.048s Main 0082a6ef int base::internal::Invoker<base::internal::BindState<int (content::BrowserMainLoop::*)(), base::internal::UnretainedWrapper<content::BrowserMainLoop> >, int ()>::RunImpl<int (content::BrowserMainLoop::* const&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > const&, 0u>(int (content::BrowserMainLoop::* const&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::BrowserMainLoop> > const&, std::__ndk1::integer_sequence<unsigned int, 0u>)+9 /usr/local/google/home/awdf/repos/clankium/src/base/bind_internal.h:351 I 124.048s Main 00a7bd7f content::StartupTaskRunner::WrappedTask()+19 /usr/local/google/home/awdf/repos/clankium/src/content/browser/startup_task_runner.cc:63 I 124.049s Main 00a7bebf void base::internal::Invoker<base::internal::BindState<void (content::StartupTaskRunner::*)(), base::internal::UnretainedWrapper<content::StartupTaskRunner> >, void ()>::RunImpl<void (content::StartupTaskRunner::* const&)(), std::__ndk1::tuple<base::internal::UnretainedWrapper<content::StartupTaskRunner> > const&, 0u>(void (content::StartupTaskRunner::* const&)(), > std::__ndk1::tuple<base::internal::UnretainedWrapper<content::StartupTaskRunner> > > const&, std::__ndk1::integer_sequence<unsigned int, 0u>)+9 > > /usr/local/google/home/awdf/repos/clankium/src/base/bind_internal.h:351 > > I 124.049s Main 0008d7a9 base::OnceCallback<void ()>::Run() &&+21 Suspecting https://chromium-review.googlesource.com/c/chromium/src/+/760936 as reverting this locally fixed the issue. Will revert while investigating exactly why. Note this is okay to revert since https://chromium-review.googlesource.com/758687 is sufficient to fix the bug it prevents.
,
Nov 14 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2aac74d3581683516ed149948903875b741c125a commit 2aac74d3581683516ed149948903875b741c125a Author: Anita Woodruff <awdf@chromium.org> Date: Tue Nov 14 14:44:33 2017 Revert "[Android O] Clean up notification settings on channel migration" This reverts commit 7860090b10225bc21f1141bf84795ef96cd07c01. Reason for revert: Likely cause of ANR / DCHECK Original change's description: > [Android O] Clean up notification settings on channel migration > > - Previously when migrating to channels, the content settings were > simply copied over to the NotificationChannelsProviderAndroid from > the PrefProvider. > > - Now they are deleted from the PrefProvider as they are copied over > to the NCPA. > > - This avoids old content settings hanging around and getting > reinstated on channel deletion. > > Bug: 781524 > Change-Id: Ic00ddd4996e8a17775678193b6ffdb0b4d62d5fa > Reviewed-on: https://chromium-review.googlesource.com/760936 > Reviewed-by: Raymes Khoury <raymes@chromium.org> > Reviewed-by: Peter Beverloo <peter@chromium.org> > Commit-Queue: Anita Woodruff <awdf@chromium.org> > Cr-Commit-Position: refs/heads/master@{#515538} TBR=raymes@chromium.org,peter@chromium.org,awdf@chromium.org # Not skipping CQ checks because original CL landed > 1 day ago. Bug: 781524 , 784823 Change-Id: I53d19029118bbd0c907ad1317f744e3e6e0a80c3 Reviewed-on: https://chromium-review.googlesource.com/768787 Reviewed-by: Anita Woodruff <awdf@chromium.org> Commit-Queue: Anita Woodruff <awdf@chromium.org> Cr-Commit-Position: refs/heads/master@{#516297} [modify] https://crrev.com/2aac74d3581683516ed149948903875b741c125a/chrome/browser/notifications/notification_channels_provider_android.cc [modify] https://crrev.com/2aac74d3581683516ed149948903875b741c125a/chrome/browser/notifications/notification_channels_provider_android_unittest.cc [modify] https://crrev.com/2aac74d3581683516ed149948903875b741c125a/components/content_settings/core/test/content_settings_mock_provider.cc
,
Nov 14 2017
,
Nov 16 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/138706e38fcd103ba462dbbc13785235a591c4f3 commit 138706e38fcd103ba462dbbc13785235a591c4f3 Author: Anita Woodruff <awdf@chromium.org> Date: Thu Nov 16 13:25:52 2017 [Android O] Clean up notification settings on channel migration - Previously when migrating to channels, the content settings were simply copied over to the NotificationChannelsProviderAndroid from the PrefProvider. - Now they are deleted from the PrefProvider after they are copied over to the NCPA. - This avoids old content settings hanging around and getting reinstated on channel deletion. Bug: 781524 , 784823 Change-Id: I01ec7974831f6a2be192c7e6e2a587148e736b9e Reviewed-on: https://chromium-review.googlesource.com/768722 Reviewed-by: Raymes Khoury <raymes@chromium.org> Reviewed-by: Peter Beverloo <peter@chromium.org> Commit-Queue: Anita Woodruff <awdf@chromium.org> Cr-Commit-Position: refs/heads/master@{#517071} [modify] https://crrev.com/138706e38fcd103ba462dbbc13785235a591c4f3/chrome/browser/notifications/notification_channels_provider_android.cc [modify] https://crrev.com/138706e38fcd103ba462dbbc13785235a591c4f3/chrome/browser/notifications/notification_channels_provider_android_unittest.cc [modify] https://crrev.com/138706e38fcd103ba462dbbc13785235a591c4f3/components/content_settings/core/test/content_settings_mock_provider.cc
,
Nov 17 2017
|
|||
►
Sign in to add a comment |
|||
Comment 1 by awdf@chromium.org
, Nov 14 2017