Closed atsushieno closed 2 years ago
Almost figured out: when we migrated Kotlin client internals to NativeRemotePluginInstance
class, it has its own JNI glue code that calls ASharedMemory_create()
and mmap()
by its own (because we need audio buffer at client side), whereas those shared memory classes expect them stored within themselves. We should probably have to find the way to not create native buffer at client.
fdsan errors are gone with eb6af71, but aapbarebonepluginsample causes another crash:
Scudo ERROR: corrupted chunk header at address 0xc0fe6730
Fortunately it is 100% reproducible at PluginBuffer::~PluginBuffer()
, at freeing the 8th buffer (i
= 7).
related: https://source.android.com/devices/tech/debug/scudo
All those crashers are gone. I still see Android Studio causing random crashes while debugging, but it seems that Android Studio + LLDB integration itself is super buggy right now and it never happens when I run those apps without debugging.
I can close this issue, but maybe some documentation improvements is desired.
On trying aap-lv2-mda I noticed that some plugins crashes, but it seems dependent on order of tried plugins. It is most likely PluginPreview or something is stale about state.
It is completed as ^.
Current implementation causes fdsan violation which seems due to inconsistent mmap state:
To find out the cause of it, I have been investigating the existing code, noticed that current buffer management is a big mess spaghetti code. Therefore I am refactoring the port fundamentals to make it possible to dynamically determine port configs and allocate shared memory as well as buffers.
On an ongoing change I have merged
PluginSharedMemoryBuffer
intoAAPXSSharedMemoryStore
to unify/simplify some memory management bits in a place, but it is likely bringing in another conflict of interest; AAPXS has be isolated fromaap::PluginHost
implementation. They have to be sorted out and desirably well documented.