libchromeos-ui: Increase hard limit of file descriptors to 16384
Increase hard limit of file descriptors to 16384 (default is otherwise 4096).
Native GPU memory buffer requires a FD per texture. Current 2048 hard limit can
be reached in the wild under some circumstances.
Note: it's the amount of 4GB 256x256 textures.
BUG=chromium:629521
TEST=None
Change-Id: I9c41d4147ee7adf2b68b4d01b73300c23b47afb2
Reviewed-on: https://chromium-review.googlesource.com/448356
Commit-Ready: Dongseong Hwang <dongseong.hwang@intel.com>
Tested-by: Dongseong Hwang <dongseong.hwang@intel.com>
Reviewed-by: David Reveman <reveman@chromium.org>
Reviewed-by: Dan Erat <derat@chromium.org>
Reviewed-by: Dongseong Hwang <dongseong.hwang@intel.com>
Reviewed-by: Mike Frysinger <vapier@chromium.org>
diff --git a/libchromeos-ui/chromeos/ui/chromium_command_builder.cc b/libchromeos-ui/chromeos/ui/chromium_command_builder.cc
index 40acaba..ebb5a12 100644
--- a/libchromeos-ui/chromeos/ui/chromium_command_builder.cc
+++ b/libchromeos-ui/chromeos/ui/chromium_command_builder.cc
@@ -210,11 +210,14 @@
base::FilePath(kDefaultZoneinfoPath), time_zone_symlink));
}
- // Increase maximum file descriptors to 2048 (default is otherwise 1024).
+ // Increase soft limit of file descriptors to 2048 (default is 1024).
+ // Increase hard limit of file descriptors to 16384 (default is 4096).
// Some offline websites using IndexedDB are particularly hungry for
// descriptors, so the default is insufficient. See crbug.com/251385.
+ // Native GPU memory buffer requires a FD per texture. See crbug.com/629521.
struct rlimit limit;
- limit.rlim_cur = limit.rlim_max = 2048;
+ limit.rlim_cur = 2048;
+ limit.rlim_max = 16384;
if (setrlimit(RLIMIT_NOFILE, &limit) < 0)
PLOG(ERROR) << "Setting max FDs with setrlimit() failed";