FATAL:http_stream_factory_impl.cc(264)] Check failed: job_controller->HasPendingAltJob() || job_controller->HasPendingMainJob(). |
|||||||
Issue descriptionVersion: Chromium 63.0.3237.0 (Developer Build) (64-bit) Revision f2bc825223623f5cbd85e938662406222a4e97b5- OS Linux JavaScript V8 6.3.291 Flash (Disabled) User Agent Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/63.0.3237.0 Safari/537.36 Command Line ./out/Default/chrome --flag-switches-begin --flag-switches-end Executable Path /usr/local/google/home/maxlg/Develop/gitRepo/chrome/chromium3/src/out/Default/chrome Profile Path /usr/local/google/home/maxlg/.config/chromium/Default Variations AccountConsistencyVariations:DiceFixAuthErrors BackgroundVideoOptimizations:BackgroundOptimizationEnabled1sOrLessMediaSource BrowserScheduler:RedirectWithDefaultInitParams CSSExternalScanner:Enabled_ScanAndPreload CheckerImaging:CheckerImaging CompositorImageAnimation:CompositorImageAnimation DecoupleTranslateLanguage:Experiment DelayNavigation:DelayNavigation DisallowFetchForDocWrittenScriptsInMainFrame:DocumentWriteScriptBlockGroup_20161208_Launch DynamicExpectCT:DynamicExpectCTEnabled GpuScheduler:Enabled GuestViewCrossProcessFrames:Enabled Html5ByDefault:Enabled InstanceID:Enabled KeepAliveRendererForKeepaliveRequests:Enabled LazyParseCSS:Control LoadingWithMojo:Enabled MojoInputMessages:Enabled NetDelayableH2AndQuicRequests:Yielding3 NoStatePrefetchValidation:NoStatePrefetchWithoutInstant OffMainThreadFetch:Enabled PageRevisitInstrumentation:Enabled PassiveDocumentEventListeners:Enabled PassiveEventListenersDueToFling:Enabled PermissionPromptUIViews:BlockPromptsEnabled PersistentHistograms:EnabledOnDisk5 PreconnectMore:Enabled QUIC:Enabled RafAlignedMouseInput:Enabled RafAlignedTouchInput:Enabled ReportingAPI:ReportingEnabled ResourceLoadScheduler:Enabled_bg_limit_16 SafeBrowsingAdSamplerPerformance:AllAdSamples_NoReportsSent SafeBrowsingScoutTransitionStudy:CanShowScoutOptInGroup2 SafeBrowsingThreatDomDetailsTagAttributes:AdIdentifiers ServiceWorkerScriptStreaming:Enabled SimpleCacheTrial:ExperimentYes SocketReadIfReady:Enabled SubresourceFilter:EnabledForPhishingSites SyncUSSAutocomplete:Enabled TLS13Variant:Experiment2 ThrottleDelayable:Enabled TokenBinding:TokenBinding TranslateRankerModel:Enforcement20170329 TranslateUserEvents:Enabled UKM:Enabled V8AsmJSToWasm:AsmJsToWebAssembly V8CacheStrategiesForCacheStorage:default V8ContextSnapshot:Enabled V8WasmTrapHandler:WasmTrapHandlerActive VideoCaptureService:Enabled VsyncAlignedInput:Enable WebFontsInterventionV2:Enabled‑3g WheelScrollLatchingAndAsyncWheelEvents:Enabled YieldBetweenContentScriptRuns:Enabled Stacktrace: ./out/Default/chrome [90210:90210:1016/182910.849984:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182910.856087:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182910.857495:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182910.901017:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182910.901190:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182912.200393:WARNING:gaia_auth_fetcher.cc(964)] ClientLogin failed with [90210:90210:1016/182912.200504:WARNING:gaia_auth_fetcher.cc(985)] Incomprehensible response from Google Accounts servers. [90210:90210:1016/182913.261438:WARNING:gaia_auth_fetcher.cc(964)] ClientLogin failed with [90210:90210:1016/182913.261533:WARNING:gaia_auth_fetcher.cc(985)] Incomprehensible response from Google Accounts servers. [90210:90210:1016/182916.328498:WARNING:gaia_auth_fetcher.cc(964)] ClientLogin failed with [90210:90210:1016/182916.328620:WARNING:gaia_auth_fetcher.cc(985)] Incomprehensible response from Google Accounts servers. [90274:90274:1016/182920.446459:ERROR:gpu_info.cc(103)] No active GPU found, returning primary GPU. [90210:90210:1016/182921.280142:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182921.280435:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182921.655917:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182922.563479:INFO:CONSOLE(7)] "SW registered", source: https://www.google.ca/_/chrome/newtab?ie=UTF-8 (7) [90210:90210:1016/182924.630936:WARNING:gaia_auth_fetcher.cc(964)] ClientLogin failed with [90210:90210:1016/182924.631030:WARNING:gaia_auth_fetcher.cc(985)] Incomprehensible response from Google Accounts servers. [90210:90210:1016/182926.803534:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182926.811858:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182926.813725:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182927.698274:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182927.698569:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90210:1016/182927.747409:ERROR:color_space.cc(434)] Cannot fetch ICCProfile for invalid space. [90210:90240:1016/182933.918046:FATAL:http_stream_factory_impl.cc(264)] Check failed: job_controller->HasPendingAltJob() || job_controller->HasPendingMainJob(). #0 0x7f7e44b4f00d base::debug::StackTrace::StackTrace() #1 0x7f7e44b4d43c base::debug::StackTrace::StackTrace() #2 0x7f7e44bd3b0a logging::LogMessage::~LogMessage() #3 0x7f7e4284edc6 net::HttpStreamFactoryImpl::AddJobControllerCountToHistograms() #4 0x7f7e4284dc1f net::HttpStreamFactoryImpl::RequestStreamInternal() #5 0x7f7e4284db2d net::HttpStreamFactoryImpl::RequestStream() #6 0x7f7e427f3fcc net::HttpNetworkTransaction::DoCreateStream() #7 0x7f7e427ec3da net::HttpNetworkTransaction::DoLoop() #8 0x7f7e427ebfb5 net::HttpNetworkTransaction::Start() #9 0x7f7e3e424052 content::DevToolsNetworkTransaction::Start() #10 0x7f7e427b6273 net::HttpCache::Transaction::DoSendRequest() #11 0x7f7e427ab6dd net::HttpCache::Transaction::DoLoop() #12 0x7f7e427a9b4b net::HttpCache::Transaction::OnIOComplete() #13 0x7f7e4243b3d1 _ZN4base8internal13FunctorTraitsIMN3net16SocketBIOAdapterEFviEvE6InvokeIRKNS_7WeakPtrIS3_EEJiEEEvS5_OT_DpOT0_ #14 0x7f7e4243b335 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net16SocketBIOAdapterEFviERKNS_7WeakPtrIS5_EEJiEEEvOT_OT0_DpOT1_ #15 0x7f7e4243b2b0 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFviEJNS_7WeakPtrIS4_EEEEEFviEE7RunImplIRKS6_RKNSt3__15tupleIJS8_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOi #16 0x7f7e4243b1f4 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFviEJNS_7WeakPtrIS4_EEEEEFviEE3RunEPNS0_13BindStateBaseEOi #17 0x7f7e4243813c _ZNKR4base17RepeatingCallbackIFviEE3RunEi #18 0x7f7e427977c6 net::HttpCache::ProcessAddToEntryQueue() #19 0x7f7e42797549 net::HttpCache::OnProcessQueuedTransactions() #20 0x7f7e427a52b2 _ZN4base8internal13FunctorTraitsIMN3net9HttpCacheEFvPNS3_11ActiveEntryEEvE6InvokeIRKNS_7WeakPtrIS3_EEJRKS5_EEEvS7_OT_DpOT0_ #21 0x7f7e427a5215 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net9HttpCacheEFvPNS5_11ActiveEntryEERKNS_7WeakPtrIS5_EEJRKS7_EEEvOT_OT0_DpOT1_ #22 0x7f7e427a518d _ZN4base8internal7InvokerINS0_9BindStateIMN3net9HttpCacheEFvPNS4_11ActiveEntryEEJNS_7WeakPtrIS4_EES6_EEEFvvEE7RunImplIRKS8_RKNSt3__15tupleIJSA_S6_EEEJLm0ELm1EEEEvOT_OT0_NSH_16integer_sequenceImJXspT1_EEEE #23 0x7f7e427a50fc _ZN4base8internal7InvokerINS0_9BindStateIMN3net9HttpCacheEFvPNS4_11ActiveEntryEEJNS_7WeakPtrIS4_EES6_EEEFvvEE3RunEPNS0_13BindStateBaseE #24 0x7f7e44afdfc1 _ZNO4base12OnceCallbackIFvvEE3RunEv #25 0x7f7e44b5330a base::debug::TaskAnnotator::RunTask() #26 0x7f7e44bf26f5 base::internal::IncomingTaskQueue::RunTask() #27 0x7f7e44bf7744 base::MessageLoop::RunTask() #28 0x7f7e44bf79c7 base::MessageLoop::DeferOrRunPendingTask() #29 0x7f7e44bf86b0 base::MessageLoop::DoWork() #30 0x7f7e44c00869 base::MessagePumpLibevent::Run() #31 0x7f7e44bf6f04 base::MessageLoop::Run() #32 0x7f7e44ca3985 base::RunLoop::Run() #33 0x7f7e44d62cd4 base::Thread::Run() #34 0x7f7e3f09a956 content::BrowserThreadImpl::IOThreadRun() #35 0x7f7e3f09ac5b content::BrowserThreadImpl::Run() #36 0x7f7e44d638f4 base::Thread::ThreadMain() #37 0x7f7e44d49081 base::(anonymous namespace)::ThreadFunc() #38 0x7f7e450df184 start_thread #39 0x7f7e2b925ffd clone Received signal 6 #0 0x7f7e44b4f00d base::debug::StackTrace::StackTrace() #1 0x7f7e44b4d43c base::debug::StackTrace::StackTrace() #2 0x7f7e44b4e9c5 base::debug::(anonymous namespace)::StackDumpSignalHandler() #3 0x7f7e450e7330 <unknown> #4 0x7f7e2b85ec37 gsignal #5 0x7f7e2b862028 abort #6 0x7f7e44b4a406 base::debug::(anonymous namespace)::DebugBreak() #7 0x7f7e44b4a3e8 base::debug::BreakDebugger() #8 0x7f7e44bd470c logging::LogMessage::~LogMessage() #9 0x7f7e4284edc6 net::HttpStreamFactoryImpl::AddJobControllerCountToHistograms() #10 0x7f7e4284dc1f net::HttpStreamFactoryImpl::RequestStreamInternal() #11 0x7f7e4284db2d net::HttpStreamFactoryImpl::RequestStream() #12 0x7f7e427f3fcc net::HttpNetworkTransaction::DoCreateStream() #13 0x7f7e427ec3da net::HttpNetworkTransaction::DoLoop() #14 0x7f7e427ebfb5 net::HttpNetworkTransaction::Start() #15 0x7f7e3e424052 content::DevToolsNetworkTransaction::Start() #16 0x7f7e427b6273 net::HttpCache::Transaction::DoSendRequest() #17 0x7f7e427ab6dd net::HttpCache::Transaction::DoLoop() #18 0x7f7e427a9b4b net::HttpCache::Transaction::OnIOComplete() #19 0x7f7e4243b3d1 _ZN4base8internal13FunctorTraitsIMN3net16SocketBIOAdapterEFviEvE6InvokeIRKNS_7WeakPtrIS3_EEJiEEEvS5_OT_DpOT0_ #20 0x7f7e4243b335 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net16SocketBIOAdapterEFviERKNS_7WeakPtrIS5_EEJiEEEvOT_OT0_DpOT1_ #21 0x7f7e4243b2b0 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFviEJNS_7WeakPtrIS4_EEEEEFviEE7RunImplIRKS6_RKNSt3__15tupleIJS8_EEEJLm0EEEEvOT_OT0_NSF_16integer_sequenceImJXspT1_EEEEOi #22 0x7f7e4243b1f4 _ZN4base8internal7InvokerINS0_9BindStateIMN3net16SocketBIOAdapterEFviEJNS_7WeakPtrIS4_EEEEEFviEE3RunEPNS0_13BindStateBaseEOi #23 0x7f7e4243813c _ZNKR4base17RepeatingCallbackIFviEE3RunEi #24 0x7f7e427977c6 net::HttpCache::ProcessAddToEntryQueue() #25 0x7f7e42797549 net::HttpCache::OnProcessQueuedTransactions() #26 0x7f7e427a52b2 _ZN4base8internal13FunctorTraitsIMN3net9HttpCacheEFvPNS3_11ActiveEntryEEvE6InvokeIRKNS_7WeakPtrIS3_EEJRKS5_EEEvS7_OT_DpOT0_ #27 0x7f7e427a5215 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net9HttpCacheEFvPNS5_11ActiveEntryEERKNS_7WeakPtrIS5_EEJRKS7_EEEvOT_OT0_DpOT1_ #28 0x7f7e427a518d _ZN4base8internal7InvokerINS0_9BindStateIMN3net9HttpCacheEFvPNS4_11ActiveEntryEEJNS_7WeakPtrIS4_EES6_EEEFvvEE7RunImplIRKS8_RKNSt3__15tupleIJSA_S6_EEEJLm0ELm1EEEEvOT_OT0_NSH_16integer_sequenceImJXspT1_EEEE #29 0x7f7e427a50fc _ZN4base8internal7InvokerINS0_9BindStateIMN3net9HttpCacheEFvPNS4_11ActiveEntryEEJNS_7WeakPtrIS4_EES6_EEEFvvEE3RunEPNS0_13BindStateBaseE #30 0x7f7e44afdfc1 _ZNO4base12OnceCallbackIFvvEE3RunEv #31 0x7f7e44b5330a base::debug::TaskAnnotator::RunTask() #32 0x7f7e44bf26f5 base::internal::IncomingTaskQueue::RunTask() #33 0x7f7e44bf7744 base::MessageLoop::RunTask() #34 0x7f7e44bf79c7 base::MessageLoop::DeferOrRunPendingTask() #35 0x7f7e44bf86b0 base::MessageLoop::DoWork() #36 0x7f7e44c00869 base::MessagePumpLibevent::Run() #37 0x7f7e44bf6f04 base::MessageLoop::Run() #38 0x7f7e44ca3985 base::RunLoop::Run() #39 0x7f7e44d62cd4 base::Thread::Run() #40 0x7f7e3f09a956 content::BrowserThreadImpl::IOThreadRun() #41 0x7f7e3f09ac5b content::BrowserThreadImpl::Run() #42 0x7f7e44d638f4 base::Thread::ThreadMain() #43 0x7f7e44d49081 base::(anonymous namespace)::ThreadFunc() #44 0x7f7e450df184 start_thread #45 0x7f7e2b925ffd clone r8: 00007f7e0ffa7fb8 r9: fffffffffffffec8 r10: 0000000000000008 r11: 0000000000000202 r12: 00000c2dae02c028 r13: 00007f7e0ffa9508 r14: 0000000000000001 r15: 0000000000000000 di: 0000000000016062 si: 0000000000016080 bp: 00007f7e0ffa84c0 bx: 0000000000000001 dx: 0000000000000006 ax: 0000000000000000 cx: 00007f7e2b85ec37 sp: 00007f7e0ffa8388 ip: 00007f7e2b85ec37 efl: 0000000000000202 cgf: 0000000000000033 erf: 0000000000000000 trp: 0000000000000000 msk: 0000000000000000 cr2: 0000000000000000 [end of stack trace] Calling _exit(1). Core file will not be generated. Step to reproduce: 1. In Catapult, ./bin/run_dev_server 2. In Chromium, ./out/Default/chrome 3. Paste the URL to the address bar of Chrome: http://127.0.0.1:8003/ 4. Click 'Trace file viewer' 5. The browser crashes.
,
Oct 19 2017
[zhongyi]: Looks like you added this method. Mind investigating?
,
Oct 19 2017
Oh, I think my change has caused this CHECK failure. Will upload a fix.
,
Oct 19 2017
Sorry, I mis-read this bug. This doesn't seem to be caused by Issue 757548 . Re-assigning.
,
Oct 19 2017
This method is merely for metrics collection, plus some checking. The DCHECK failed here means there is neither alt job nor main job there. We used to have the assumption that a JobController is managing TCP job and QUIC job racing, if there's no job to manage(and there should also be no request as request is bound to a job), JobController should be destroyed. There have been some new code changes after I added this CHECK. One thing I noticed in the revision history is https://chromium.googlesource.com/chromium/src/+/fe7f0f48f41642e5c0427e6384db0b00f9dd50af which seemed breaks the assumption: void JobController::OnStreamReadyOnPooledConnection() { // ... main_job_.reset(); alternative_job_.reset(); // ... } same for OnBidirectionalStreamImplReadyOnPooledConnection(). Unfortunately, there is no unittest coverage to confirm the JobController cleanup. bnc@: could you take a close look on this change, maybe add unittest coverage to check if JobController is cleaned up? We struggled a lot with JobController left undeleted and eating memory, I'm getting a little concerned with this CHECK failure.
,
Oct 19 2017
Good catch, zhongyi@! I think you are right. That does seem to break the DCHECK. Once we delete the HttpStreamRequest, the JobController will be gone, so we don't have an actual leak of JobController. We should preserve the invariant that when the last job is gone, the job controller is destroyed synchronously. Bence, can we call MaybeNotifyFactoryOfCompletion() just before these two methods return?
,
Oct 27 2017
I can reproduce. Thank you for filing with detailed steps to reproduce.
,
Oct 30 2017
In addition to the situation described in comment #5, I'm running into a different code path that can also result in an AddJobControllerCountToHistograms() call at a point in time when there is a JobController without a main or alternative job: #8 0x7f195a3f99fc logging::LogMessage::~LogMessage() #9 0x7f195807b8a5 net::HttpStreamFactoryImpl::AddJobControllerCountToHistograms() #10 0x7f195807a8cf net::HttpStreamFactoryImpl::RequestStreamInternal() #11 0x7f195807a7dd net::HttpStreamFactoryImpl::RequestStream() #12 0x7f19580210fc net::HttpNetworkTransaction::DoCreateStream() #13 0x7f195801950a net::HttpNetworkTransaction::DoLoop() #14 0x7f19580190e5 net::HttpNetworkTransaction::Start() #15 0x7f1953762882 content::ThrottlingNetworkTransaction::Start() #16 0x7f195853438f net::URLRequestHttpJob::StartTransactionInternal() #17 0x7f19585339ee net::URLRequestHttpJob::MaybeStartTransactionInternal() #18 0x7f1958533839 net::URLRequestHttpJob::StartTransaction() #19 0x7f1958534ee8 net::URLRequestHttpJob::SetCookieHeaderAndStart() #20 0x7f1957f50c8f _ZN4base8internal13FunctorTraitsIMN3net14MDnsClientImpl4CoreEFvRKNSt3__14pairINS5_12basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEtEEEvE6InvokeIRKNS_7WeakPtrIS4_EEJSF_EEEvSH_OT_DpOT0_ #21 0x7f1957f50bf5 _ZN4base8internal12InvokeHelperILb1EvE8MakeItSoIRKMN3net14MDnsClientImpl4CoreEFvRKNSt3__14pairINS7_12basic_stringIcNS7_11char_traitsIcEENS7_9allocatorIcEEEEtEEERKNS_7WeakPtrIS6_EEJSH_EEEvOT_OT0_DpOT1_ #22 0x7f19580bd090 _ZN4base8internal7InvokerINS0_9BindStateIMN3net26TransportSecurityPersisterEFvRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEJNS_7WeakPtrIS4_EEEEEFvSD_EE7RunImplIRKSF_RKNS5_5tupleIJSH_EEEJLm0EEEEvOT_OT0_NS5_16integer_sequenceImJXspT1_EEEESD_ #23 0x7f19580bd024 _ZN4base8internal7InvokerINS0_9BindStateIMN3net26TransportSecurityPersisterEFvRKNSt3__112basic_stringIcNS5_11char_traitsIcEENS5_9allocatorIcEEEEEJNS_7WeakPtrIS4_EEEEEFvSD_EE3RunEPNS0_13BindStateBaseESD_ #24 0x7f1957cc8dd1 _ZNO4base12OnceCallbackIFvRKN3net10FileStream7Context8IOResultEEE3RunES6_ #25 0x7f1957da6afd (anonymous namespace)::MaybeRunCookieCallback<>() #26 0x7f1957d9fc83 net::CookieMonster::GetCookieListWithOptions() #27 0x7f1957dc2a24 _ZN4base8internal13FunctorTraitsIMN3net13CookieMonsterEFvRK4GURLRKNS2_13CookieOptionsENS_12OnceCallbackIFvRKNSt3__112basic_stringIcNSB_11char_traitsIcEENSB_9allocatorIcEEEEEEEEvE6InvokeIPS3_JS4_S7_SL_EEEvSN_OT_DpOT0_ #28 0x7f1957dc293a _ZN4base8internal12InvokeHelperILb0EvE8MakeItSoIMN3net13CookieMonsterEFvRK4GURLRKNS4_13CookieOptionsENS_12OnceCallbackIFvRKNSt3__112basic_stringIcNSD_11char_traitsIcEENSD_9allocatorIcEEEEEEEEJPS5_S6_S9_SN_EEEvOT_DpOT0_ #29 0x7f1957dc2898 _ZN4base8internal7InvokerINS0_9BindStateIMN3net13CookieMonsterEFvRK4GURLRKNS3_13CookieOptionsENS_12OnceCallbackIFvRKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEEEEEJNS0_17UnretainedWrapperIS4_EES5_S8_SM_EEEFvvEE7RunImplISO_NSC_5tupleIJSQ_S5_S8_SM_EEEJLm0ELm1ELm2ELm3EEEEvOT_OT0_NSC_16integer_sequenceImJXspT1_EEEE #30 0x7f1957dc2719 _ZN4base8internal7InvokerINS0_9BindStateIMN3net13CookieMonsterEFvRK4GURLRKNS3_13CookieOptionsENS_12OnceCallbackIFvRKNSt3__112basic_stringIcNSC_11char_traitsIcEENSC_9allocatorIcEEEEEEEEJNS0_17UnretainedWrapperIS4_EES5_S8_SM_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE #31 0x7f1957db9a11 _ZNO4base12OnceCallbackIFvvEE3RunEv #32 0x7f1957d9a048 net::CookieMonster::DoCookieCallbackForURL() #33 0x7f1957d9f445 net::CookieMonster::GetCookieListWithOptionsAsync() #34 0x7f195853179a net::URLRequestHttpJob::AddCookieHeaderAndStart() #35 0x7f195853112d net::URLRequestHttpJob::Start() #36 0x7f19585066c7 net::URLRequest::StartJob() #37 0x7f1958505a57 net::URLRequest::BeforeRequestComplete() #38 0x7f1958505261 net::URLRequest::Start() #39 0x7f19581baf29 net::ProxyScriptFetcherImpl::Fetch() #40 0x7f19581b6995 net::ProxyScriptDecider::DoFetchPacScript() #41 0x7f19581b53a5 net::ProxyScriptDecider::DoLoop() #42 0x7f19581b4863 net::ProxyScriptDecider::Start() #43 0x7f19581cf9e1 net::ProxyService::InitProxyResolver::DoDecideProxyScript() #44 0x7f19581cf71e net::ProxyService::InitProxyResolver::DoLoop() #45 0x7f19581cdc70 net::ProxyService::InitProxyResolver::Start() #46 0x7f19581c6837 net::ProxyService::InitializeUsingLastFetchedConfig() #47 0x7f19581cab29 net::ProxyService::OnProxyConfigChanged() #48 0x7f19581c41a7 net::ProxyService::ApplyProxyConfigIfAvailable() #49 0x7f19581c3ae1 net::ProxyService::ResolveProxyHelper() #50 0x7f19581c38b2 net::ProxyService::ResolveProxy() #51 0x7f19580a2020 net::HttpStreamFactoryImpl::JobController::DoResolveProxy() #52 0x7f19580a17ff net::HttpStreamFactoryImpl::JobController::DoLoop() #53 0x7f1958097085 net::HttpStreamFactoryImpl::JobController::RunLoop() #54 0x7f1958096e4a net::HttpStreamFactoryImpl::JobController::Start() #55 0x7f195807acc1 net::HttpStreamFactoryImpl::RequestStreamInternal() #56 0x7f195807a7dd net::HttpStreamFactoryImpl::RequestStream() #57 0x7f19580210fc net::HttpNetworkTransaction::DoCreateStream() #58 0x7f195801950a net::HttpNetworkTransaction::DoLoop() #59 0x7f19580190e5 net::HttpNetworkTransaction::Start() #60 0x7f1953762882 content::ThrottlingNetworkTransaction::Start() Here JobController::DoResolveProxy() calls ProxyService::ResolveProxy(), which starts a new request (I guess to fetch the PAC script), which ultimately calls AddJobControllerCountToHistograms(). I believe it is unlikely that at this point the number of JobController instances will be a multiple of 100, but that this guarantee for the DCHECK not firing is quite opaque.
,
Oct 30 2017
Thanks, Bence! You are right. This DCHECK is problematic after the recent changes. I have followed this UMA for a few months now -- getting multiple hundreds of job controllers turned out to be quite normal (not indicative of leak). Let me upload a CL to adjust this logging code.
,
Oct 30 2017
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/4771dcb270f5f20f6e7d295454b615c954b81184 commit 4771dcb270f5f20f6e7d295454b615c954b81184 Author: Helen Li <xunjieli@chromium.org> Date: Mon Oct 30 19:09:19 2017 Adjust HttpStreamFactoryImpl::JobController UMA logging The DCHECK is not valid after recent refactoring which makes JobController to create jobs after proxy resolution (i.e. a JobController can have no pending Job when it is in proxy resolution.) UMA data show that having multiple hundreds of JobController is not indicative of memory leak, so this CL also adjusts the threshold for emitting UMA stats. Bug: 775253 Cq-Include-Trybots: master.tryserver.chromium.android:android_cronet_tester;master.tryserver.chromium.mac:ios-simulator-cronet Change-Id: I5f12ee5c16de51a87aaf7dd2aed6840801b5367a Reviewed-on: https://chromium-review.googlesource.com/743689 Reviewed-by: Zhongyi Shi <zhongyi@chromium.org> Commit-Queue: Helen Li <xunjieli@chromium.org> Cr-Commit-Position: refs/heads/master@{#512568} [modify] https://crrev.com/4771dcb270f5f20f6e7d295454b615c954b81184/net/http/http_stream_factory_impl.cc
,
Oct 30 2017
Re comment #6: both in OnStreamReadyOnPooledConnection() and OnBidirectionalStreamImplReadyOnPooledConnection(), there is a valid |request_| at the beginning of the method (otherwise DCHECK(request_->completed()) would crash). Then we reset the two job members. If MaybeNotifyFactoryOfCompletion() was called just before these two methods return, that would not help: if |request_| is still valid, MaybeNotifyFactoryOfCompletion() does not do anything. If |request_| has been reset since, that must have happened in OnRequestComplete(), which would have already called MaybeNotifyFactoryOfCompletion(). Therefore I believe the invariant that JobController is destroyed after both jobs are done and the request is complete still holds, and the path described in comment #8 is the only path that could have lead to the DCHECK failing. I believe this bug is fixed now. Thank you, Helen, for landing the fix!
,
Oct 30 2017
Thanks for fixing this! And sorry I didn't catch up with the most recent changes, glad we have a root fix checked in =) |
|||||||
►
Sign in to add a comment |
|||||||
Comment 1 by ricea@chromium.org
, Oct 19 2017