Running browser_tests with --trace-startup --trace-startup-duration cause the test to crash |
|||
Issue descriptionI am able to reproduce this on Linux very reliably. Run: $ out/Release/browser_tests --gtest_filter=PaymentRequestPaymentAppTest.SkipUIDisabledWithRequestedPayerEmail --trace-startup Crash stack: [130244:130256:1119/143509.685757:FATAL:thread_task_runner_handle.cc(29)] Check failed: current. Error: This caller requires a single-threaded context (i.e. the current task needs to run from a SingleThreadTaskRunner). #0 0x5611060d4a9f base::debug::StackTrace::StackTrace() #1 0x5611060495c0 logging::LogMessage::~LogMessage() #2 0x5611060ace6b base::ThreadTaskRunnerHandle::Get() #3 0x5611060bdec9 base::trace_event::TraceLog::ThreadLocalEventBuffer::ThreadLocalEventBuffer() #4 0x5611060bec60 base::trace_event::TraceLog::InitializeThreadLocalEventBufferIfSupported() #5 0x5611060c1686 base::trace_event::TraceLog::AddTraceEventWithThreadIdAndTimestamp() #6 0x5611060c379a trace_event_internal::AddTraceEventWithThreadIdAndTimestamp() #7 0x5611060a9f2b base::ScopedBlockingCall::ScopedBlockingCall() #8 0x5611060e33f6 base::PlatformThread::Join() #9 0x5611060ab46c base::Thread::Stop() #10 0x56110604e4c9 base::MessageLoopImpl::~MessageLoopImpl() #11 0x56110604e80e base::MessageLoopImpl::~MessageLoopImpl() #12 0x56110604db42 base::MessageLoop::~MessageLoop() #13 0x5611060abb31 base::Thread::ThreadMain() #14 0x5611060e36ce base::(anonymous namespace)::ThreadFunc() #15 0x7f83ce6bd494 start_thread #16 0x7f83c85fca8f clone Interestingly, running the following command doesn't crash the test & does produce the trace file: out/Release/browser_tests --gtest_filter=PaymentRequestPaymentAppTest.SkipUIDisabledWithRequestedPayerEmail --enable-tracing --enable-tracing-output=foo.json
,
Nov 20
,
Nov 20
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/95f6363a1d4fd53b39aa00ef02bc70a1df318bca commit 95f6363a1d4fd53b39aa00ef02bc70a1df318bca Author: Sami Kyostila <skyostil@chromium.org> Date: Tue Nov 20 13:04:48 2018 trace_event: Don't initialize thread trace buffer during thread shutdown If we try to record a trace event during MessageLoop shutdown, we can get to a state where the MessageLoop is present but the thread task runner handle has been reset. Since we require both in order to initialize the thread local event buffer, this patch makes sure the initialization is skipped if that condition isn't met. Bug: 906795 Change-Id: I9ead620573387f8c329d954425ef43c60547bbef Reviewed-on: https://chromium-review.googlesource.com/c/1343263 Reviewed-by: Eric Seckler <eseckler@chromium.org> Reviewed-by: Primiano Tucci <primiano@chromium.org> Commit-Queue: Sami Kyöstilä <skyostil@chromium.org> Cr-Commit-Position: refs/heads/master@{#609677} [modify] https://crrev.com/95f6363a1d4fd53b39aa00ef02bc70a1df318bca/base/trace_event/trace_log.cc
,
Nov 20
|
|||
►
Sign in to add a comment |
|||
Comment 1 by skyos...@chromium.org
, Nov 20