New issue
Advanced search Search tips

Issue 920794 link

Starred by 1 user

Issue metadata

Status: Untriaged
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

Cronet native should report errors when there are UrlRequests during and after shutdown.

Project Member Reported by carai...@chromium.org, Jan 10

Issue description

I noticed that in Java, if the API consumer tries to create a URL request after the engine is shutdown, they get a nice exception with message [1], but we'll segfault in the native API instead here [2].

Maybe we should report an error code for the native API too?

[1] https://cs.chromium.org/chromium/src/components/cronet/android/java/src/org/chromium/net/impl/CronetUrlRequestContext.java?l=534&rcl=fc778ec243c6efd3f402672f432717bc287c9dfb
[2] https://cs.chromium.org/chromium/src/components/cronet/cronet_url_request.cc?l=69&rcl=6e48f213736da3ac2cf331dfb91af672e5363cc3

-----

We also don't check to see if there are outstanding requests in the native API upon shutdown, it seems [1].

[1] https://cs.chromium.org/chromium/src/components/cronet/native/engine.cc?l=233&rcl=6e48f213736da3ac2cf331dfb91af672e5363cc3

---

That will also likely result in a segv at some point in the future due to freeing the context [1]

[1] https://cs.chromium.org/chromium/src/components/cronet/native/engine.cc?l=257&rcl=f11f6e41c03def6838a6ac32d3976990639413e9
 
Cc: pauljensen@chromium.org mef@chromium.org
Owner: carai...@chromium.org
On related note Java implementation is racy, so native api must better handle scenarios described here: https://groups.google.com/a/chromium.org/forum/?utm_medium=email&utm_source=footer#!msg/net-dev/BM0KgVlyaiE/Di-zk9tIBwAJ

Sign in to add a comment