commit | 3d08642af2e80e7639eaaa6bc7d7a6273507e0ce | [log] [tgz] |
---|---|---|
author | Primiano Tucci <primiano@google.com> | Wed Nov 24 00:07:06 2021 +0000 |
committer | Primiano Tucci <primiano@google.com> | Wed Nov 24 00:07:06 2021 +0000 |
tree | d7c746a7f0bc7b35fcfdaa3c96c3cc702df08794 | |
parent | b1a8ff964be0b54e7cdc47f23f52dc6ba4db92d0 [diff] |
UnixSocket: use poll() for send timeout. SO_SNDTIMEO doesn't behave as expected. In rare cases (if the receiver consumes input very slowly) a sendmsg() can block for longer than the timeout. This behavior can be reproduced reliably on MacOs (see UnixSocketTest.BlockingSendTimeout). On Linux it's harder to repro and seems to require a suspend/resume in the middle of the send. This CL changes the implementation of SendMsgAllPosix(). When the socket is in blocking mode and a timeout is set, we switch to a combination of non-blocking send + poll(). Bug: 193234818 Change-Id: Ic7fc19107d683325589cd336703cddd8ad341a88
Perfetto is a production-grade open-source stack for performance instrumentation and trace analysis. It offers services and libraries and for recording system-level and app-level traces, native + java heap profiling, a library for analyzing traces using SQL and a web-based UI to visualize and explore multi-GB traces.
See https://perfetto.dev/docs or the /docs/ directory for documentation.