New issue
Advanced search Search tips

Issue 828993 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Apr 2018
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Windows
Pri: 3
Type: Bug



Sign in to add a comment

Running chrome with --trace-startup hits DCHECK

Project Member Reported by bsep@chromium.org, Apr 4 2018

Issue description

On Windows 10, chrome version 67.0.3388.0

Running "chrome.exe --trace-startup" causes a DCHECK to trigger immediately. It looks like the DCHECK_CURRENTLY_ON(BrowserThread::UI) inside BrowserMainLoop::GetInstance() is failing.

Stacktrace:
>	base.dll!base::debug::BreakDebugger() Line 21	C++
 	base.dll!logging::LogMessage::~LogMessage() Line 857	C++
 	content.dll!content::BrowserMainLoop::GetInstance() Line 574	C++
 	content.dll!content::BrowserChildProcessHostImpl::CopyTraceStartupFlags(base::CommandLine * cmd_line) Line 220	C++
 	content.dll!content::GpuProcessHost::LaunchGpuProcess() Line 1225	C++
 	content.dll!content::GpuProcessHost::Init() Line 782	C++
 	content.dll!content::GpuProcessHost::Get(content::GpuProcessHost::GpuProcessKind kind, bool force_create) Line 489	C++
 	content.dll!content::BrowserGpuChannelHostFactory::EstablishRequest::EstablishOnIO() Line 117	C++
 	content.dll!base::internal::FunctorTraits<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)() __attribute__((thiscall)),void>::Invoke<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest>>(void(content::BrowserGpuChannelHostFactory::EstablishRequest::*)() method, scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> && receiver_ptr) Line 447	C++
 	content.dll!base::internal::InvokeHelper<0,void>::MakeItSo<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)() __attribute__((thiscall)),scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >(void(content::BrowserGpuChannelHostFactory::EstablishRequest::*)() && functor, scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> && args) Line 530	C++
 	content.dll!base::internal::Invoker<base::internal::BindState<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)() __attribute__((thiscall)),scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >,void ()>::RunImpl<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)() __attribute__((thiscall)),std::tuple<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >,0>(void(content::BrowserGpuChannelHostFactory::EstablishRequest::*)() && functor, std::tuple<scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> > && bound, std::integer_sequence<unsigned int,0>) Line 604	C++
 	content.dll!base::internal::Invoker<base::internal::BindState<void (content::BrowserGpuChannelHostFactory::EstablishRequest::*)() __attribute__((thiscall)),scoped_refptr<content::BrowserGpuChannelHostFactory::EstablishRequest> >,void ()>::RunOnce(base::internal::BindStateBase * base) Line 572	C++
 	base.dll!base::OnceCallback<void ()>::Run() Line 96	C++
 	base.dll!base::debug::TaskAnnotator::RunTask(const char * queue_function, base::PendingTask * pending_task) Line 62	C++
 	base.dll!base::internal::IncomingTaskQueue::RunTask(base::PendingTask * pending_task) Line 124	C++
 	base.dll!base::MessageLoop::RunTask(base::PendingTask * pending_task) Line 391	C++
 	base.dll!base::MessageLoop::DeferOrRunPendingTask(base::PendingTask pending_task) Line 406	C++
 	base.dll!base::MessageLoop::DoWork() Line 447	C++
 	base.dll!base::MessagePumpForIO::DoRunLoop() Line 481	C++
 	base.dll!base::MessagePumpWin::Run(base::MessagePump::Delegate * delegate) Line 59	C++
 	base.dll!base::MessageLoop::Run(bool application_tasks_allowed) Line 342	C++
 	base.dll!base::RunLoop::Run() Line 130	C++
 	base.dll!base::Thread::Run(base::RunLoop * run_loop) Line 255	C++
 	content.dll!content::BrowserProcessSubThread::IOThreadRun(base::RunLoop * run_loop) Line 155	C++
 	content.dll!content::BrowserProcessSubThread::Run(base::RunLoop * run_loop) Line 105	C++
 	base.dll!base::Thread::ThreadMain() Line 338	C++
 	base.dll!base::`anonymous namespace'::ThreadFunc(void * params) Line 93	C++



 
Status: Started (was: Untriaged)
Project Member

Comment 2 by bugdroid1@chromium.org, Apr 24 2018

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

commit def633e0690f2977808e227641b350edff238f0a
Author: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Date: Tue Apr 24 02:05:02 2018

Tracing: startup flags

The GPU process is launched from the IO thread; so, it cannot
access BrowserMainLoop (should be accessed from the UI thread) to
get the status of startup tracing ( crbug.com/828993 ).

This CL simplifies dealing with startup tracing flags by centralizing
the logic in TraceStartupConfig. Then, we can get information about
startup tracing through TraceStartupConfig, only.

Bug:  828993 
Change-Id: Ia868fed264b534526ad054414ae2a1e12f5c0ac5
Reviewed-on: https://chromium-review.googlesource.com/1015647
Commit-Queue: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Reviewed-by: oysteine <oysteine@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552955}
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/components/tracing/BUILD.gn
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/components/tracing/common/trace_startup.cc
[rename] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/components/tracing/common/trace_startup_config.cc
[rename] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/components/tracing/common/trace_startup_config.h
[rename] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/components/tracing/common/trace_startup_config_unittest.cc
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/browser_child_process_host_impl.cc
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/browser_main_loop.cc
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/browser_main_loop.h
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/browser_main_runner.cc
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/devtools/protocol/tracing_handler.cc
[modify] https://crrev.com/def633e0690f2977808e227641b350edff238f0a/content/browser/tracing/tracing_controller_impl.cc

Status: Fixed (was: Started)
Project Member

Comment 4 by bugdroid1@chromium.org, Jun 20 2018

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

commit 681335952c74c1b3ee2ce460c8d0b3624b416501
Author: Tomasz Śniatowski <tsniatowski@vewd.com>
Date: Wed Jun 20 21:03:53 2018

Fix startup tracing to an arbitrary file Android

As a side effect of the tracing cleanups in https://crrev.com/c/1015647,
setting a custom startup trace file via --trace-startup-file stopped
working on Android. Fix by not hardcoding the call to generate a path,
so the switch is checked first.

Bug:  828993 
Change-Id: Ifcfd0dc2ea41b09af0c409ba5d406eda5d920b8b
Reviewed-on: https://chromium-review.googlesource.com/1097326
Reviewed-by: Ehsan Chiniforooshan <chiniforooshan@chromium.org>
Reviewed-by: John Abd-El-Malek <jam@chromium.org>
Commit-Queue: Tomasz Śniatowski <tsniatowski@vewd.com>
Cr-Commit-Position: refs/heads/master@{#569012}
[modify] https://crrev.com/681335952c74c1b3ee2ce460c8d0b3624b416501/components/tracing/common/trace_startup_config.cc
[modify] https://crrev.com/681335952c74c1b3ee2ce460c8d0b3624b416501/components/tracing/common/trace_startup_config.h
[modify] https://crrev.com/681335952c74c1b3ee2ce460c8d0b3624b416501/content/browser/browser_main_loop.cc

Sign in to add a comment