📜 ⬆️ ⬇️

Bug with GPU and Canvas in Google Chrome under Windows

The other day I worked on an unusual and interesting task. It turned out that our managers on a particular page constantly get the message “Opanka” in Google Chrome. I will say right away that this page is very rich and contains rather heavy components like a photo gallery, a map and a panorama. I could not manage to reproduce this bug, and I am going to talk about what has been done in order to find and neutralize it.

First of all, we figured out in what sequence it was necessary to act in order to get that very “Opanka”. And for this you had to go to our page, and then update it (or return to it later). Everything, open Chrome tab under Windows instantly died.

I made a small isolated example in JSFiddle . Open this link, and after you see the panorama image, refresh the page. I remind you that you should have Windows and Google Chrome (46.0.2490.86).

Then it became clear that the problem manifests itself exclusively under Windows. I work on a Mac, but I have IE virtual machines for all occasions . But even on virtualke this problem did not appear at all. This, by the way, is a very good example of the fact that a virtual machine cannot always fully replace a real machine with real hardware.
')
I started googling to see if anyone had this problem. But in the end, I’ve got to google about how to enable logging mode in Google Chrome in order to better understand what exactly is happening when he shows us “Opanka”. How to do it?

You need to run Google Chrome with the flag:
--enable-logging --v=1 

And then, after the browser crashes, find the chrome_debug.log log in your home directory

They did it all on a Windows machine and began to examine the log:
 [7924:5320:1202/135210:VERBOSE1:policy_loader_win.cc(441)] Reading policy from the registry is enabled. [7924:5320:1202/135210:VERBOSE1:pref_proxy_config_tracker_impl.cc(216)] 03885C38: set chrome proxy config service to 00A097F8 [7924:5320:1202/135210:VERBOSE1:pref_proxy_config_tracker_impl.cc(354)] 03885C38: Done pushing proxy to UpdateProxyConfig [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Google 'Pilot' log [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Google 'Aviator' log [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: DigiCert Log Server [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Google 'Rocketeer' log [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Certly.IO log [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Izenpe log [7924:6044:1202/135210:VERBOSE1:multi_log_ct_verifier.cc(67)] Adding CT log: Symantec log [7924:6044:1202/135210:ERROR:cache_util_win.cc(20)] Unable to move the cache: 5 [7924:6044:1202/135210:ERROR:cache_util.cc(132)] Unable to move cache folder C:\Users\User32\AppData\Local\Google\Chrome\User Data\ShaderCache\GPUCache to C:\Users\User32\AppData\Local\Google\Chrome\User Data\ShaderCache\old_GPUCache_000 [7924:6044:1202/135210:ERROR:cache_creator.cc(132)] Unable to create cache [7924:6044:1202/135210:ERROR:shader_disk_cache.cc(588)] Shader Cache Creation failed: -2 

My attention was attracted, of course, by the last 4 lines. It can be seen that for some unknown reason, the browser could not copy the GPUCache directory. I can not say that I know exactly how Chrome works with the GPU and its cache, but something recently the combination of Windows and the GPU began to fill the edge.

Then by alternately turning off the map and panorama, we managed to establish that the reason was precisely in Street View. Created on this issue Issue in Chromium.

Instead of the total


As you can see from the ticket I created, the problem was fixed in stable version 47, to which Chrome has already been updated. But anyway, I decided to write this post, which may well be useful for developers, at least in terms of the approach to solving the problem. I agree with those who say that it was possible to solve the problem by alternately disconnecting the components. In general, this is exactly what happened, but it is also important to find out whether the problem is a programmer’s mistake or a bug of a certain ecosystem is also important from the point of view of further support of the same component.

Source: https://habr.com/ru/post/272239/


All Articles