ffi+drain: route OCaml diagnostics to logcat and trace apply call sites - #20
Merged
Merged
Conversation
|
I'll fix CI failures and address comments from users with write access. I'll skip comments containing "(aside)".
|
fprintf(stderr) never reaches logcat on Android (zygote redirects stdio), so the previous exception logging was invisible there — switch to __android_log_print under __ANDROID__. The drain's empty-patch trace showed the create-graph resolution never produced an empty patch and Dart went silent after 'finish id=2' — so applySnapshot either blocked inside the FFI call or hung in the backend apply. Add entry/exit debugPrints around the three drain producers' FFI calls and before/after drain applyPatch, so the next run names the hang.
devin-ai-integration
Bot
force-pushed
the
devin/1790294040-ffi-diagnostics
branch
from
September 24, 2026 23:54
d0cb8fe to
23edda0
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Follow-up to the exception-logging fix — the first diagnostic run showed it can't be observed on Android:
fprintf(stderr)in the FFI writes to/dev/nullon Android (zygote redirects app stdio). Switch to__android_log_printunder__ANDROID__(liblog is already linked bybuild-android-native.sh); stderr fallback stays for iOS/desktop.empty patch from dispatch kind=create-graph(benign) thenfinish id=2 ... coreResponse messageChars=2025— and then silence. Noempty patch from applySnapshot, noresolveEffecttrace, and the create-graph sheet stayed open for the whole timeout.ResolveEffectforCreateGraphEffectis what clearscreate_graph_open, and it runs afterapplySnapshot— soapplySnapshoteither blocked inside the FFI call or the backendapplyPatchhung. AdddebugPrintentry/exit aroundapplySnapshot/resolveEffect/applyHostUpdate(including the busy-queue path) andapplying/appliedtraces aroundapplyPatch— the next logcat will show exactly which call stops returning.Failure evidence (main run 36073266693, maestro
device-logcat.txt): Dart isolate produces zero log lines afterfinish id=2; hierarchy still showslayout.graph-create.sheetopen.Note:
tail -400in the failure logcat dump can miss app lines under Maestro's chatter; thedevice-logcat.txtartifact insideandroid-maestro-debughas the complete buffer.Link to Devin session: https://app.devin.ai/sessions/9a91e201984a4d4f96ce3e0f86ac6668
Open in Devin Desktop: https://app.devin.ai/desktop/session/9a91e201984a4d4f96ce3e0f86ac6668?variant=devin
Requested by: @tiensonqin