New issue
Advanced search Search tips

Issue 725882 link

Starred by 2 users

Issue metadata

Status: Fixed
Owner:
Closed: Aug 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Linux
Pri: 2
Type: Bug



Sign in to add a comment

FATAL:task_queue_impl.h(75)] Check failed: sequence_num != other.sequence_num with GCC 6

Reported by chris.co...@canonical.com, May 24 2017

Issue description

UserAgent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/60.0.3095.5 Safari/537.36

Steps to reproduce the problem:
1. Compile a debug build of Chromium with GCC 6 and use_sysroot = False

What is the expected behavior?
It runs without crashing.

What went wrong?
The renderer hits this DCHECK on startup:

30356:30763:0524/133123.275809:FATAL:task_queue_impl.h(75)] Check failed: sequence_num != other.sequence_num (2 vs. 2)

Thread 35 "Chrome_InProcRe" received signal SIGTRAP, Trace/breakpoint trap.                                                                                                                                        
[Switching to Thread 0x7fffa81a1700 (LWP 30763)]                                                                                                                
base::debug::(anonymous namespace)::DebugBreak () at ../../base/debug/debugger_posix.cc:232
232     }
(gdb) bt
#0  0x00007ffff766f577 in base::debug::(anonymous namespace)::DebugBreak() () at ../../base/debug/debugger_posix.cc:232
#1  0x00007ffff766f558 in base::debug::BreakDebugger() () at ../../base/debug/debugger_posix.cc:251
#2  0x00007ffff76e46f0 in logging::LogMessage::~LogMessage() (this=0x7fffa819dff0) at ../../base/logging.cc:783
#3  0x00007fffe3f6b52a in blink::scheduler::internal::TaskQueueImpl::DelayedWakeUp::operator<=(blink::scheduler::internal::TaskQueueImpl::DelayedWakeUp const&) const (this=0x3e77eb029d58, other=...)
    at ../../third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h:75
#4  0x00007fffe3f6aedd in blink::scheduler::TimeDomain::ScheduledDelayedWakeUp::operator<=(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&) const (this=0x3e77eb029d58, other=...)
    at ../../third_party/WebKit/Source/platform/scheduler/base/time_domain.h:126
#5  0x00007fffe3f6bf4d in blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::CompareNodes(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&) (a=..., b=...) at ../../third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h:161
#6  0x00007fffe3f6bff8 in std::is_heap_until<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, bool (*)(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)>(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, bool (*)(blink::scheduler::TimeDomain::ScheduledDelayedWakeUpconst&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)) (__first=0x3e77eb029d58, __last=0x3e77eb029d70, __comp=
    0x7fffe3f6bf30 <blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::CompareNodes(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)>) at /usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_heap.h:503
#7  0x00007fffe3f6beb5 in std::is_heap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, bool (*)(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)>(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const*, bool (*)(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)) (__first=0x3e77eb029d58, __last=0x3e77eb029d70, __comp=
    0x7fffe3f6bf30 <blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::CompareNodes(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp const&)>) at /usr/lib/gcc/x86_64-linux-gnu/6.3.0/../../../../include/c++/6.3.0/bits/stl_heap.h:534
#8  0x00007fffe3f6bdd1 in blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::FillHole(unsigned long, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp&&) (this=0x3e77e6a2b778, hole=1, element=<unknown type in /home/chr1s/src/chromium/chromium/src/out/Default/./libblink_platform.so, CU 0x2f1d7e2, DIE 0x2f2f605>)
    at ../../third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h:157
#9  0x00007fffe3f6b3f8 in blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::MoveHoleUpAndFillWithElement(unsigned long, blink::scheduler::TimeDomain::ScheduledDelayedWakeUp&&) (this=0x3e77e6a2b778, hole=1, element=<unknown type in /home/chr1s/src/chromium/chromium/src/out/Default/./libblink_platform.so, CU 0x2f1d7e2, DIE 0x2f2f3a7>)
    at ../../third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h:175
#10 0x00007fffe3f69dcd in blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::insert(blink::scheduler::TimeDomain::ScheduledDelayedWakeUp&&) (this=0x3e77e6a2b778, element=<unknown type in /home/chr1s/src/chromium/chromium/src/out/Default/./libblink_platform.so, CU 0x2f1d7e2, DIE 0x2f2da9e>) at ../../third_party/WebKit/Source/platform/scheduler/base/intrusive_heap.h:88
#11 0x00007fffe3f69304 in blink::scheduler::TimeDomain::ScheduleDelayedWork(blink::scheduler::internal::TaskQueueImpl*, blink::scheduler::internal::TaskQueueImpl::DelayedWakeUp, base::TimeTicks) (this=0x3e77e6a2b770, queue=0x3e77eb04ee20, wake_up=..., now=...) at ../../third_party/WebKit/Source/platform/scheduler/base/time_domain.cc:50
#12 0x00007fffe3f38689 in blink::scheduler::internal::TaskQueueImpl::ScheduleDelayedWorkInTimeDomain(base::TimeTicks) (this=0x3e77eb04ee20, now=...)
    at ../../third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:902
#13 0x00007fffe3f38470 in blink::scheduler::internal::TaskQueueImpl::PushOntoDelayedIncomingQueueFromMainThread(blink::scheduler::internal::TaskQueueImpl::Task, base::TimeTicks) (this=0x3e77eb04ee20, pending_task=..., now=...) at ../../third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:293
#14 0x00007fffe3f37ea9 in blink::scheduler::internal::TaskQueueImpl::PostDelayedTaskImpl(tracked_objects::Location const&, base::Callback<void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0>, base::TimeDelta, blink::scheduler::internal::TaskQueueImpl::TaskType) (this=0x3e77eb04ee20, from_here=..., task=..., delay=..., task_type=blink::scheduler::internal::TaskQueueImpl::TaskType::NORMAL)
    at ../../third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:254
#15 0x00007fffe3f37969 in blink::scheduler::internal::TaskQueueImpl::PostDelayedTask(tracked_objects::Location const&, base::Callback<void (), (base::internal::CopyMode)0, (base::internal::RepeatMode)0>, base::TimeDelta) (this=0x3e77eb04ee20, from_here=..., task=..., delay=...) at ../../third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.cc:199
#16 0x00007fffefa630c1 in content::ChildThreadImpl::Init(content::ChildThreadImpl::Options const&) (this=0x3e77eb055828, options=...) at ../../content/child/child_thread_impl.cc:568
#17 0x00007fffefa636d6 in content::ChildThreadImpl::ChildThreadImpl(content::ChildThreadImpl::Options const&) (this=0x3e77eb055828, vtt=0x7ffff415f938 <VTT for content::RenderThreadImpl+24>, options=...)
    at ../../content/child/child_thread_impl.cc:382
#18 0x00007ffff1baa5b7 in content::RenderThreadImpl::RenderThreadImpl(content::InProcessChildThreadParams const&, std::unique_ptr<blink::scheduler::RendererScheduler, std::default_delete<blink::scheduler::RendererScheduler> >, scoped_refptr<base::SingleThreadTaskRunner> const&) (this=0x3e77eb055820, params=..., scheduler=
    std::unique_ptr<blink::scheduler::RendererScheduler> containing 0x3e77e7ffca20, resource_task_queue=...) at ../../content/renderer/render_thread_impl.cc:600
#19 0x00007ffff1baa493 in content::RenderThreadImpl::Create(content::InProcessChildThreadParams const&) (params=...) at ../../content/renderer/render_thread_impl.cc:548
#20 0x00007ffff1a3df15 in content::InProcessRendererThread::Init() (this=0x3e77eb033020) at ../../content/renderer/in_process_renderer_thread.cc:50
#21 0x00007ffff786e9b0 in base::Thread::ThreadMain() (this=0x3e77eb033020) at ../../base/threading/thread.cc:327
#22 0x00007ffff78556ca in base::(anonymous namespace)::ThreadFunc(void*) (params=0x3e77eb00dde0) at ../../base/threading/platform_thread_posix.cc:71
#23 0x00007ffff7bc06da in start_thread (arg=0x7fffa81a1700) at pthread_create.c:456
#24 0x00007fffddb9617f in clone () at ../sysdeps/unix/sysv/linux/x86_64/clone.S:105

Crashed report ID: 

How much crashed? Just one tab

Is it a problem with a plugin? No 

Did this work before? N/A 

Chrome version: 60.0.3095.5  Channel: canary
OS Version: 
Flash Version: 

The problem is that GCC 6 adds an additional runtime check in std::is_heap with debug builds (__glibcxx_requires_irreflexive_pred) that ends up calling the comparison function (blink::scheduler::IntrusiveHeap<blink::scheduler::TimeDomain::ScheduledDelayedWakeUp>::CompareNodes) with equal values.
 

Comment 2 by ajha@chromium.org, May 25 2017

Labels: Needs-Triage-M60

Comment 3 by ajha@chromium.org, May 25 2017

Components: Blink>Scheduling
Labels: TE-NeedsTriageHelp
Owner: altimin@chromium.org
Status: WontFix (was: Unconfirmed)
Unfortunately I don't have enough time to fix this gcc-specific issue. There is no easy fix given that we want to retain the DCHECK to ensure that we don't accidentally have same sequence numbers for different tasks. 

We might hide this DCHECK behind non-gcc macro if we have a very compelling reason to do so. Please feel free to reopen this bug if it is the case.
Project Member

Comment 5 by bugdroid1@chromium.org, Aug 10 2017

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

commit 7ced8b65a703a9c28f0365c1aa27402812116c2e
Author: Alexander Timin <altimin@chromium.org>
Date: Thu Aug 10 11:14:40 2017

[scheduler] Do not dcheck that compared wakeups are different in GCC.

GCC can add additional comparisons to some stl structures, leading to
an element being compared against itself.

BUG=714530, 725882 
R=skyostil@chromium.org

Change-Id: If35b33d92636fc0e9759a0eee33ab0477d4c6425
Reviewed-on: https://chromium-review.googlesource.com/605767
Reviewed-by: Sami Kyöstilä <skyostil@chromium.org>
Commit-Queue: Alexander Timin <altimin@chromium.org>
Cr-Commit-Position: refs/heads/master@{#493355}
[modify] https://crrev.com/7ced8b65a703a9c28f0365c1aa27402812116c2e/third_party/WebKit/Source/platform/scheduler/base/task_queue_impl.h

Status: Fixed (was: WontFix)
Fixed given that it prevents us from running gcc sanitizers.

Sign in to add a comment