commit | 67450100254200c8c8c57ad2bee6880c8738dc90 | [log] [tgz] |
---|---|---|
author | Yifei Teng <yifeit@fuchsia.infra.roller.google.com> | Fri Sep 17 21:47:16 2021 +0000 |
committer | Copybara-Service <copybara-worker@google.com> | Fri Sep 17 14:49:59 2021 -0700 |
tree | 614a793c65ce2acb2fd5cd6a833d64d1f6ae535a | |
parent | 89df4bfed564a9e3336301738bf9114fde681019 [diff] |
[roll] Roll fuchsia [fidl][llcpp] Async methods unbind on send errors When a client method call encounters an error, it should lead to binding teardown. We already do this for errors in the receiving path; this CL extends that to cover errors in the sending path as well. This CL started out simple but uncovered two subtle issues: 1. If the teardown is immediately initiated on any error, that could lead to racy discarding of unread messages. The chosen behavior is to drain all messages when the error is peer closed. The full details are explained in a comment block in `llcpp_client_base.cc`. This would be a good case to formalize and validate in a future dynamic binding spec conformance test. 2. The LLCPP client supports both async and sync calls. We would like to make the sync calls initiate teardown on errors too, but that turned out much more tricky because the sync calls use the C++17 guaranteed return value optimization to avoid any copies or moves of the result type. As a result, the code performing the sync call cannot check the result of the call because it is a pr-value built directly on the user's stack. Furthermore, if a sync call drags out long after the client object is destroyed, it may cause use-after-free as it tries to teardown a non-existent client. It's likely still possible to make sync calls in the async client initiate teardown but that could involve more changes. This CL sets the foundation via some refactoring. Original-Fixed: 78989 Original-Reviewed-on: https://fuchsia-review.googlesource.com/c/fuchsia/+/582013 Original-Revision: 79031df703b96d104443bb8b35d48eceedc46fad GitOrigin-RevId: 97ebe033461ba58b1159ac7c3d5de0e4f39a3fce Change-Id: Ife44321a47f115fd505dacbd35d868b1ba7bc1ba
This repository contains Fuchsia's Global Integration manifest files.
All changes should be made to the internal version of this repository. Our infrastructure automatically updates this version when the internal one changes.
Currently all changes must be made by a Google employee. Non-Google employees wishing to make a change can ask for assistance via the IRC channel #fuchsia
on Freenode.
First install Jiri.
Next run:
$ jiri init $ jiri import minimal https://fuchsia.googlesource.com/integration $ jiri update
Third party projects should have their own subdirectory in ./third_party
.