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

Issue 744710 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Bug



Sign in to add a comment

BottomSheetNewTabControllerTest#testNTPOverTabSwitcher_Incognito_FromTab has high flakiness

Project Member Reported by yolandyan@chromium.org, Jul 17 2017

Issue description

https://test-results.appspot.com/dashboards/flakiness_dashboard.html#testType=browser_side_navigation_chrome_public_test_apk&tests=org.chromium.chrome.browser.widget.bottomsheet.BottomSheetNewTabControllerTest%23testNTPOverTabSwitcher_Incognito_FromTab
The test would crash the apk when calling MenuUtils.invokeCustomMenuActionSync

These are a couple of logcat for the crash:
https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F3765afb570b2c311%2F%2B%2Flogcat_org.chromium.chrome.browser.widget.bottomsheet.BottomSheetNewTabControllerTest.testNTPOverTabSwitcher_Incognito_FromTab_20170716T194257-UTC_00ba71c98068a52b
https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F376664da2cd31b11%2F%2B%2Flogcat_org.chromium.chrome.browser.widget.bottomsheet.BottomSheetNewTabControllerTest.testNTPOverTabSwitcher_Incognito_FromTab_20170716T230135-UTC_00b9d2938058952a
https://luci-logdog.appspot.com/v/?s=chromium%2Fandroid%2Fswarming%2Flogcats%2F376a1bcffbc6b911%2F%2B%2Flogcat_org.chromium.chrome.browser.widget.bottomsheet.BottomSheetNewTabControllerTest.testNTPOverTabSwitcher_Incognito_FromTab_20170717T161951-UTC_00d5b49b15b09fc6

They all basically look like:
07-17 16:19:54.260   495   495 F DEBUG   : pid: 10158, tid: 10158, name: chromium.chrome  >>> org.chromium.chrome <<<
07-17 16:19:54.260   495   495 F DEBUG   : signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
07-17 16:19:54.282   495   495 F DEBUG   : Abort message: '[FATAL:dependency_manager.cc(108)] Check failed: false. Attempted to access a context that was ShutDown(). This is most likely a heap smasher in progress. After KeyedService::Shutdown() completes, your service MUST NOT refer to depended services again.
07-17 16:19:54.282   495   495 F DEBUG   : #00 0x0000007f62819ff7 /data/app/org.chromium.chrome-1/base.apk+0x000000000147dff7
07-17 16:19:54.282   495   495 F DEBUG   : #01 0x0000007f639ab493 /data/app/org.chromium.chrome-1/base.apk+0x000000000260f493
07-17 16:19:54.282   495   495 F DEBUG   : #02 0x0000007f640260cb /data/app/org.chromium.chrome-1/base.apk+0x0000000002
07-17 16:19:54.283   495   495 F DEBUG   :     x0   0000000000000000  x1   00000000000027ae  x2   0000000000000006  x3   0000000000000000
07-17 16:19:54.283   495   495 F DEBUG   :     x4   0000000000000000  x5   0000000000000001  x6   0000000000000000  x7   0000000000000000
07-17 16:19:54.283   495   495 F DEBUG   :     x8   0000000000000083  x9   0000000000000000  x10  0000000000000337  x11  0000000000000009
07-17 16:19:54.283   495   495 F DEBUG   :     x12  0000000000000009  x13  0000007f9752b000  x14  0000000000000000  x15  0000007f9751d000
07-17 16:19:54.284   495   495 F DEBUG   :     x16  0000007f9751d568  x17  0000007f974b013c  x18  0000007f9752ef50  x19  0000007f979230a8
07-17 16:19:54.284   495   495 F DEBUG   :     x20  0000007f97922fe8  x21  000000000000000b  x22  0000000000000006  x23  0000007f69317c98
07-17 16:19:54.284   495   495 F DEBUG   :     x24  0000007f69317c30  x25  0000007f97923098  x26  0000007f69301000  x27  0000000012cee190
07-17 16:19:54.284   495   495 F DEBUG   :     x28  00000000723fe7ce  x29  0000007fc5214340  x30  0000007f974ad8d8
07-17 16:19:54.284   495   495 F DEBUG   :     sp   0000007fc5214340  pc   0000007f974b0144  pstate 0000000020000000
07-17 16:19:54.410   495   495 F DEBUG   : 
07-17 16:19:54.410   495   495 F DEBUG   : backtrace:
07-17 16:19:54.410   495   495 F DEBUG   :     #00 pc 000000000006a144  /system/lib64/libc.so (tgkill+8)
07-17 16:19:54.411   495   495 F DEBUG   :     #01 pc 00000000000678d4  /system/lib64/libc.so (pthread_kill+68)
07-17 16:19:54.411   495   495 F DEBUG   :     #02 pc 0000000000023838  /system/lib64/libc.so (raise+28)
07-17 16:19:54.411   495   495 F DEBUG   :     #03 pc 000000000001dfd8  /system/lib64/libc.so (abort+60)
07-17 16:19:54.411   495   495 F DEBUG   :     #04 pc 00000000001bcd48  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.411   495   495 F DEBUG   :     #05 pc 00000000001da2e0  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #06 pc 000000000136b490  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #07 pc 00000000019e60c8  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #08 pc 000000000136bdc0  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #09 pc 000000000294526c  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #10 pc 000000000151e734  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #11 pc 0000000002944d74  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #12 pc 0000000002945614  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.412   495   495 F DEBUG   :     #13 pc 000000000294ffd8  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.413   495   495 F DEBUG   :     #14 pc 00000000038013ec  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.413   495   495 F DEBUG   :     #15 pc 0000000003800a14  /data/app/org.chromium.chrome-1/base.apk (offset 0x12a4000)
07-17 16:19:54.413   495   495 F DEBUG   :     #16 pc 000000000183730c  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (long org.chromium.chrome.browser.tabmodel.TabModelJniBridge.nativeInit(boolean, boolean)+144)
07-17 16:19:54.413   495   495 F DEBUG   :     #17 pc 00000000018380ec  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.tabmodel.TabModelJniBridge.initializeNative()+288)
07-17 16:19:54.413   495   495 F DEBUG   :     #18 pc 00000000018384e0  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.tabmodel.TabModelImpl.<init>(boolean, boolean, org.chromium.chrome.browser.tabmodel.TabCreatorManager$TabCreator, org.chromium.chrome.browser.tabmodel.TabCreatorManager$TabCreator, org.chromium.chrome.browser.tabmodel.TabModelSelectorUma, org.chromium.chrome.browser.tabmodel.TabModelOrderController, org.chromium.chrome.browser.compositor.layouts.content.TabContentManager, or
07-17 16:19:54.413   495   495 F DEBUG   :     #19 pc 0000000002628a34  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (org.chromium.chrome.browser.tabmodel.TabModel org.chromium.chrome.browser.tabmodel.IncognitoTabModelImplCreator.createTabModel()+280)
07-17 16:19:54.413   495   495 F DEBUG   :     #20 pc 0000000001835290  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.tabmodel.IncognitoTabModel.ensureTabModelImpl()+308)
07-17 16:19:54.413   495   495 F DEBUG   :     #21 pc 0000000001835f74  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.tabmodel.IncognitoTabModel.setIsPendingTabAdd(boolean)+104)
07-17 16:19:54.414   495   495 F DEBUG   :     #22 pc 00000000018cc2ac  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.widget.bottomsheet.BottomSheetNewTabController.displayNewTabUi(boolean)+704)
07-17 16:19:54.414   495   495 F DEBUG   :     #23 pc 00000000018c197c  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.widget.bottomsheet.BottomSheet.displayNewTabUi(boolean)+80)
07-17 16:19:54.414   495   495 F DEBUG   :     #24 pc 000000000219fab0  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (boolean org.chromium.chrome.browser.ChromeTabbedActivity$TabbedModeTabCreator.openNtpBottomSheet(java.lang.String)+804)
07-17 16:19:54.414   495   495 F DEBUG   :     #25 pc 000000000219fdc4  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (org.chromium.chrome.browser.tab.Tab org.chromium.chrome.browser.ChromeTabbedActivity$TabbedModeTabCreator.launchUrl(java.lang.String, org.chromium.chrome.browser.tabmodel.TabModel$TabLaunchType, android.content.Intent, long)+88)
07-17 16:19:54.414   495   495 F DEBUG   :     #26 pc 000000000219ead4  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (org.chromium.chrome.browser.tab.Tab org.chromium.chrome.browser.tabmodel.ChromeTabCreator.launchUrl(java.lang.String, org.chromium.chrome.browser.tabmodel.TabModel$TabLaunchType)+120)
07-17 16:19:54.414   495   495 F DEBUG   :     #27 pc 0000000001836328  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (void org.chromium.chrome.browser.tabmodel.TabCreatorManager$TabCreator.launchNTP()+236)
07-17 16:19:54.415   495   495 F DEBUG   :     #28 pc 0000000001521ee0  /data/app/org.chromium.chrome-1/oat/arm64/base.odex (offset 0x1008000) (boolean org.chromium.chrome.browser.ChromeTabbedActivity.onMenuOrKeyboardAction(int, boolean)+1604)
07-17 16:19:54.415   495   495 F DEBUG   :     #29 pc 0000000000fce498  /data/app/org.chromium.chrome.tests-1/oat/arm64/base.odex (offset 0x930000) (void org.chromium.chrome.test.util.MenuUtils$1.run()+92)
07-17 16:19:54.415   495   495 F DEBUG   :     #30 pc 0000000073fcaba0  /data/dalvik-cache/arm64/system@framework@boot.oat (offset 0x1ed8000)
07-17 16:19:55.048   495   495 F DEBUG   : 
07-17 16:19:55.048   495   495 F DEBUG   : Tombstone written to: /data/tombstones/tombstone_02
07-17 16:19:55.048   495   495 E DEBUG   : AM write failed: Broken pipe

 
Project Member

Comment 1 by bugdroid1@chromium.org, Jul 17 2017

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

commit 9c1d421fedf435b7525c1c413c8a5e320a5dade5
Author: yolandyan <yolandyan@chromium.org>
Date: Mon Jul 17 19:33:24 2017

Disable BottomSheetNewTabControllerTest#testNTPOverTabSwitcher_Incognito_FromTab

TBR=twellington

Bug:  744710 
Change-Id: Ib01c1b081b5c34641aeae8dae8c4234d38472837
Reviewed-on: https://chromium-review.googlesource.com/574760
Reviewed-by: Yoland Yan <yolandyan@chromium.org>
Commit-Queue: Yoland Yan <yolandyan@chromium.org>
Cr-Commit-Position: refs/heads/master@{#487193}
[modify] https://crrev.com/9c1d421fedf435b7525c1c413c8a5e320a5dade5/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java

Components: Tests UI>Browser>Mobile>NavPanel
Labels: -Pri-2 Pri-1
Owner: twelling...@chromium.org
Status: Assigned (was: Untriaged)
Native stack:
signal 6 (SIGABRT), code -6 in tid 18268 (chromium.chrome)
pid: 18268, tid: 18268, name: chromium.chrome  >>> org.chromium.chrome <<<
signal 6 (SIGABRT), code -6 (SI_TKILL), fault addr --------
[FATAL:dependency_manager.cc(108)] Check failed: false. Attempted to access a context that was ShutDown(). This is most likely a heap smasher in progress. After KeyedService::Shutdown() completes, your service MUST NOT refer to depended services again.

Stack Trace:
  RELADDR   FUNCTION                                                                       FILE:LINE
  000a8b89  logging::LogMessage::~LogMessage()                                             /work/clankium/src/base/logging.cc:553
  00006201  DependencyManager::AssertContextWasntDestroyed(base::SupportsUserData*) const  /work/clankium/src/components/keyed_service/core/dependency_manager.cc:108

-----------------------------------------------------

     r0 00000000  r1 0000475c  r2 00000006  r3 00000008
     r4 efd6158c  r5 00000006  r6 efd61534  r7 0000010c
     r8 ffa2a0ac  r9 ffa29c5c  sl ffa2a0a8  fp 000000fc
     ip 0000000b  sp ffa29bd8  lr ee4255e7  pc ee427e44

Stack Trace:
  RELADDR   FUNCTION                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  FILE:LINE
  00049e44  tgkill+12                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                 /system/lib/libc.so
  000475e3  pthread_kill+34                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           /system/lib/libc.so
  0001d8a5  raise+10                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                  /system/lib/libc.so
  000193f1  __libc_android_abort+34                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   /system/lib/libc.so
  00017034  abort+4                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   /system/lib/libc.so
  v------>  base::debug::(anonymous namespace)::DebugBreak()                                                                                                                                                                                                                                                                                                                                                                                                                                                                          /work/clankium/src/base/debug/debugger_posix.cc:228
  00095e17  base::debug::BreakDebugger()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                              /work/clankium/src/base/debug/debugger_posix.cc:258
  000a8dc3  logging::LogMessage::~LogMessage()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                        /work/clankium/src/base/logging.cc:784
  000061ff  DependencyManager::AssertContextWasntDestroyed(base::SupportsUserData*) const                                                                                                                                                                                                                                                                                                                                                                                                                                             /work/clankium/src/components/keyed_service/core/dependency_manager.cc:108
  00006715  BrowserContextKeyedServiceFactory::GetContextToUse(base::SupportsUserData*) const                                                                                                                                                                                                                                                                                                                                                                                                                                         /work/clankium/src/components/keyed_service/content/browser_context_keyed_service_factory.cc:102
  00006b81  KeyedServiceFactory::GetServiceForContext(base::SupportsUserData*, bool)                                                                                                                                                                                                                                                                                                                                                                                                                                                  /work/clankium/src/components/keyed_service/core/keyed_service_factory.cc:63
  00501b9d  OffTheRecordProfileImpl::RegisterInProcessServices(std::__ndk1::map<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> >, service_manager::EmbeddedServiceInfo, std::__ndk1::less<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > >, std::__ndk1::allocator<std::__ndk1::pair<std::__ndk1::basic_string<char, std::__ndk1::char_traits<char>, std::__ndk1::allocator<char> > const, service_manager::EmbeddedServiceInfo> > >*)  /work/clankium/src/chrome/browser/profiles/off_the_record_profile_impl.cc:382
  007aa5bb  content::BrowserContext::Initialize(content::BrowserContext*, base::FilePath const&)                                                                                                                                                                                                                                                                                                                                                                                                                                      /work/clankium/src/content/browser/browser_context.cc:490
  005018f3  OffTheRecordProfileImpl::OffTheRecordProfileImpl(Profile*)                                                                                                                                                                                                                                                                                                                                                                                                                                                                /work/clankium/src/chrome/browser/profiles/off_the_record_profile_impl.cc:146
  00501db5  Profile::CreateOffTheRecordProfile()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                      /work/clankium/src/chrome/browser/profiles/off_the_record_profile_impl.cc:574
  00506f43  ProfileImpl::GetOffTheRecordProfile()                                                                                                                                                                                                                                                                                                                                                                                                                                                                                     /work/clankium/src/chrome/browser/profiles/profile_impl.cc:829
  v------>  (anonymous namespace)::FindProfile(unsigned char)                                                                                                                                                                                                                                                                                                                                                                                                                                                                         /work/clankium/src/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc:40
  0021ee41  TabModelJniBridge::TabModelJniBridge(_JNIEnv*, _jobject*, bool, bool)                                                                                                                                                                                                                                                                                                                                                                                                                                                     /work/clankium/src/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc:50
  v------>  Init(_JNIEnv*, base::android::JavaParamRef<_jobject*> const&, unsigned char, unsigned char)                                                                                                                                                                                                                                                                                                                                                                                                                               /work/clankium/src/chrome/browser/ui/android/tab_model/tab_model_jni_bridge.cc:222
  0021edf9  Java_org_chromium_chrome_browser_tabmodel_TabModelJniBridge_nativeInit                                                                                                                                                                                                                                                                                                                                                                                                                                                    /work/clankium/src/out/Debug/gen/chrome/browser/jni_headers/chrome/jni/TabModelJniBridge_jni.h:41
  00fd04c9  offset 0xf4d000                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           /data/app/org.chromium.chrome-1/oat/arm/base.odex

Status: Started (was: Assigned)
Here's what's happening:

1) First MenuUtils#invokeCustomMenuActionSync opens a new incognito tab, creating the incognito profile
2) Closing the sheet destroys incognito profile
3) Creating new incognito tab recreates incognito profile

During #2, dependency_manager.cc adds the destroyed profile to a list of dead context pointers.

During #2, usually the newly created incognito profile references a different location in memory, so the check for a dead context in depedency_manager.cc doesn't get tripped. occasionally the newly created profile re-uses the old reference:

Good scenario:
[INFO:off_the_record_profile_impl.cc(209)] destroying profile 0xc1c27400
[INFO:dependency_manager.cc(94)] dead context pointers adding 0xc1c27400
cr_TMP  : Profile#onNativeDestroyed, isIncognito? true
W cr_TMP  : invoke 2
[INFO:profile_impl.cc(829)] creating off the record profile
[INFO:off_the_record_profile_impl.cc(146)] off the record constructor 0xc1c26b60 real_profile: 0xed163160
[INFO:browser_context.cc(490)] TMP   BrowserContext::Initialize register in process services context: 0xc1c26b60
<check passes since 0xc1c26b60 is not in list of dead context pointers>

Error scenario:
[INFO:off_the_record_profile_impl.cc(209)] destroying profile 0xc1abd0a0
[INFO:dependency_manager.cc(94)] dead context pointers adding 0xc1abd0a0
cr_TMP  : Profile#onNativeDestroyed, isIncognito? true
cr_TMP  : invokeCustomMenuActionSync 2
[INFO:profile_impl.cc(829)] creating off the record profile
[INFO:off_the_record_profile_impl.cc(146)] off the record constructor 0xc1abd0a0 real_profile: 0xed162de0
[INFO:browser_context.cc(490)] TMP   BrowserContext::Initialize register in process services context: 0xc1abd0a0
07-19 09:29:43.953 22140 22140 F chromium: [FATAL:dependency_manager.cc(109)] Check failed: false. TMP Attempted to access a context that was ShutDown(). This is most likely a heap smasher in progress. After KeyedService::Shutdown() completes, your service MUST NOT refer to depended services again. 0xc1abd0a0



This doesn't make a whole lot of sense to me.. I'm going to split the test for now into two pieces so that we're not attempting to re-create the incognito profile right after it was destroyed and we can get some test coverage for the Chrome Home incognito NTP back on the bots.
Project Member

Comment 6 by bugdroid1@chromium.org, Jul 19 2017

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

commit eb332a66dcdd2191f6410c7c69137caa4701e265
Author: Theresa Wellington <twellington@google.com>
Date: Wed Jul 19 21:45:35 2017

[Home] Re-enable BottomSheetNewTabControllerTest#testNTP..Incognito

Splits #testNTPOverTabSwitcher_Incognito_FromTab into two different
tests and re-enables.

BUG= 744710 

Change-Id: I7c5a527fe3077219f285ac8521629d175c959c96
Reviewed-on: https://chromium-review.googlesource.com/578208
Reviewed-by: Matthew Jones <mdjones@chromium.org>
Commit-Queue: Theresa <twellington@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488002}
[modify] https://crrev.com/eb332a66dcdd2191f6410c7c69137caa4701e265/chrome/android/javatests/src/org/chromium/chrome/browser/widget/bottomsheet/BottomSheetNewTabControllerTest.java

Status: Fixed (was: Started)
Two tests look green after a night of runs. Closing this out.

Sign in to add a comment