GetHandleLimit() is always called in prep for "software" memory policy is always created even when using a gpu context will be used |
||
Issue descriptionForked from issue 662450 . Previously, there was no explicit "software" memory policy. Rather, the "no-gpu-context" memory policy would only be set if there was no "context provider" during CompositorOutputSurface::BindToClient(). [content/renderer/gpu/compositor_output_surface.cc]: - if (!context_provider()) { - // Without a GPU context, the memory policy otherwise wouldn't be set. - client->SetMemoryPolicy(cc::ManagedMemoryPolicy( - 128 * 1024 * 1024, - gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, - base::SharedMemory::GetHandleLimit() / 3)); - } This was changed by this patch: aa5c49175702f57438c939a7e4796ff19de4b681 is the first bad commit commit aa5c49175702f57438c939a7e4796ff19de4b681 Author: danakj <danakj@chromium.org> Date: Fri Sep 9 17:28:23 2016 -0700 cc: Remove SetMemoryPolicy from OutputSurface and Display. Review-Url: https://codereview.chromium.org/2321883002 Now we always create explicit "software" memory policy during RenderWidgetCompositor::GenerateLayerTreeSettings(), which does: [content/renderer/gpu/render_widget_compositor.cc]: + settings.software_memory_policy.num_resources_limit = + base::SharedMemory::GetHandleLimit() / 3; This new unconditional call to "GetHandleLimit()" (ie, even when using a gpu context), was generating error messages, since glibc's implementation of getrlimit() actually used the syscall prlimit() which was not whitelisted by the sandbox: getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed This error message has been suppressed by updating the sandbox. However, arguably this extra call to GetHandleLimit() could be removed when taking the GPU context path.
,
Dec 6 2016
There seem to be a lot of these unnecessary getrlimit() calls, though. As an example, here is just a small snippet of UI log from https://feedback.corp.google.com/product/208/neutron?lView=rd&lReport=18468551385: getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/072856:ERROR:message_service.cc(469)] Failed to create native process. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/073041:ERROR:network_metrics_provider.cc(244)] NOTREACHED() hit. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/073856:ERROR:message_service.cc(469)] Failed to create native process. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1:1:1205/074205:ERROR:KeyboardEventManager.cpp(344)] Not implemented reached in static bool blink<IPv6: 3>KeyboardEventManager<IPv6: 35>urrentCapsLockState() getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/074818:ERROR:device_event_log_impl.cc(140)] [07:48:18.561] Network: device_event_log.cc:117 @@@ Slow method: ../../../../../../../home/chrome-bot/chrome_root/src/chromeos/network/network_state_handler.cc:ManagedStateListChanged: 61ms [1237:1237:1205/074818:ERROR:device_event_log_impl.cc(140)] [07:48:18.639] Network: network_state_handler.cc:599 DefaultNetworkPropertyUpdated: GBUS.Error = "out-of-range" [1237:1237:1205/074818:ERROR:device_event_log_impl.cc(140)] [07:48:18.641] Network: network_state_handler.cc:900 Default network in unexpected state: GBUS (/service/11)State: failure [1237:1237:1205/074818:ERROR:device_event_log_impl.cc(140)] [07:48:18.665] Network: network_state_handler.cc:599 NetworkPropertyUpdated: GBUS.Error = "Unknown" [1237:1237:1205/074818:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074818:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/074820:ERROR:device_event_log_impl.cc(140)] [07:48:20.249] Network: network_state_handler.cc:599 NetworkPropertyUpdated: GBUS.Error = "out-of-range" [1237:1237:1205/074820:ERROR:device_event_log_impl.cc(140)] [07:48:20.266] Network: network_state_handler.cc:599 NetworkPropertyUpdated: GBUS.Error = "Unknown" [1237:1449:1205/074821:ERROR:connection_factory_impl.cc(367)] Failed to connect to MCS endpoint with error -131 [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. [1237:1237:1205/074826:ERROR:arc_net_host_impl.cc(61)] NOTREACHED() hit. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed [1237:1237:1205/075018:ERROR:event_rewriter.cc(418)] Device ID 1 is unknown. [1237:1237:1205/075018:ERROR:event_rewriter.cc(418)] Device ID 1 is unknown. [1237:1237:1205/075018:ERROR:event_rewriter.cc(418)] Device ID 1 is unknown. [1237:1237:1205/075018:ERROR:event_rewriter.cc(418)] Device ID 1 is unknown. [1237:1237:1205/075018:ERROR:event_rewriter.cc(418)] Device ID 1 is unknown. getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed getrlimit(RLIMIT_NOFILE) failed
,
Dec 6 2016
It'd happen once per page. In what way is it a problem exactly? It's not like that is a slow syscall or anything, is it?
,
Feb 7 2017
Moving old issues out of Internal>Graphics to delete this obsolete component ( crbug.com/685425 for details) |
||
►
Sign in to add a comment |
||
Comment 1 by piman@chromium.org
, Nov 28 2016