New issue
Advanced search Search tips

Issue 648152 link

Starred by 2 users

Issue metadata

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



Sign in to add a comment

Task creation from background thread not possible (in V8)

Project Member Reported by heimbuef@google.com, Sep 19 2016

Issue description

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

Steps to reproduce the problem:
Trying to create a task in V8 

What is the expected behavior?

What went wrong?
crash log for renderer (pid <unknown>):
STDOUT: <empty>
STDERR: Xlib:  extension "RANDR" missing on display ":9".
STDERR: Xlib:  extension "RANDR" missing on display ":9".
STDERR: [4:12:0915/071528:3033153150:FATAL:thread_restrictions.cc(57)] Check failed: false. LazyInstance/Singleton is not allowed to be used on this thread.  Most likely it's because this thread is not joinable (or the current task is running with TaskShutdownBehavior::CONTINUE_ON_SHUTDOWN semantics), so AtExitManager may have deleted the object on shutdown, leading to a potential shutdown crash. If you need to use the object from this context, it'll have to be updated to use Leaky traits.
STDERR: #0 0x0000018f020e base::debug::StackTrace::StackTrace()
STDERR: #1 0x00000190561b logging::LogMessage::~LogMessage()
STDERR: #2 0x000001949d89 base::ThreadRestrictions::AssertSingletonAllowed()
STDERR: #3 0x00000194a7c6 base::WorkerPool::PostTask()
STDERR: #4 0x00000271bbd0 gin::V8Platform::CallOnBackgroundThread()
STDERR: #5 0x000000ed8d58 v8::internal::AccountingAllocator::PushSegmentToGarbageStack()
STDERR: #6 0x000000ed9032 v8::internal::Zone::DeleteAll()
STDERR: #7 0x0000009f14bb v8::internal::compiler::ZonePool::ReturnZone()
STDERR: #8 0x0000009869fc v8::internal::compiler::PipelineImpl::OptimizeGraph()
STDERR: #9 0x000000986954 v8::internal::compiler::PipelineCompilationJob::ExecuteJobImpl()
STDERR: #10 0x0000008a3306 v8::internal::CompilationJob::ExecuteJob()
STDERR: #11 0x0000008a2048 v8::internal::OptimizingCompileDispatcher::CompileNext()
STDERR: #12 0x0000008a2e92 v8::internal::OptimizingCompileDispatcher::CompileTask::Run()
STDERR: #13 0x00000194b419 base::(anonymous namespace)::WorkerThread::ThreadMain()
STDERR: #14 0x0000019428c5 base::(anonymous namespace)::ThreadFunc()
STDERR: #15 0x7f5500fe8e9a start_thread
STDERR: #16 0x7f54fbf9b36d clone
STDERR: 

Did this work before? No 

Chrome version: 53.0.2785.113  Channel: n/a
OS Version: 
Flash Version: Shockwave Flash 23.0 r0
 
Project Member

Comment 1 by sheriffbot@chromium.org, Sep 19 2016

Labels: Hotlist-Google

Comment 2 by ajha@chromium.org, Sep 20 2016

Components: Blink>JavaScript
Labelling accordingly for V8 team to help in triaging this further.

Comment 3 by heimbuef@google.com, Sep 20 2016

It happens in this CL: https://codereview.chromium.org/2335343007/
and I fixed this issue here: https://codereview.chromium.org/2344153002/

Comment 4 by ajha@chromium.org, Sep 20 2016

Status: Untriaged (was: Unconfirmed)
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 20 2016

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

commit 64e7172160ea40b922cc52259d6d2fe29a2b3882
Author: heimbuef <heimbuef@google.com>
Date: Tue Sep 20 09:21:48 2016

Made g_lazy_worker_pool leaky to enable tasks to start tasks.

Since the WorkerPool has CONTINUE_ON_SHUTDOWN semantics, tasks are
disallowed from using singletons, since these could get null while the
task is still running. Because of that, it is impossible to start tasks
from within a task.

A leaky singleton on the other hand will never get null again and is
allowed to be used from background threads, fixing the issue.

BUG= 648152 

Review-Url: https://codereview.chromium.org/2344153002
Cr-Commit-Position: refs/heads/master@{#419705}

[modify] https://crrev.com/64e7172160ea40b922cc52259d6d2fe29a2b3882/base/threading/worker_pool_posix.cc

Cc: mark@chromium.org jochen@chromium.org
Status: Fixed (was: Untriaged)
Components: -Blink>JavaScript Blink>JavaScript>API

Sign in to add a comment