Rethink ProxyResolverV8TracingImpl threading |
|||
Issue descriptionEach ProxyResolverV8TracingImpl has its own thread, which is created when initially parsing the PAC script. When it was called directly by the network stack, on the IO thread, this made a lot of sense, since it prevented proxy script execution from blocking network traffic, IPCs, etc. However, now the proxy resolver runs in its own service process, do we still get anything out of not running stuff on the main thread? I believe it's currently a dedicated service process, though that may change. Even if we decided each resolver needs its own thread (Or to use one thread for all resolvers, just not the one the service manager is running on), we could still get rid of the hops to that thread, by having mojo calls go directly to that thread. Anyhow, not sure this is worth the effort, just thinking aloud.
,
Nov 7 2017
A mojo service would not need to receive proxy resolution calls on the service thread - it can just create another thread, and run all mojo calls there. So regardless of whether there's one mojo serve thread, or 5 dozen, it doesn't really matter much to whatever decision we make here, just potentially adds a little complexity to startup/shutdown. I hadn't thought at all about hangs. I guess we already kinda have that issue, in that we could keep hanging PAC resolvers around. THey won't hang the service, but will hang all network requests for a context until a new resolver is created, and even then, they'll continue to consume 100% CPU time.
,
Nov 7 2017
,
Nov 7 2017
A hang today will hang all proxy resolutions (since even though we have a thread per ProxyResolverV8TracingImpl, we lock access tot he same v8 isolate). So not a new problem. Only thin I think differs is the expectation of independence when we name things a "service". Hanging is I would say is an orthogonal problem. One approach would be to setup a watchdog timer in-process that terminates execution of the V8 isolate (although have had problems with this messing up v8 state in the past), or suicide the whole process. Or have the caller restart the service if it is unresponsive to requests.
,
Nov 29 2017
,
Nov 30
This issue has been Available for over a year. If it's no longer important or seems unlikely to be fixed, please consider closing it out. If it is important, please re-triage the issue. Sorry for the inconvenience if the bug really should have been left as Available. For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot |
|||
►
Sign in to add a comment |
|||
Comment 1 by eroman@chromium.org
, Nov 7 2017