New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 767472 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Sep 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 3
Type: Bug



Sign in to add a comment

ChromeOS leveldb crash on signin (with broken user data dir?)

Project Member Reported by msw@chromium.org, Sep 21 2017

Issue description

ChromeOS leveldb crash on signin (with broken user data dir?)

(1) Build chromeos on linux desktop (ToT @ #503187).
(2) Repeatedly run with --login-manager and an existing --user-data-dir.
(3) Some unknown trigger...
(4) Login to an existing user profile.
Expected: Login works as it normally does.
Actual: Crash on login, happens consistently after the unknown trigger... stack below.

I'll keep the broken --user-data-dir around for a bit if anyone is interested in debugging this.

[40232:40256:0921/091431.548505:FATAL:thread_restrictions.cc(77)] Check failed: false. Waiting is not allowed to be used on this thread to prevent jank and deadlock.  If this task is running inside the TaskScheduler, the TaskRunner used to post it needs to have WithBaseSyncPrimitives() in its TaskTraits.
#0 0x7f960f9e9eec base::debug::StackTrace::StackTrace()
#1 0x7f960fa0fa5c logging::LogMessage::~LogMessage()
#2 0x7f960fa8f95d base::ThreadRestrictions::AssertWaitAllowed()
#3 0x7f960fa65f66 base::ConditionVariable::Wait()
#4 0x55ff98e3b158 leveldb::DBImpl::~DBImpl()
#5 0x55ff98e3b49e leveldb::DBImpl::~DBImpl()
#6 0x55ff98e3a960 leveldb_env::DBTracker::TrackedDBImpl::~TrackedDBImpl()
#7 0x55ff98e3a99e leveldb_env::DBTracker::TrackedDBImpl::~TrackedDBImpl()
#8 0x55ff996ba926 drive::internal::ResourceMetadataStorage::UpgradeOldDB()
#9 0x55ff985b3b66 drive::(anonymous namespace)::InitializeMetadata()
#10 0x55ff980aa446 base::internal::ReturnAsParamAdapter<>()
#11 0x55ff980070cb _ZN4base8internal7InvokerINS0_9BindStateIPFvNS_12OnceCallbackIFNSt3__110unique_ptrINS_5ValueENS4_14default_deleteIS6_EEEEvEEEPS9_EJSB_SC_EEEFvvEE7RunOnceEPNS0_13BindStateBaseE
#12 0x7f960fa85399 base::(anonymous namespace)::PostTaskAndReplyRelay::RunTaskAndPostReply()
#13 0x7f960f9ea77f base::debug::TaskAnnotator::RunTask()
#14 0x7f960fa7a9db base::internal::TaskTracker::RunOrSkipTask()
#15 0x7f960fa7b0b2 base::internal::TaskTrackerPosix::RunOrSkipTask()
#16 0x7f960fa7a11a base::internal::TaskTracker::RunNextTask()
#17 0x7f960fa731c7 base::internal::SchedulerWorker::Thread::ThreadMain()
#18 0x7f960fa850cf base::(anonymous namespace)::ThreadFunc()
#19 0x7f960fb60184 start_thread
#20 0x7f9603b86ffd clone

 

Comment 1 by jsb...@chromium.org, Sep 21 2017

Cc: cmumford@chromium.org
Looks like the task runner used for DB upgrades needs to have WithBaseSyncPrimitives() trait (i.e. what the CHECK says).

From a brief glance at the code the task runner is created at: https://cs.chromium.org/chromium/src/chrome/browser/chromeos/drive/drive_integration_service.cc?sq=package:chromium&l=257 (and invokes the call via https://cs.chromium.org/chromium/src/chrome/browser/chromeos/drive/drive_integration_service.cc?sq=package:chromium&l=508) 

cc: cmumford@ - maybe we should assert the task traits needed for leveldb (MayBlock, WithBaseSyncPrimitives) when leveldb is opened 

hashimoto@ - can you assign to someone that knows the chromeos/drive code?


Owner: hashimoto@chromium.org
Status: Started (was: Untriaged)
Cc: gab@chromium.org
+gab
It seems we've been shipping code which performs Wait() without WithBaseSyncPrimitives() in the task runner's traits since M60.
Does this affect the behavior of release builds?
Do we need to merge the fix to release branches?
Project Member

Comment 5 by bugdroid1@chromium.org, Sep 22 2017

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

commit 008fb813c3afc34d217dbb46aa1dc0ed491f59c3
Author: Ryo Hashimoto <hashimoto@chromium.org>
Date: Fri Sep 22 06:47:47 2017

drive: Add WithBaseSyncPrimitives to the blocking runner's traits

BUG= 767472 

Change-Id: I719ac8f220c55209ae504981aa94873eafdd96ec
Reviewed-on: https://chromium-review.googlesource.com/677997
Reviewed-by: Kazuhiro Inaba <kinaba@chromium.org>
Commit-Queue: Ryo Hashimoto <hashimoto@chromium.org>
Cr-Commit-Position: refs/heads/master@{#503673}
[modify] https://crrev.com/008fb813c3afc34d217dbb46aa1dc0ed491f59c3/chrome/browser/chromeos/drive/drive_integration_service.cc

Comment 6 by jsb...@chromium.org, Sep 22 2017

Thanks! I filed  issue 767649  to track possibly adding trait assertions to the leveldb entry points to catch this earlier/deterministically.

Comment 7 by gab@chromium.org, Sep 22 2017

No merge required: WithBaseSyncPrimitives() is equivalent to MayBlock() as
far as the scheduler goes. The only reason they're different traits is to
make users of waiting APIs think twice because that's not the recommended
paradigm (by it being a requirement to pass debug assertions)

Le ven. 22 sept. 2017 14 h 08, jsbell via monorail <
monorail+v2.2016800091@chromium.org> a écrit :
Status: Fixed (was: Started)
Thanks gab@!
Then I'll close this bug.

Comment 9 by dchan@chromium.org, Jan 22 2018

Status: Archived (was: Fixed)

Comment 10 by dchan@chromium.org, Jan 23 2018

Status: Fixed (was: Archived)

Sign in to add a comment