New issue
Advanced search Search tips

Issue 823854 link

Starred by 1 user

Issue metadata

Status: Started
Owner:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

CreateBrowserFileSystemOptions leaks instance of leveldb::Env.

Project Member Reported by cmumford@chromium.org, Mar 20 2018

Issue description

When creating an in-memory Env (for incognito) CreateBrowserFileSystemOptions calls leveldb_chrome::NewMemEnv to allocate an Env, but it is never deleted.

See:
https://cs.chromium.org/chromium/src/content/browser/fileapi/browser_file_system_helper.cc?type=cs&q=CreateFileSystemContext&l=54
 
Project Member

Comment 1 by bugdroid1@chromium.org, Apr 20 2018

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

commit 4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34
Author: Chris Mumford <cmumford@chromium.org>
Date: Fri Apr 20 22:54:57 2018

FileSystemContext now creates and owns its override env.

Moved the leveldb::Env from the FileSystemOptions to the FileSystemContext
class. With this change the FileSystemContext owns the Env and is
responsible for deleting it when no longer needed.

This is the first of two changes to eliminate this memory leak. The second
change is to ensure that FileSystemContext is kept alive until it's
backends are deleted which ensures the Env is no longer used and can be
deleted.

Bug: 823854
Change-Id: Ic2cfc71683e85110774fde91ce0973cd93dd970e
Reviewed-on: https://chromium-review.googlesource.com/971941
Commit-Queue: Chris Mumford <cmumford@chromium.org>
Reviewed-by: Daniel Murphy <dmurph@chromium.org>
Reviewed-by: Hiroki Nakagawa <nhiroki@chromium.org>
Cr-Commit-Position: refs/heads/master@{#552508}
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/chrome/browser/sync_file_system/local/canned_syncable_file_system.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/chrome/browser/sync_file_system/local/canned_syncable_file_system.h
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/content/browser/fileapi/browser_file_system_helper.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/content/browser/fileapi/browser_file_system_helper_unittest.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/blob/blob_registry_impl_unittest.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/file_system_context.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/file_system_context.h
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/file_system_options.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/file_system_options.h
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/plugin_private_file_system_backend.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/plugin_private_file_system_backend.h
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/sandbox_file_system_backend_delegate.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/sandbox_file_system_backend_delegate.h
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/sandbox_file_system_backend_delegate_unittest.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/fileapi/sandbox_file_system_backend_unittest.cc
[modify] https://crrev.com/4f10bd80bd4f9fc7088ed0862a9e145fb8ecef34/storage/browser/test/test_file_system_options.cc

Sign in to add a comment