Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dns: fix defunct fd bug in apple resolver #13641

Merged
merged 9 commits into from
Oct 20, 2020
Merged

dns: fix defunct fd bug in apple resolver #13641

merged 9 commits into from
Oct 20, 2020

Conversation

junr03
Copy link
Member

@junr03 junr03 commented Oct 20, 2020

Commit Message: fix defunct fd bug in apple resolver.
Risk Level: med - necessary fix for apple-based envoy deploys.
Testing: local testing in Envoy Mobile with lifecycle events that force fd failures. This could be better tested if the Apple API was wrapped and replaced in tests to ensure that the AppleDnsResolverImpl code has defensive logic against given API behavior. This could be done in a subsequent PR.

Signed-off-by: Jose Nino jnino@lyft.com

Jose Nino added 4 commits October 19, 2020 16:12
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@junr03
Copy link
Member Author

junr03 commented Oct 20, 2020

This could be done in a subsequent PR.

My and @rebello95's thinking is that we can get this PR merged, and the bug fixed for users of this resolver. And I can work on the (kind of unorthodox) additional unit tests in parallel; I can probably get a rough draft of the PR tomorrow.

ASSERT(events & Event::FileReadyType::Read);
DNSServiceProcessResult(main_sd_ref_);
DNSServiceErrorType error = DNSServiceProcessResult(main_sd_ref_);
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I verified that all other calls to the DNSService API that return DNSServiceErrorType are handled.

fix
Signed-off-by: Jose Nino <jnino@lyft.com>
mattklein123
mattklein123 previously approved these changes Oct 20, 2020
Copy link
Member

@mattklein123 mattklein123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Better tests would be appreciated.

@mattklein123
Copy link
Member

CI failure looks legit.

/wait

Signed-off-by: Jose Nino <jnino@lyft.com>
@junr03
Copy link
Member Author

junr03 commented Oct 20, 2020

/retest

@repokitteh-read-only
Copy link

Retrying Azure Pipelines.
Cannot retry non-completed check: envoy-presubmit (windows docker), please wait.

🐱

Caused by: a #13641 (comment) was created by @junr03.

see: more, trace.

@junr03
Copy link
Member Author

junr03 commented Oct 20, 2020

/retest

@repokitteh-read-only
Copy link

🙀 Error while processing event:

evaluation error
error: function http error: Patch https://dev.azure.com/cncf/4684fb3d-0389-4e0b-8251-221942316e06/_apis/build/builds/54827?retry=true&api-version=5.1: net/http: request canceled (Client.Timeout exceeded while awaiting headers):
 Traceback (most recent call last):
  bootstrap:143: in <toplevel>
  bootstrap:135: in _main
  bootstrap:62: in _call
  bootstrap:15: in _call1
  github.com/envoyproxy/envoy/ci/repokitteh/modules/azure_pipelines.star:40: in _retry
  github.com/envoyproxy/envoy/ci/repokitteh/modules/azure_pipelines.star:9: in _retry_azp
Error: function http error: Patch https://dev.azure.com/cncf/4684fb3d-0389-4e0b-8251-221942316e06/_apis/build/builds/54827?retry=true&api-version=5.1: net/http: request canceled (Client.Timeout exceeded while awaiting headers)
🐱

Caused by: a #13641 (comment) was created by @junr03.

see: more, trace.

Jose Nino added 2 commits October 20, 2020 13:28
Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: Jose Nino <jnino@lyft.com>
@mattklein123 mattklein123 merged commit 071bab8 into envoyproxy:master Oct 20, 2020
junr03 added a commit to envoyproxy/envoy-mobile that referenced this pull request Oct 21, 2020
Description: updates envoy to include: envoyproxy/envoy#13641 which fixes a corner case affecting iOS devices.
Updates envoy mobile code to reflect changes in upstream envoy.

Signed-off-by: Jose Nino <jnino@lyft.com>
mpuncel added a commit to mpuncel/envoy that referenced this pull request Oct 21, 2020
* master: (22 commits)
  ci: various improvements (envoyproxy#13660)
  dns: fix defunct fd bug in apple resolver (envoyproxy#13641)
  build: support ppc64le with wasm (envoyproxy#13657)
  [fuzz] Added random load balancer fuzz (envoyproxy#13400)
  dependencies: compute and check release dates via GitHub API. (envoyproxy#13582)
  mac ci: try ignoring update failure (envoyproxy#13658)
  watchdog: Optimize WatchdogImpl::touch in preparation to more frequent petting of the watchdog. (envoyproxy#13103)
  typos: fix a couple 'enovy' mispellings (envoyproxy#13645)
  lua: Expose stream info downstreamLocalAddress and downstreamDirectRemoteAddress for Lua filter (envoyproxy#13536)
  tap: fix upstream streamed transport socket taps (envoyproxy#13638)
  Revert "delay health checks until transport socket secrets are ready. (envoyproxy#13516)" (envoyproxy#13639)
  Watchdog: use abort action as a default if killing is enabled. (envoyproxy#13523)
  [fuzz] Fixed divide by zero bug (envoyproxy#13545)
  wasm: flip the meaning of the "repository" in envoy_wasm_cc_binary(). (envoyproxy#13621)
  fix: record recovered local address (envoyproxy#13581)
  docs: fix incorrect compressor filter doc (envoyproxy#13611)
  docs: clean up docs for azp migration (envoyproxy#13558)
  wasm: fix building Wasm example. (envoyproxy#13619)
  test: Refactor flood tests into a separate test file (envoyproxy#13556)
  wasm: re-enable tests with precompiled modules. (envoyproxy#13583)
  ...

Signed-off-by: Michael Puncel <mpuncel@squareup.com>
jpsim pushed a commit that referenced this pull request Nov 28, 2022
Description: updates envoy to include: #13641 which fixes a corner case affecting iOS devices.
Updates envoy mobile code to reflect changes in upstream envoy.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
jpsim pushed a commit that referenced this pull request Nov 29, 2022
Description: updates envoy to include: #13641 which fixes a corner case affecting iOS devices.
Updates envoy mobile code to reflect changes in upstream envoy.

Signed-off-by: Jose Nino <jnino@lyft.com>
Signed-off-by: JP Simard <jp@jpsim.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants