Age | Commit message (Collapse) | Author |
|
This ensures that getMinSchedulerPolicy and getMinSchedulerPriority are
only called on Linux as they are only defined here.
This replaces some __ANDROID__ ifdef's with BINDER_WITH_KERNEL_IPC.
Change-Id: Idec83bf1715ac3c62ac7a849aa188aa491a19fda
|
|
Few bugs about this over the years, so adding a log for
it.
Bug: 383234630
Test: no logs added on CF boot:
`adb logcat -d | grep "Thread pool configuration"`
Change-Id: I14382ee5d7e9cd56c245eb6d3883e7db14ff935b
|
|
|
|
|
|
Bug: 338097747
Change-Id: Iac340abc7a1a0700148cded9adb0451b8a4eae73
Test: atest BinderLibTest
|
|
The error message was incorrect.
Bugs: me
Change-Id: Ib79d3fd0931016b1686df8be5ad295762a9f1243
Test: N/A
|
|
android_atomic_add uses the STL atomics internally with
`memory_order_release`, so this should be a no-op.
Test: m
Change-Id: Ie63464d9cb607957c0b318e9cb8f778ce1aa6d83
|
|
The race was introduced in https://r.android.com/3107366. Triggering the
race requires calling `getThreadPoolMaxTotalThreadCount` concurrently
with `startThreadPool`, which is a bad practice, but, we shouldn't
crash.
Bug: 355739944
Test: ran https://r.android.com/3207755 test for hours
Change-Id: Iee9a99a213474f5b1a398e703b2af585ece6828f
|
|
... that can be set by other libraries :)
Bug: 354286280
Bug: 199683153
Bug: 352692435
Test: boot
Change-Id: I8b8b9a243336a45af50fffbddcab13808a4a1bdc
|
|
- remove unused ones
- IWYU
- apply preupload lint checks
Bug: 341997808
Test: mma
Change-Id: Ib8eaff3c2587503fd1b529e0b32d73f7a9b2f479
|
|
Bug: 341997808
Test: mma
Change-Id: Ib4d60eeaaac73566cc79d473f6551e9abd20e69a
|
|
|
|
atomic ops are enough for the various count fields, we don't need a
completely consistent view of them.
Bug: 333946800
Test: atest --test-mapping frameworks/native/libs/binder/TEST_MAPPING
Change-Id: I01f55a36f7421e4955e2b0d3a6500b183573d765
|
|
This bug has been eluding me for years. It's so rare,
you never see the logcat. I only see the crash stacks.
I'm going to guess it's FD exhaustion causing this?
But we'll see...
Bug: 197637414
Test: boot
Change-Id: I78533a8de7cfb5edb7226cd6cfeac5b8aa6ffdf0
|
|
Bug: None
Test: build
Change-Id: I7d56bb75c8fe6bb3206855c06959f81335971c4b
Signed-off-by: wangmingming1 <wangmingming1@xiaomi.com>
|
|
Test: mma
Bug: 302723053
Change-Id: I52f14cadb027b3f854946d5315dce3d23aa21b19
|
|
25c1a3b8543dd1756308424dd65030f90bb7a99f
Test: m
Bug: 302723053
Change-Id: Id9355c10d78d0c55afb49f512b78bb0923fbc4f7
|
|
Test: mma
Bug: 302723053
Change-Id: Iea797d6af825d58543ba899f6e712b27e48d859a
|
|
Bug: 302723053
Test: mma
Change-Id: I5b81d5c0b6c7fef7f2216d4010adfa9cf72f9876
|
|
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
|
|
Current String8::string() has two problems: it may suggest it's
returning a std::string and also prevents a drop-in replacement
with std::string.
Bug: 295394788
Test: make checkbuild
Change-Id: I1eb6ddebe3faede57f3e6f046da572a79056125a
|
|
When startThreadPool is called, it spawns a thread which is
not counted as part of the lazy kernel-started threads.
This was discovered in fuzzers, and the test is updated.
Bug: 286237215
Test: binderLibTest
Change-Id: Ib0fa4484576f9d296b8f57f32ae536b17e5c6497
|
|
This was an old userspace ABI, but we've encouraged all
platforms to move to a consistent ABI, regardless of
bitness of the device. This corresponds to a kernel
config option that we started requiring not be set
in Android P.
After this, the build system still needs to have this support
removed.
Bug: 232423610
Test: boot cf
Change-Id: Iff5997f910d86c73bbd6502ec393434d248cdcd5
|
|
We can't return null, because there may be other calls
in the process to ProcessState, but if vndservicemanager
is not installed, we can save a few threads.
Note: due to logs being broken (b/210919187) early in boot,
you may not be able to see logs for this.
Bug: 264617136
Test: check logs, e.g.
02-14 01:31:57.034 3273 3273 E ProcessState: vndservicemanager is not started on this device, you can save resources/threads by not initializing ProcessState with /dev/vndbinder.
Change-Id: Ie91dc4ee302e7a36184e533fb755ce0870e2f546
|
|
Libraries that require the threadpool can check this to make sure the
threadpool has been started before it is needed.
Test: atest binderLibTest
Bug: 261652496
Change-Id: I7505319f162e2789dcc3c41bf1f7535c5c1bb9d9
|
|
These variables might be changed by another thread.
Bug: 233226955
Test: atest binderLibTest
Change-Id: I384f309ed1cc7c062ccc5eaab9f6f6a57142cf7f
|
|
Added thread locks around the update of mKernelStartedThreads
Added hwasan-presubmit to TEST MAPPING
Bug: 233787404
Test: binderLibTest
Change-Id: If8dcd7061c478a3ebbb0414c4fcce2a9bf512563
|
|
|
|
|
|
You can't use binder after forking, so we can drop the FD. The binder
driver doesn't support this (once the FD is open, we would need to
open a new context in the child process). So, the userspace API would
need to handle resetting all state. However, in general, handling this
for multi-threaded processes (because of needing to take all locks by
all libraries used by all threads and restoring state, etc...) is too
complicated to make work in Android.
Bug: 232904068
Test: binderLibTest
Change-Id: I38c354af2c69804a40dc2774086a9ab77d158ede
|
|
The kernel will return an error now when the context
manager tries to increment the 0 handle.
Bug: 166779391
Test: binderLibTest
Change-Id: Iab7af80b491c49c37425e840432d9071f9f36ff4
|
|
thread count."
|
|
Added tests for max total thread count.
Renamed getThreadPoolMaxThreadCount to getThreadPoolMaxTotalThreadCount
which takes into account user joined threads and polling threads.
Test added to check that the current available threads update properly
and do not lock.
Added second test that simulates a deadlock and confirms the deadlock.
Bug: 188834514
Test: binderLibTest
Change-Id: Ia99d95544a38596ec9fc316e623e523b64337bc7
|
|
|
|
No one should be using this, but if they are, we want to know so we
can help them move off of this ABI and then eventually delete this
code.
Bug: 232423610
Test: N/A
Change-Id: If8a8f77393cb2df90d1f04b1aea13e2be79f7b38
|
|
This adds basic support to pull extended error information provided by
the driver via BINDER_GET_EXTENDED_ERROR ioctl. For now, we'll only log
the information upon a failed transaction. However, this data can later
be used to handle error scenarios such as retry strategies.
Bug: 28321379
Test: atest binderLibTest
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: I8aed63cb0d1aa15aa96db4ab8999e300fef1f505
|
|
This reverts commit a643e2dabde445e257dc97e9ce81436497f6b2ee.
Reason for revert: Fixed libvrflinger
Change-Id: I2df02b571b49fe040958ee2c8236605426315d68
|
|
The binder driver exposes the features it supports as individual files
under /dev/binderfs/features/*. This patch adds a method to determine
whether a feature is enabled or not and avoid unnecessary calls to the
driver. In this case, we can skip logging any "oneway spam detection"
failures seen during open_driver() if the ioctl is not supported.
Bug: 191910201
Tested: toggling driver features manually
Signed-off-by: Carlos Llamas <cmllamas@google.com>
Change-Id: Ie8e7315cc1ba8baa9cb03bab1fb3bd7507765c99
|
|
|
|
This reverts commit bc8d5b4830d7fb5afe52f9d8809212babedd72b1.
Reason for revert: breaks libvrflinger build
Change-Id: I767dbf3ed56893ead497184d2204a04156faaa9d
|
|
* changes:
libbinder: Replace deprecated utils/threads.h header
libbinder: Fix PAD_SIZE_UNSAFE
|
|
Replaces the old utils/threads.h with the newer replacement
headers or removes it altogether from some files.
Bug: None
Test: m
Change-Id: Id85ddcb6b647e95a649ca2cd77e9db34c5e77b30
|
|
As requested by perf team, show domain information first.
So, the thread name might look like:
binder:3_4
vndbinder:7_8
Fixes: 220391109
Test: boot, ps -AT
Change-Id: I70d5d15db01887c01e50cf0b6f656d71ff75d045
|
|
Disambiguate /dev/binder and /dev/vndbinder thread names.
Bug: email thread
Test: ps -AT (and see important parts in comm)
Change-Id: I898eeb091dba08bb37ffbf8cd9c03f3a21a53c90
|
|
A different way to do this and needing to support both ways doesn't
seem to make this better.
Fixes: 168900528
Test: N/A
Change-Id: I0f067b6f18a2c47dbc13e00dd692d60bdaf3f639
|
|
Add a log when a service requests to have 0 threads but a threadpool
(with a thread) is still requested to be started). This currently
doesn't get hit on cuttlefish, but by triggering it manually I
can see the log.
Bug: 210145621
Test: trigger API misuse case and check for log
Change-Id: I9113828e10812895802a83017ed8f55e851fa220
|
|
This is a separate CL, since the warning is independently useful, even
if this needs to be reverted.
Fixes: 202289725
Test: binderLibTest
Change-Id: Ifb046f01cee047d1908a69c075a66ecb0bc68a78
|
|
Reasonably common error, when people's programs are crashing, because
libbinder does not support forking (and supporting forking is really
complicated and error prone in multithreaded processes:
pthread_atfork documentation states this
The intent of pthread_atfork() was to provide a mechanism
whereby the application (or a library) could ensure that
mutexes and other process and thread state would be restored
to a consistent state. In practice, this task is generally
too difficult to be practicable.
specifically, in libbinder, we would have to:
- get all of the libbinder-related locks
- make sure the kernel driver can handle forking (or open a new
binder fd by reinstantiating ProcessState)
- (actual difficulty here) make sure we can capture and release
application-specific locks - in a multithreaded process,
anything could be going on
So, we don't want to take on the complexity of supporting it).
Instead now, we install a pthread_atfork handler which marks the
ProcessState as invalid in the child process. If code tries to access
ProcessState after forking, then it will throw an error (future: abort).
Note: forking and then using non-binder things, such as what installd
and vold does, is okay.
Bug: 202289725
Test: boot and check logs (none)
Change-Id: I18638a3190ed2ea23945413c2e5ab15d7094d0b0
|
|
Original change: https://android-review.googlesource.com/c/platform/frameworks/native/+/1825953
Change-Id: Ibf6c5ced4bc9d9822308c4ab4e370e7290753c39
|