New issue
Advanced search Search tips

Issue 652557 link

Starred by 1 user

Issue metadata

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



Sign in to add a comment

Assertion failure in HostDiscardableSharedMemoryManager::OnMemoryStateChange()

Project Member Reported by bashi@chromium.org, Oct 4 2016

Issue description

We use the UI thread to run HostDiscardableSharedMemoryManager::OnMemoryStateChange() but it seems that we can't call GetDefaultMemoryLimit() from the UI thread. Not sure why the constructor doesn't have the same issue (maybe constructing HostDiscardableSharedMemoryManager happens before we initialize threading-related TLS)

[27778:27778:1004/113547:FATAL:thread_restrictions.cc(38)] Check failed: false. Function marked as IO-only was called from a thread that disallows I
O!  If this thread really should be allowed to make IO calls, adjust the call to base::ThreadRestrictions::SetIOAllowed() in this thread's startup.
#0 0x7fe4af36667e base::debug::StackTrace::StackTrace()
#1 0x7fe4af3888ab logging::LogMessage::~LogMessage()
#2 0x7fe4af3fcc18 base::ThreadRestrictions::AssertIOAllowed()
#3 0x7fe4af3dbc5d base::SysInfo::AmountOfFreeDiskSpace()
#4 0x7fe4accdf1fe content::(anonymous namespace)::GetDefaultMemoryLimit()
#5 0x7fe4acce08bb content::HostDiscardableSharedMemoryManager::OnMemoryStateChange()

 
Project Member

Comment 1 by bugdroid1@chromium.org, Oct 4 2016

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

commit 738aeed44f1e6f1bdbc3bf2e34eeab91e9726888
Author: bashi <bashi@chromium.org>
Date: Tue Oct 04 04:11:02 2016

HostDiscardableSharedMemoryManager should store the default memory limit

OnMemoryStateChange() callback is invoked on the UI thread but we can't
call GetDefaultMemoryLimit() from the UI thread. Store the default limit
on construction.

BUG= 652557 

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

[modify] https://crrev.com/738aeed44f1e6f1bdbc3bf2e34eeab91e9726888/content/common/host_discardable_shared_memory_manager.cc
[modify] https://crrev.com/738aeed44f1e6f1bdbc3bf2e34eeab91e9726888/content/common/host_discardable_shared_memory_manager.h

Comment 2 by bashi@chromium.org, Oct 7 2016

Status: Fixed (was: Assigned)

Sign in to add a comment