Chrome "Browser" process hangs up

4,383 views
Skip to first unread message

Michael Korn

unread,
Feb 11, 2019, 7:10:07 AM2/11/19
to Chromium-discuss
Hello,

I'm debugging a huge single site application which should run for a long time. Unfortunately, it does not. To investigate this problem I'm using an automatic long time click test. This test was run on Windows 7 and chrome 71.0.3578.98.
  • There are three chrome.exe processes (GPU, "Browser", Application-Tab)
  • The memory size of all three processes increases over time
    • smooth, <<1 MB/hour
    • The increase for the "Browser" process seems linear
After >9 days automatic testing (and clicking) the "Browser" process hangs up:
  • chrome hangs up
  • "Browser" process uses 100% of one CPU core
  • Windows message window (Process "is not responding")
  • Memory usage of the "Browser" process
    • at the beginning: 76 MB
    • increase linear to 190 MB after 9d 9h running time
    • than jumps from 190 MB to 321 MB
    • remains at 321 while in infinite loop
  • part of the chrome log (log-level=0):
    [4828:4996:0210/202045.153:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202050.155:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202055.157:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202100.159:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202105.161:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202110.163:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202115.165:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202120.167:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202125.169:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202130.171:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:3564:0210/202131.840:ERROR:core.cc(885)] Handle table full
    [4828:3564:0210/202131.840:ERROR:command_buffer_proxy_impl.cc(92)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
    [4828:3564:0210/202131.840:ERROR:gpu_process_transport_factory.cc(967)] Lost UI shared context.
    [4828:4996:0210/202135.173:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202140.175:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202145.177:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202150.179:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202155.181:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202200.183:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202205.185:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202210.187:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202215.189:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
    [4828:4996:0210/202220.191:WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.

At the first moment the error messages seem helpful but I does not how to use them.
What are the possible reasons? Video Memory exhausted? 
Can someone some give me a hint what should I do next?

Thanks a lot
Michael

Jon Perryman

unread,
Feb 11, 2019, 3:16:46 PM2/11/19
to michae...@uni-due.de, Chromium-discuss
" Handle table full" is a very bad thing. Handles are references to resources or objects that are in use. In general, closing a resource or object will free it's handle. I run Gmail for several weeks without exhausting the handle table so it's unlikely to be a chrome error and more likely to be associated with your page (e.g. javascript, extensions or ???).

Resources and objects can be many things. The system uses the handle table to do tasks such as cleanup for the resource or object. An obvious example would be file handles but there are others that are not so obvious.

You could learn how to locate the handle table and find out what type of handle is filling it up. Alternatively, you could use the brute force method and look at your code (or functionality not belonging to you) that generates a handle. Make sure that it is being properly closed or released.

Message: WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig

This message comes from a program that is using a handle. My guess is that a new handle every time the message occurs. At this point, you don't know if this is the handle filling up your handle table. If it is, maybe you have javascript using websockets or some other socket facility. Verify the code closes these objects in a failure / error situation.   

Good luck, Jon.


--
--
Chromium Discussion mailing list: chromium...@chromium.org
View archives, change email options, or unsubscribe:
http://groups.google.com/a/chromium.org/group/chromium-discuss

---
You received this message because you are subscribed to the Google Groups "Chromium-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to chromium-discu...@chromium.org.

Michael Korn

unread,
Feb 20, 2019, 10:35:41 AM2/20/19
to Chromium-discuss, michae...@uni-due.de
Hello Jon,

Thank you very much for your suggestions.
I started a new run 9 days ago and I'm observing the handles with the Microsoft "Process Explorer". However, the number of handles remains stable overall for all Chrome Processes. Should I use an other way to count the handels?
I've observed that the occupied VRAM is going up. In addition, Chrome seems to release unneeded VRame only if it is minimized.

Regards
Michael

Jon Perryman

unread,
Feb 22, 2019, 4:51:31 PM2/22/19
to Michael Korn, Chromium-discuss
Hi Michael,

I'm guessing but the most likely handle table seems to be for IPC (InterProcess Communication) which is thru shared memory. I would not expect shared memory to be placed on a process specific handle table. Error messages telling you something is full (e.g. handle table full) are often because of something looping. 

Diagnosing this thru the handle table will be extremely difficult unless understand how to find the problematic handles. Unless you want to learn about handles and handle tables, you should use other methods.

From experience, the following messages seem to be related but that's a guess on my part..
[WARNING:dns_config_service_win.cc(669)] Failed to read DnsConfig.
[ERROR:core.cc(885)] Handle table full
[ERROR:command_buffer_proxy_impl.cc(92)] ContextResult::kFatalFailure: AllocateAndMapSharedMemory failed
[ERROR:gpu_process_transport_factory.cc(967)] Lost UI shared context.   

The allocate shared memory error could easily be caused by handle table full. You found process related handle tables were not full which would make sense because shared memory is not always specific to a process.The lost shared context probably occurred because shared memory is now failing. This could easily lead to the UI hang, high cpu and storage growth you noted.   

Consider "handle table full". As mentioned before, this appears to be on a common handle table. The most common cause of any type of "full" situation is a loop doing something incorrectly. The most obvious loop is "failed to read dnsconfig". There are many things that use shared memory, so this could just as easily be unrelated to this dnsconfig error message. Only "handle table full" explains all the symptoms you are seeing and I'm just making a wild guess you should try resolving dnsconfig first.

This type of debugging is an art. You need to read between the lines (e.g. assuming dnsconfig error, you only need to watch for this message instead of waiting 9 days). Here are some possible things you can check:
1. Try your app on other windows computers. Maybe have a friend in another company try it on their computer. Does it produce the dnsconfig error? If not, then maybe you have a TCP configuration problem. Maybe you have a registry problem (dnsconfig uses windows registry).
2. Try other apps (e.g. gmail, yahoo mail, ...). Do they produce this error message? If not, maybe you have a problem in your app and need to see where your app is causing this message.
3. Try using chromium debug breakpoints in your app and find the javascript statement generating this error message. 

I personally would be very cautious with symptoms you find after the "lost ui" error message because they could mislead you. If the dnsconfig error message is not your problem, then you could look at things using shared memory or IPC. You are looking for something that is looping and not closing these handles properly. Just remember that it may not be IPC and you might need to look for other possible loops. 

Good luck, Jon.

Michael Korn

unread,
Feb 25, 2019, 10:36:00 AM2/25/19
to Chromium-discuss, michae...@uni-due.de
Hello Jon,

Thanks again. I did some further investigations:
1) Regarding "Failed to read DnsConfig.":
1.1) It comes from Chrome itself. I get this warning without any installed extension, on the Chrome start screen, too.
1.2) The reason is clear: the test machine is in a network without internet and DNS server. (This is how it will be in the productive environment)
2) Unfortunately, I missed another message: "ERROR:gcm_channel_status_request.cc(151)] GCM channel request failed.". At the very beginning it occurs every minute, then every 10 Minutes.
3) The message "Lost UI shared context." did not appear again. I suppose it was produced by by accident.
4) For testing I configured a DNS server and the machine got access to the internet. The messages from 1) and 2) are gone and the log is very clean. I will run the test for 10 days now.

Regards,
Michael

Jon Perryman

unread,
Feb 25, 2019, 1:12:26 PM2/25/19
to Michael Korn, Chromium-discuss
Hi Michael,

I'm guessing that GCM is Google's Cloud Messaging. It would definitely use DNS so it could be one of the causes of dnsconfig error messages. It's deprecated so you should remove everything associated with it. Hopefully it's the only thing using DNS.

"lost ui shared context" was caused by "handle table full". It was for communications to the GPU process which is very critical and why things went so bad. Things were so bad that you would only see this message once.

Regards, Jon.

On Mon, Feb 25, 2019 at 7:36 AM Michael Korn <michae...@uni-due.de> wrote:
Hello Jon,

Reply all
Reply to author
Forward
0 new messages