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

Issue 599165 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2016
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: All , Mac
Pri: 3
Type: Bug



Sign in to add a comment

Tests fail when trying to use base/feature_list.h from gin/isolate_loader.cc

Project Member Reported by asvitk...@chromium.org, Mar 30 2016

Issue description

Tests fail when trying to use base/feature_list.h from gin/isolate_loader.cc.

This was discovered on https://codereview.chromium.org/1835553002 - and eventually caused the author to move the check to a different place in the patchset that was landed.

We should make sure the test harnesses that have failures are fixed to correctly support using the Feature API from there.
 

Comment 1 by ishell@chromium.org, Mar 30 2016

Cc: ishell@chromium.org
An example stack trace where FeatureList is not initialized (running media_blink_unittests):

* thread #1: tid = 0x3c22c0c, 0x000000010057c6c2 media_blink_unittests`base::FeatureList::IsFeatureEnabled(this=0x0000000000000000, feature=0x00000001081fcf10) + 82 at feature_list.cc:173, queue = 'com.apple.main-thread', stop reason = EXC_BAD_ACCESS (code=1, address=0x78)
  * frame #0: 0x000000010057c6c2 media_blink_unittests`base::FeatureList::IsFeatureEnabled(this=0x0000000000000000, feature=0x00000001081fcf10) + 82 at feature_list.cc:173
    frame #1: 0x000000010057c5fb media_blink_unittests`base::FeatureList::IsEnabled(feature=0x00000001081fcf10) + 43 at feature_list.cc:131
    frame #2: 0x0000000100dff9bf media_blink_unittests`gin::IsolateHolder::Initialize(mode=kNonStrictMode, v8_extras_mode=kStableV8Extras, allocator=0x0000000110d03630) + 223 at isolate_holder.cc:91
    frame #3: 0x0000000105af3f72 media_blink_unittests`blink::V8Initializer::initializeMainThread() + 354 at V8Initializer.cpp:368
    frame #4: 0x00000001031a1aee media_blink_unittests`blink::initialize(platform=0x0000000110f1a610) + 62 at WebKit.cpp:87
    frame #5: 0x000000010014f118 media_blink_unittests`BlinkMediaTestSuite::Initialize(this=0x00007fff5fbffab8) + 488 at run_all_unittests.cc:132
    frame #6: 0x00000001008527aa media_blink_unittests`base::TestSuite::Run(this=0x00007fff5fbffab8) + 74 at test_suite.cc:215
    frame #7: 0x0000000100152ae7 media_blink_unittests`int base::internal::RunnableAdapter<int (base::TestSuite::*)()>::Run<>(this=0x00007fff5fbff3b8, object=0x00007fff5fbffab8) + 119 at bind_internal.h:181
    frame #8: 0x00000001001529f0 media_blink_unittests`int base::internal::InvokeHelper<false, int, base::internal::RunnableAdapter<int (base::TestSuite::*)()> >::MakeItSo<BlinkMediaTestSuite*>(runnable=(method_ = 0x0000000100852760), args=0x00007fff5fbff410)()>, BlinkMediaTestSuite*&&) + 64 at bind_internal.h:303
    frame #9: 0x0000000100152983 media_blink_unittests`base::internal::Invoker<base::IndexSequence<0ul>, base::internal::BindState<base::internal::RunnableAdapter<int (base::TestSuite::*)()>, int (base::TestSuite*), base::internal::UnretainedWrapper<BlinkMediaTestSuite> >, base::internal::InvokeHelper<false, int, base::internal::RunnableAdapter<int (base::TestSuite::*)()> >, int ()>::Run(base=0x0000000110f1d1d0) + 115 at bind_internal.h:362
    frame #10: 0x000000010084413f media_blink_unittests`base::Callback<int (), (base::internal::CopyMode)1>::Run(this=0x00007fff5fbffaa8) const + 63 at callback.h:397
    frame #11: 0x0000000100841587 media_blink_unittests`base::(anonymous namespace)::LaunchUnitTestsInternal(run_test_suite=0x00007fff5fbffaa8, default_jobs=24, default_batch_limit=10, use_job_objects=true, gtest_init=0x00007fff5fbffa08), (base::internal::CopyMode)1> const&, int, int, bool, base::Callback<void (), (base::internal::CopyMode)1> const&) + 375 at unit_test_launcher.cc:206
    frame #12: 0x00000001008413da media_blink_unittests`base::LaunchUnitTests(argc=3, argv=0x00007fff5fbffb20, run_test_suite=0x00007fff5fbffaa8), (base::internal::CopyMode)1> const&) + 122 at unit_test_launcher.cc:445
    frame #13: 0x000000010014f31f media_blink_unittests`main(argc=3, argv=0x00007fff5fbffb20) + 223 at run_all_unittests.cc:138
    frame #14: 0x0000000100001e64 media_blink_unittests`start + 52
So the issue in the above trace is that base::TestSuite::Run() doesn't get to the part where it creates FeatureList yet. So this should be fairly straight forward to fix. Not sure if other cases are similar or not.

Comment 4 by ishell@chromium.org, Mar 30 2016

The following tests use different harness (content::UnitTestTestSuite::UnitTestTestSuite()): 
app_shell_unittests, content_unittests, extensions_unittests, content_gl_tests and unit_tests.

browser_tests uses something else.

In addition, gin_shell does not initialize FeatureList which causes gin_unittests failures.
The browser tests failure looks like a PPAPI plugin process issue. Here's a stack trace:

0   Chromium Framework                  0x000000010e812e0f _ZN4base5debug10StackTraceC2Ev + 47
1   Chromium Framework                  0x000000010e812fb3 _ZN4base5debug10StackTraceC1Ev + 35
2   Chromium Framework                  0x000000010e812d67 _ZN4base5debug12_GLOBAL__N_122StackDumpSignalHandlerEiP9__siginfoPv + 1255
3   libsystem_platform.dylib            0x00007fff8a97e52a _sigtramp + 26
4   ???                                 0x00007fff532c0510 0x0 + 140734588781840
5   Chromium Framework                  0x000000010e81d26b _ZN4base11FeatureList9IsEnabledERKNS_7FeatureE + 43
6   Chromium Framework                  0x0000000116d5e2ef _ZN3gin13IsolateHolder10InitializeENS0_10ScriptModeENS0_12V8ExtrasModeEPN2v811ArrayBuffer9AllocatorE + 223
7   Chromium Framework                  0x000000010e73e5f9 _ZN10chrome_pdf12_GLOBAL__N_17SetUpV8Ev + 41
8   Chromium Framework                  0x000000010e73e56b _ZN10chrome_pdf13InitializeSDKEv + 27
9   Chromium Framework                  0x000000010e73aa9d _ZN10chrome_pdf9PDFModule14CreateInstanceEi + 125
10  Chromium Framework                  0x000000011f465117 _ZN2pp18Instance_DidCreateEijPPKcS2_ + 87
11  Chromium Framework                  0x0000000116ed6716 _ZN5ppapi17CallWhileUnlockedI7PP_BoolijPPKcS4_ijS4_S4_EET_PFS5_T0_T1_T2_T3_ERKT4_RKT5_RKT6_RKT7_ + 86
12  Chromium Framework                  0x0000000116ed6691 _ZN5ppapi21PPP_Instance_Combined9DidCreateEijPPKcS3_ + 81
13  Chromium Framework                  0x000000011f0d4b60 _ZN5ppapi5proxy18PPP_Instance_Proxy20OnPluginMsgDidCreateEiRKNSt3__16vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS7_IS9_EEEESD_P7PP_Bool + 2160
14  Chromium Framework                  0x000000011f0d7ac3 _ZN4base20DispatchToMethodImplIPN5ppapi5proxy18PPP_Instance_ProxyEMS3_FviRKNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEESG_P7PP_BoolEJiSE_SE_EJSH_EJLm0ELm1ELm2EEJLm0EEEEvRKT_T0_RKNS5_5tupleIJDpT1_EEEPNSP_IJDpT2_EEENS_13IndexSequenceIJXspT3_EEEENSZ_IJXspT4_EEEE + 339
15  Chromium Framework                  0x000000011f0d77c6 _ZN4base16DispatchToMethodIPN5ppapi5proxy18PPP_Instance_ProxyEMS3_FviRKNSt3__16vectorINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEENSA_ISC_EEEESG_P7PP_BoolEJiSE_SE_EJSH_EEEvRKT_T0_RKNS5_5tupleIJDpT1_EEEPNSP_IJDpT2_EEE + 102
16  Chromium Framework                  0x000000011f0d41b2 _ZN3IPC8MessageTI35PpapiMsg_PPPInstance_DidCreate_MetaNSt3__15tupleIJiNS2_6vectorINS2_12basic_stringIcNS2_11char_traitsIcEENS2_9allocatorIcEEEENS8_ISA_EEEESC_EEENS3_IJ7PP_BoolEEEE8DispatchIN5ppapi5proxy18PPP_Instance_ProxyESK_vMSK_FviRKSC_SM_PSE_EEEbPKNS_7MessageEPT_PT0_PT1_T2_ + 1058
17  Chromium Framework                  0x000000011f0d39fe _ZN5ppapi5proxy18PPP_Instance_Proxy17OnMessageReceivedERKN3IPC7MessageE + 430
18  Chromium Framework                  0x000000011ef9d861 _ZN5ppapi5proxy10Dispatcher17OnMessageReceivedERKN3IPC7MessageE + 305
19  Chromium Framework                  0x000000011f031d22 _ZN5ppapi5proxy16PluginDispatcher17OnMessageReceivedERKN3IPC7MessageE + 1010
20  Chromium Framework                  0x0000000111045da6 _ZN3IPC12ChannelProxy7Context17OnDispatchMessageERKNS_7MessageE + 166
21  Chromium Framework                  0x000000011104c665 _ZN4base8internal15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS2_7MessageEEE3RunIS4_JS7_EEEvRK13scoped_refptrIT_EDpOT0_ + 149
22  Chromium Framework                  0x000000011104c52a _ZN4base8internal12InvokeHelperILb0EvNS0_15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS3_7MessageEEEEE8MakeItSoIJRK13scoped_refptrIS5_ES8_EEEvSB_DpOT_ + 74
23  Chromium Framework                  0x000000011104c4bc _ZN4base8internal7InvokerINS_13IndexSequenceIJLm0ELm1EEEENS0_9BindStateINS0_15RunnableAdapterIMN3IPC12ChannelProxy7ContextEFvRKNS6_7MessageEEEEFvPS8_SB_EJSF_SB_EEENS0_12InvokeHelperILb0EvSE_EEFvvEE3RunEPNS0_13BindStateBaseE + 140
24  Chromium Framework                  0x00000001121215bf _ZNK4base8CallbackIFvvELNS_8internal8CopyModeE1EE3RunEv + 63
25  Chromium Framework                  0x000000010e81464e _ZN4base5debug13TaskAnnotator7RunTaskEPKcRKNS_11PendingTaskE + 654
26  Chromium Framework                  0x000000010e8d0460 _ZN4base11MessageLoop7RunTaskERKNS_11PendingTaskE + 848
27  Chromium Framework                  0x000000010e8d0a96 _ZN4base11MessageLoop21DeferOrRunPendingTaskERKNS_11PendingTaskE + 86
28  Chromium Framework                  0x000000010e8d1148 _ZN4base11MessageLoop6DoWorkEv + 552
29  Chromium Framework                  0x000000010e7d56b8 _ZN4base24MessagePumpCFRunLoopBase7RunWorkEv + 104
30  Chromium Framework                  0x000000010e7d562a ___ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv_block_invoke + 42
31  Chromium Framework                  0x000000010e895c8a _ZN4base3mac15CallWithEHFrameEU13block_pointerFvvE + 10
32  Chromium Framework                  0x000000010e7d49c5 _ZN4base24MessagePumpCFRunLoopBase13RunWorkSourceEPv + 101
33  CoreFoundation                      0x00007fff9a51b8b1 __CFRUNLOOP_IS_CALLING_OUT_TO_A_SOURCE0_PERFORM_FUNCTION__ + 17
34  CoreFoundation                      0x00007fff9a4fb0ac __CFRunLoopDoSources0 + 556
35  CoreFoundation                      0x00007fff9a4fa5cf __CFRunLoopRun + 927
36  CoreFoundation                      0x00007fff9a4f9fc8 CFRunLoopRunSpecific + 296
37  Chromium Framework                  0x000000010e7d5fdc _ZN4base20MessagePumpCFRunLoop5DoRunEPNS_11MessagePump8DelegateE + 76
38  Chromium Framework                  0x000000010e7d52cd _ZN4base24MessagePumpCFRunLoopBase3RunEPNS_11MessagePump8DelegateE + 125
39  Chromium Framework                  0x000000010e8cfcaa _ZN4base11MessageLoop10RunHandlerEv + 298
40  Chromium Framework                  0x000000010e967205 _ZN4base7RunLoop3RunEv + 85
41  Chromium Framework                  0x000000010e8cd79f _ZN4base11MessageLoop3RunEv + 303
42  Chromium Framework                  0x000000010e6d83c3 _ZN7content15PpapiPluginMainERKNS_18MainFunctionParamsE + 2931
43  Chromium Framework                  0x000000010e6f7527 _ZN7content23RunNamedProcessTypeMainERKNSt3__112basic_stringIcNS0_11char_traitsIcEENS0_9allocatorIcEEEERKNS_18MainFunctionParamsEPNS_19ContentMainDelegateE + 599
44  Chromium Framework                  0x000000010e6f91d2 _ZN7content21ContentMainRunnerImpl3RunEv + 626
45  Chromium Framework                  0x000000010e6f6d3d _ZN7content11ContentMainERKNS_17ContentMainParamsE + 349
46  Chromium Framework                  0x000000010cba3d13 ChromeMain + 83
47  Chromium Helper                     0x000000010c93bd6f main + 783
48  Chromium Helper                     0x000000010c93ba54 start + 52
49  ???                                 0x0000000000000009 0x0 + 9
asvitkine-macpro2:src asvitkine$ 

Okay, quite a few things needed to be updated for this, but here's a CL that passes trybots with a feature in gin/ : https://codereview.chromium.org/1848523002/
Project Member

Comment 7 by bugdroid1@chromium.org, Apr 4 2016

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

commit e6be55d0de165a41e25a5bd4d41181f562caf3f3
Author: asvitkine <asvitkine@chromium.org>
Date: Mon Apr 04 23:29:50 2016

Changes to support using base/feature_list.h from gin/.

Since gin/ (V8) is used from a number of different processes and
test harnesses, this required updating them to ensure they initialize
a base::FeatureList instance (which is required before querying the
API to ensure code doesn't incorrectly query the API too early).

Additionally, for test_suite.cc, the FeatureList initialization needed
to happen earlier - since some sub-classes of it initialize gin from
their Initialize() functions. The initialization was also switched to
use FeatureList::InitializeInstance() since for some test suites,
a FeatureList would already exist.

BUG= 599165 , 563705 

Review URL: https://codereview.chromium.org/1848523002

Cr-Commit-Position: refs/heads/master@{#385053}

[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/base/feature_list.cc
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/base/feature_list.h
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/base/test/test_suite.cc
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/base/test/test_suite.h
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/content/ppapi_plugin/ppapi_plugin_main.cc
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/content/test/test_blink_web_unit_test_support.cc
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/content/utility/utility_main.cc
[modify] https://crrev.com/e6be55d0de165a41e25a5bd4d41181f562caf3f3/gin/shell/gin_main.cc

Status: Fixed (was: Assigned)

Sign in to add a comment