Age | Commit message (Collapse) | Author |
|
Bug: 423127919 # this bug error is totally different
than this case. If we hit this case, we would have
gotten a different harder error. However, I found
this while looking at this bug.
Bug: 416734088
Test: binderRpcTest
Flag: EXEMPT bug fix
Change-Id: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
Merged-In: I3e0db452ebeed1a520ffc0181ed3577eb38bea9a
(cherry picked from commit 51ed14eebf5a6b7e0d1d6f5b9c81b01a666b270a)
|
|
This error return is not recoverable.
Bug: 416734088
Test: binderRpcTest
Change-Id: If0b8a8f36f797dcf927bfc2b5ae51e37e915f2f6
Merged-In: If0b8a8f36f797dcf927bfc2b5ae51e37e915f2f6
(cherry picked from commit dddbc115f88d99379ad9e118e551924c84f16e3a)
|
|
We were expecting crashes in these case, but explicitly
shut down. More work needs to be done to ignore transactions
in out of memory conditions.
Bug: 404210068
Bug: 414720799
Bug: 416734088
Test: binderRpcTest
Change-Id: Iaf9a34b4031fb7b9807c962bcc67de8cd9102088
Merged-In: Iaf9a34b4031fb7b9807c962bcc67de8cd9102088
(cherry picked from commit cba4e3642a8a58d54481ed4c14f179bcc7f9ae70)
|
|
One of the RPC Binder usecases requires a larger transaction limit. This
change increases the limit, and it unifies the 'too large transaction'
logging from regular and RPC binder. This hopefully makes it more clear
why there is a limit there, we want to keep code compatible between the
two transports.
A test is added to show the current behavior. When a transaction which
is sent is too large, the server closes the session. This is probably
the correct behavior for too large replies, but for too large
transactions, the client could handle these errors.
b/392717039 is filed to investigate inconsistencies raised in the test
more deeply.
Fixes: 392575419
Test: atest binderRpcTest --test-filter="*LargeVector*"
Change-Id: I2eeb08818c10371c7f77a35abee7d4e46bb63d72
|
|
Test: mma
Bug: 302723053
Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
|
|
84b7cff1a7082d32e9043014e57db7b4ed2aa7a0
Test: m
Bug: 302723053
Change-Id: If25bdb65254a4a8ad5afeda7e6ce1eedf422d896
|
|
25c1a3b8543dd1756308424dd65030f90bb7a99f
Test: m
Bug: 302723053
Change-Id: Id9355c10d78d0c55afb49f512b78bb0923fbc4f7
|
|
Test: mma
Bug: 302723053
Change-Id: Ie7c13c324311f600d72bc8ecc4157ad6c46259a0
|
|
Only allow experimental wire protocol when:
- we're on Android
- it's not a release build
This is intended to avoid things in the wild accidentally
freezing the experimental wire protocol. If such a thing
happened, we'd have to stop using the existing experimental
wire protocol version and increment it. Worse though, it
may de facto freeze the experimental version at that time,
or even cause RPC binder to fail in certain cases.
One downside of this is that when we make changes to the
RPC binder wire protocol, that we would no longer be
able to test it. In order to avoid that problem, we could
add another way to enable it at that time. However, to
play things on the safe side, disabling by default
for now.
Fixes: 305983144
Test: binderRpcTest
Change-Id: Ieb23cc11d6f3c5b77545dcfd7621f1464dd98f0f
|
|
Bug: 302723053
Test: mma
Change-Id: Id7f0b1d0a11747a5a61a2550f05d7caaabf339a3
|
|
|
|
Previously this test failed in REL mode and required a
change. This was done so that we made sure to freeze it for
release. Now that we have TARGET_RELEASE, we need to make this
conditional.
Bug: 305786304
Test: binderRpcTest on '-next' configuration
Change-Id: I726c71399c7e469698abc630a006ce089dc4bca8
|
|
Bug: 302723053
Test: mma
Change-Id: I5c7a71a91b7dc95bfa0cd653eabe554bdd3f7812
|
|
Bug: 289151149
Test: binder_rpc_test
Change-Id: I0944e94e52219c6f040c304f50e70a16f5ae25cd
|
|
Add runtime checks, because we only currently check the
defaults.
Fixes: 278946301
Test: binderRpcTest
Change-Id: I119c8c49d5938a9d6f36c29c1bb70732155c6037
|
|
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 Android U
Bug: 266741352
Test: binderRpcWireProtocolTest
Change-Id: Iafa1f49a9f0f536162c59ff44143f05b61e9c9e8
Merged-In: Iafa1f49a9f0f536162c59ff44143f05b61e9c9e8
|
|
This reverts commit 30a96fcc9ef87244469c93c0dea087008dad58fd.
Bug: 271830568
Fixes: 273486801 - also disabled clang-tidy check this is hitting
Test: binderRpcTest
Change-Id: I655cf2c2542b71aaab610cd9cbc5a7d53755178f
|
|
transaction"""
|
|
This reverts commit 655d5710fdb42524376649df0ef9953437479cd6.
Reason for revert: fixed OnewayCallQueuingWithFds
Bug: 259517277
Test: binderRpcTestNoKernel --gtest_filter="*OnewayCallQueueingWithFds*" --gtest_repeat=10 --gtest_break_on_failure
Change-Id: I7c6440232dbed2b1b808de64ddb23a4292c96428
|
|
A few of these have become out of date because
- the exponential backoff lambda was moved
- server shutdown was added on rpcSend failure
Bug: N/A
Test: N/A
Change-Id: I12b5bef169cf2f2e04ad2f9cd709716d307b7b64
|
|
This reverts commit 6aae53692e0a81ae263e25927214e79808cfdb38.
Reason for revert: b/268238590
Bug: 268238590
Test: binderRpcTestNoKernel --gtest_filter="*OnewayCallQueueingWithFds/unix_domain_socket_bootstrap_raw_clientV4026531840_serverV4026531840_no_kernel*" --gtest_repeat=10000 --gtest_break_on_failure
(this change causes tests to flake, reverting for now)
Change-Id: I2dd4e347228791085f3f2534f948839ee27c16b6
|
|
After processing a single async transaction, RpcState previously
returned without flushing the excess Binder references. This
fixes the control flow so that the refs get flushed for any
number of transactions.
Bug: 259517277
Test: trusty_stats_test
Change-Id: I2665f3b0d6120d4d79f46ef5141c9ff5f85fd5b5
|
|
|
|
|
|
Implement ParcelFileDescriptor support in Trusty by
adding support for ancillaryFd to RpcTransportTipcTrusty.
Bug: 242940548
Test: Trusty tests
Change-Id: Ic5602bbf9f239f65489e0f411f89b10907741be3
|
|
If a oneway transaction contained FDs and got queued, we'd drop the FDs
and then the Parcel validation would fail with an error once the
transaction was eventually processed.
Bug: 244484370
Test: m libbinder binderRpcTest && out/host/linux-x86/nativetest64/binderRpcTest/binderRpcTest
Change-Id: I781d851d875d496c8b57e3512f3f89c9911e9f3c
|
|
Compile option to introduce random sleeps in the code to make
certain rare flakes easier to reproduce.
Bug: 244325464
Test: binderRpcTest w/ flake mode on
Change-Id: Ibb78987f6550e0d6ec39b527059bfc517ea04492
|
|
|
|
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
|
|
Previously, when RpcState cleared its state in response to an
error, there were two issues that might happen related to proxy
destruction:
- a BpBinder could have lost its last strong ref on another thread
but not have the destruction reflected in RpcSession yet. This
is the issue causing crashes in the callback test (when the call
is oneway, callback is not oneway, and the call is delayed)
- this code could run the BpBinder destructor if mNodeForBinder is
the last wp<> holder of BpBinder (which has object lifetime weak).
This could cause an issue hypothetically if an attached object
(via attachObject) made binder calls in its destructor. In order
to prevent this, 'binder' is held onto, instead of 'node.sentRef'.
Fixes: 237330627
Test: (running for several minutes)
m binderRpcTest && adb sync && adb shell "while /data/nativetest64/binderRpcTest/binderRpcTest --gtest_filter="*Callbacks*"; do logcat -c; done
Change-Id: I21a702217b0749932d77c3acf11e879ee77dd22b
|
|
This enforces a clearer separation of concerns between the data owner
and the parcel code. It happened to reveal an edge case where FDs are
prematurely closed (tracking a fix in b/239222407).
Test: TH
Bug: 239222407
Change-Id: I54ff0c8e4a8f64afd529092d2038dac40c853371
|
|
|
|
No test becaue this is only reachable by bypassing the binder client
library (i.e. writing non-sense directly to the socket).
Test: binder_rpc_fuzzer
Bug: 238497894
Change-Id: I85ef57df4b8970c35904a5e84e61cb87653a39be
|
|
For better loggings.
Bug: 237330627
Test: binderRpcTest
Change-Id: I65b1f6ed087a5bd6e4de4341f554949e779c8c58
|
|
Bug: 237245600
Test: binderRpcTest
Change-Id: I89ad4e2e50ffd66105f9e31c4a274f9bb8abf34b
|
|
Add a new BINDER_WITH_KERNEL_IPC macro to enable all code that
uses IPCThreadState or ProcessState. This macro is defined for
Android libbinder but left out for non-Android builds.
Bug: 224644083
Test: m
Change-Id: I622757fcc0f9885dbf271c0ffa84c54938d50774
|
|
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
|
|
This is a slight change the to wire protocol. Now out-of-band FDs must
be sent along with the command header bytes.
The code changes exploit that by only using the more complex `recvmsg`
call when reading the command header. Additionally, we explicitly pass
around the list of FDs so that there is no risk of accumulating them.
The same (somewhat ugly) vector type is used everywhere now so that
there is only one allocation to capture the FDs and pass them to the
`Parcel` object.
Test: binderRpcTest
Bug: 185909244
Change-Id: I1f55995ca82338ab9716fb2246c954ac8b16cfe5
|
|
Bug: 185909244
Test: TH
Change-Id: Ic4fc1b1edfe9d69984e785553cd1aaca97a07da3
|
|
The list of object offsets is always empty in this CL. That will change
in follow up CLs when file descriptor support is added.
The size of the parcel data is included in the RpcWireTransaction and
RpcWireReply headers and then the object offsets are written after the
parcel data.
There was no space in RpcWireReply, so we must start a new wire protocol
version. I've added some reserved space to RpcWireReply to match
RpcWireTransaction so that it might be easier to make backwards
compatible changes later.
binderRpcTest on host went from 36 seconds to 2 minutes 24 seconds
because of the added parameterization (x4 the tests => x4 the time).
Bug: 185909244
Test: TH
Change-Id: I0121a42f8b60362e6a6d0294a350255b5f9f5673
|
|
Test: TH
Change-Id: I89eb9d87cd6d306d13b879649d209c6b6abd2494
|
|
We are going to change the size of this struct depending on the protocol
version and that gets messy when there is a flexible array member.
We could remove it from RpcWireTransaction as well, but that is a bigger
change and there is no motivation yet (besides consistency).
This change also happens to optimize out one allocation when the reply
parcel is zero bytes.
Bug: 185909244
Test: TH
Change-Id: I18a5712ba80e7b311b945ef54977b66ffa43e1ca
|
|
|
|
This removes an allocation from the binder RPC calls.
Test: atest binderAllocationLimits
Bug: 230625474
Change-Id: I70ebb4e320323149c3c66809f1077cbf332c07ef
|
|
This frees up some space to add RPC binder specific bookkeeping to
Parcel. `variant` has a size overhead of one pointer, but since there is
at least one pointer worth of fields in each case, it works out as an
overall win. We could probably do it cheaper by using a union and hiding
a bit field somewhere to indicate the active case, but that isn't
necessary yet.
Bug: 185909244
Test: TH
Change-Id: Id53ea0cbfe51b3246e6f9f1f3d9df7c8c193808e
|
|
Test: TH
Change-Id: I01a9edd997095c03a35ceb4d75b3bb6df1863704
|
|
peek uses MSG_PEEK internally which only works with sockets.
This refactors that function into a more specific pollRead()
which works for e.g. pipes and other files.
Bug: 224644083
Test: atest binderRpcTest
Change-Id: I340fa7ee7a7bb2077115fc28835bcadf67db03d9
|
|
Bug: 224644083
Test: m
Change-Id: Id6f981911491d543561b0306b25dd4ef44fa8e5e
|
|
Result<> pulls in over 100k of extra libc++ code on Trusty
so this CL replaces it with status_t as the result type of
RpcTransport::peek().
Bug: 224644083
Test: atest binderRpcTest
Change-Id: Idde111245794dc4afd421f3a723feacc8c3a346e
|