| Commit message (Collapse) | Author | Age | Files | Lines |
| |
|
|
|
|
| |
Test: mma
Bug: 302723053
Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
|
| |
|
|
|
|
| |
Test: mma
Bug: 302723053
Change-Id: I744bdfe735624ad9f95a7d448919e7bd2e430098
|
| |
|
|
|
|
|
|
| |
25c1a3b8543dd1756308424dd65030f90bb7a99f
Test: m
Bug: 302723053
Change-Id: Id9355c10d78d0c55afb49f512b78bb0923fbc4f7
|
| |
|
|
|
|
| |
Test: mma
Bug: 302723053
Change-Id: Iea797d6af825d58543ba899f6e712b27e48d859a
|
| |
|
|
|
|
| |
Test: mma
Bug: 302723053
Change-Id: Ie7c13c324311f600d72bc8ecc4157ad6c46259a0
|
| |
|
|
|
|
| |
Bug: 302723053
Test: mma
Change-Id: Id68a10a491e3db7f27ea2cbf843078544bb0ab85
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Revert submission 2780893
Reason for revert: breaking boot tests
Bug: 308214260
Reverted changes: /q/submissionid:2780893
Change-Id: I7a4ee9a45583a8a1d4a33447de55c63e6ce9d42a
|
| |
|
|
|
|
| |
Bug: 302723053
Test: mma
Change-Id: I27226885b8b5e771d675ba2d83d0a2e14551d13e
|
| |\
| |
| |
| | |
into main
|
| | |
| |
| |
| |
| |
| |
| | |
Bug: 302723053
Test: mma in binder folder
Test: aosp/2616196
Change-Id: I73df8fc453df0edf496960853cb0004f1c3a6a43
|
| |/
|
|
|
|
| |
Bug: 302723053
Test: mma
Change-Id: I5c7a71a91b7dc95bfa0cd653eabe554bdd3f7812
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Return an error if you set an invalid protocol
version on an RpcServer.
Previously, this would cause errors later down
the line.
Bug: 278946301
Test: binderRpcTest
Change-Id: Id496f1d39b2a32ce775e585f7690ae59503dc3aa
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
For some reason, I thought we did this - I thought it was
incidental to some other API we used. RPC Binder is an RPC
system, AND ONE WITH SYNCHRONOUS CALLS! It should not hold
these packets.
Bug: 271860373
Test: run inet cases before/after:
binderRpcTest --gtest_filter="*PerSocket/BinderRpc.RepeatBinderNull/inet_socket_tls_clientV0_serverV4026531840_single_threaded_no_kernel*"
before: 0m26.845s
after: 0m12.271s
Change-Id: Ib257b53cd2e4ca19041cdb5fd985be346e3fac5e
|
| |/
|
|
|
|
| |
Fixes: 270374393
Test: N/A
Change-Id: I026a8bb44b6e4f2863fb1971a38b8d67db36cfd8
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
This API is updated to emphasize that it is placing a limit
on the number of connections that will be started corresponding
to threads in a remote pool. These connections won't actually
correspond to threads in the process that this API is called.
Documentation has also been updated to clarify a few questions
from an internal discussion forum.
Fixes: 270374393
Test: binderRpcTest
Change-Id: Ia0d9f0d0f42f58a2c63bf506476b33985f091a34
|
| |\ |
|
| | |
| |
| |
| |
| |
| | |
Bug: N/A
Change-Id: I074cefd859f1967a662bdda71f285a60a4bc3cad
Test: N/A
|
| |/
|
|
|
|
|
|
| |
Instead, add extern C definition in the RpcSession.cpp directly
Bug: 254459965
Test: m libbinder
Change-Id: I093f0952f12d575b4a517314c5dadef5b7125a62
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
RpcSession incoming threads continued to hold an RpcSession
instance after they set the shutdown condition (removing the
associated 1:1 thread connection object from RpcSession's
mConnections object). Since the shutdown condition must
include cleaning up RpcSession, we cannot delay or remove
clearing the associated connections. Instead, a new explicit
shutdown condition is added, which does not restrict the
manipulation of the session object.
Interestingly, this issue was blocking several changes on-and-off
for a few weeks. Though, test hub doesn't show it failing at all. I
couldn't reproduce it locally even with 5 days (24hr/day) and
one of these failing tests running in a tight loop, with builds
running in the background (devinmoore@ reported a local failure
with a build running). I submitted several changes to debug this,
and one of them (that dumped backtraces), should have caught it,
except the race is just too rare.
When we have this situation: a retrospectively benign problem causing
a big failure, the obvious question to ask is, is the test too
brittle? No! If this is the sensitivity at which it finds a bug, we
can hardly imagine an error going unnoticed here. Only if this
situation repeated several times or some of these issues became too
plenty to maintain would I think that we needed to "tone down the
tests".
Finally, how did this get fixed: dump every incStrong backtrace in
RpcSession and investigate all the code that is responsible for
maintaining those sp<>s. Wheeee :)
Bug: 244325464
Test: binderRpcTest
Change-Id: I76ac8f21900d6ce095a1acfb246ca7acf1591e0b
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add support for running RpcBinder over unnamed Unix domain sockets
created by socketpair(). This is useful e.g. between parent/child
processes.
The implementation uses the initial socket pair only to create more
socket pairs for individual connections. This creates a natural mapping
to syscalls used on sockets bound to an address:
socket() socketpair()
bind() n/a (preconnected)
connect() sendmsg()
listen() recvmsg()
Bug: 250685929
Test: atest binderRpcTest
Change-Id: Id4ff3946ddcfefe3592eb1149c61582f7369aa29
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Introducing new APIs in RpcServer and RpcSession to check
polling state of file descriptor. Removing fixed wait time
in binder_rpc_fuzzer.
Test: m binder_rpc_fuzzer &&
$ANDROID_HOST_OUT/fuzz/x86_64/binder_rpc_fuzzer/binder_rpc_fuzzer
Bug: 218518615
Change-Id: Ied82cd9c16514761a489731488924274a17053a6
|
| |
|
|
|
|
|
| |
Test: m
Test: m libbinder binderRpcTest
Bug: 218518615
Change-Id: I822bdb751f68c83e1b10c5fd16c9d8439646b771
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Adding a new struct TransportFd which will contain unique_fd and
polling state of file descriptor. This will be useful in detecting
if all the descriptors are being polled. unique_fd and borrowed_fd
are replaced in these changes.
Test: m
Test: m libbinder binderRpcTest && atest binderRpcTest
Test: trusty/vendor/google/aosp/scripts/build.py --test
"boot-test:com.android.trusty.binder.test" qemu-generic-arm64-test-debug
Bug: 218518615
Change-Id: Id108806b98184582e5d93186b3b1884017c441ea
|
| |/
|
|
|
|
|
|
|
|
|
|
| |
Add a new OS-specific function that creates a new
instance of the default RpcTransportCtxFactory.
This is needed because Android and Trusty have
different default transports: RpcTransportRaw and
RpcTransportTipcTrusty, respectively.
Bug: 230135749
Test: presubmit
Change-Id: I4abd443fe9a08c1fa0cc41dfca7ef1cdb69fe0fb
|
| |
|
|
|
|
|
|
|
|
| |
Clear the mStartedSetup flag in case of error return from
RpcSession::setupClient and its callees so that the setup
can be retried and/or the RpcSession reused.
Bug: 242473043
Test: m
Change-Id: I4fa99ab9eb136756ee7344c73f2b3f57a7412e3f
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Additional outgoing threads in a single-threaded client do not
actually require more threads, so they should be safe to enable.
We check the number of incoming threads per RpcSession instead,
since those create actual OS threads.
Prevents a TOCTTOU issue between calls to setup*Client() and
setMaxIncomingThreads() by adding a new mStartedSetup variable
that is set early during setupClient, and any calls to RpcSession
setters are fatal failures after that point.
Bug: 224644083
Test: atest binderRpcTest*
Change-Id: Id0ce2cda63e781ecfba86180f3c523be9044d408
|
| |
|
|
|
|
|
|
|
|
| |
This requires an incoming thread to be listening to the connection in
order to be notified.
Test: atest binderRpcTest
Test: atest binderRpcTestSingleThreaded
Bug: 182939380
Change-Id: I3746de6e8cff99bb267867c5dc60a6815b19fb92
|
| |
|
|
|
|
|
|
|
|
|
| |
Separate the OS-specific functions setNonBlocking and
getRandomBytes from Utils.cpp into a separate OS-specific
OS.cpp file that other operating systems can override at
build time.
Bug: 224644083
Test: build Trusty
Change-Id: I2703fb81d4370b5f6264556ae57fdddb0573971a
|
| |
|
|
|
|
|
|
|
|
| |
Trusty does not support threading. This adds a build option
to disable mutexes and other threading code from RpcState,
RpcSession, and RpcServer.
Bug: 224644083
Test: build Trusty
Change-Id: Iaa78caca1ddee45be7c2def2755598decc0d4d15
|
| |
|
|
|
|
| |
Bug: 185909244
Test: TH
Change-Id: Ic4fc1b1edfe9d69984e785553cd1aaca97a07da3
|
| |
|
|
|
|
|
|
|
|
| |
Fixes a hanging wait in RpcSession by notifying the condition
variable for available connections immediately after adding a
new outgoing connection.
Bug: 224644083
Test: atest binderRpcTest
Change-Id: I27c81127482859342cb789eaac087f55ae5c16d9
|
| |
|
|
|
|
|
|
|
|
|
| |
RpcServer previously created new RpcSession instances
using the default transport. There is currently no code
in RpcSession that uses that transport for server sessions,
so this patch initializes the transport to nullptr instead.
Bug: 224644083
Test: atest binderRpcTest
Change-Id: Ie9fa8c9c758821614fb161b360a9935955e7e62b
|
| |
|
|
|
|
|
|
| |
This removes an allocation from the binder RPC calls.
Test: atest binderAllocationLimits
Bug: 230625474
Change-Id: I70ebb4e320323149c3c66809f1077cbf332c07ef
|
| |
|
|
|
|
| |
Bug: 224644083
Test: m
Change-Id: Ibfa0535fa09af569f55aa1e6b8d5ff6adb720eb3
|
| |
|
|
|
|
|
|
|
| |
RpcSession uses gettid() to identify the current thread
which is less portable than GetThreadId().
Test: atest binderRpcTest
Bug: 224644083
Change-Id: I0d6020ef41af85c20bb58b89598812f2e790a38b
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Binder RPC code uses the TEMP_FAILURE_RETRY macro which
is defined by the C library on Linux but not on other
operating systems. The utils/Compat.h header defines that
macro if not available. This change includes that header
into RPC code.
Test: m
Bug: 224644083
Change-Id: I2637e5260e258f3b2dfeb99e8ea7187c079550f7
|
| |
|
|
|
|
|
|
| |
If you requested N connections, you'd get N connection objects using the
same socket. Also, some error cases would leak sockets.
Test: CLANG_ANALYZER_CHECKS=1 m tidy-frameworks-native-libs-binder
Change-Id: I46528f952fdfc88d4e49b93499dbfbb39117b069
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
This log used the old 'client' 'server' terminology which in this
context was disambiguated to 'incoming' and 'outcoming' threads,
and it also now says what to do when threads are exhausted.
Note: as you can see from this log, RpcServer still needs a way
to limit the number of outgoing connections that it will create.
Fixes: 220177986
Test: binderRpcTest
Change-Id: Ib4c6bf654acd4a33d054d134ed578b40a976c314
|
| |
|
|
|
|
|
|
|
|
|
|
|
| |
Use std::map instead of KeyedVector (deprecated) in order to avoid
unnecessary (and implicit) initialization of the value type. KeyedVector
does it even when only the key is neeed (e.g. indexOfKey). std::map
doesn't have such a problem.
Bug: 222775179
Test: unset WITH_TIDY; CLANG_ANALYZER_CHECKS=1 make -k
tidy-frameworks-native-libs-binder
Change-Id: I548fc96a34bac9c7135e206983150948dbca57d4
|
| |
|
|
|
|
|
|
|
|
| |
Switch RpcTransportRaw to use sendmsg() and recvmsg() over
iovecs to send data from multiple buffers to avoid having
to copy all data into a single large buffer.
Bug: 202878542
Test: atest binderRpcTest
Change-Id: I8ba7fa815040555503160ae41888a0b0efe9e5d2
|
| |\ |
|
| | |
| |
| |
| |
| |
| |
| | |
There's no Android Runtime in recovery anyways.
Test: builds
Change-Id: Iff202493241932ceb92988580150d6338058bc94
|
| | |
| |
| |
| |
| |
| |
| |
| | |
Another forgotten error.
Bug: 167966510
Test: binderRpcTest
Change-Id: I48adcf428c8ce68fdc5b49d7a0314d043e78e76d
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When multiple clients connect to a server, we need a way to tell these
clients apart. Having a per-client root object is the easiest way to do
this (the alternative, using getCalling* like is used in binder, isn't
so great because it requires global/thread local place, but given that
many RpcSession objects can be created, and these can also be used in
conjunction with kernel binder, it is complicated figuring out exactly
where to call getCalling*).
Bug: 199259751
Test: binderRpcTest
Change-Id: I5727db618b5ea138bfa19e75ed915f6a6991518e
|
| |/
|
|
|
|
|
|
|
|
|
|
|
| |
Similar to the number of incoming threads,
the number of outgoing threads can be limited via
RpcSession::setMaxOutgoingThreads(). If set, only
min(maxOutgoingThreads, remoteMaxThreads) outgoing threads
are instantiated.
Test: binderRpcTest
Bug: 194225767
Change-Id: I15686bae4317d0ced5af999f3a3d21f9a03037e1
|
| |
|
|
|
|
|
|
|
| |
We'll add a separate number for outgoing threads
Bug: 194225767
Test: pass
Change-Id: I7bf178c098adc6359582792a2f1ca1248a336b9f
|
| |
|
|
|
|
|
|
|
| |
Disambiguate name from 'thread state' meaning 'thread local'. This also
allows simplification of other names here.
Bug: N/A
Test: binderRpcTest
Change-Id: Ifd2fb5393a945c5d8a0f7bfd8b459843b1311b54
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previously, there were two ways setup could fail:
- very quickly (e.g. cannot create fd to poll)
- after some delay (e.g. second connectoin messed up)
In either case, 'false' is returned from setup* funtions. However, in
the second case, if setup* is called again, then it would result in an
abort. When connections fail for unrelated reasons, this sometimes
causes aborts in existing tests.
Two alternatives considered:
- switch to factory-type setup, this seems a bit heavy, chiefly because
typically, only one RpcSession is needed, so it is annoying to have to
create a factory and an object.
- disallow setup* from being called multiple times - this breaks some
of our tests, and it adds work to clients.
Bug: 200737956
Test: manual
Change-Id: Ia6a69a7d2ca6c6835844cd9a90c7d24646a83526
|