This is an archive of the discontinued LLVM Phabricator instance.

Clear read_fd_set if EINTR received
ClosedPublic

Authored by emrekultursay on Feb 16 2023, 11:09 PM.

Details

Summary

Leaving bits uncleared set causes callbacks to be triggered even
though there are no events to process. Starting with D131160
we have a callback that makes blocking read calls over pipe which
was causing the lldb-server main loop to become unresponsive / blocked
on Android.

Diff Detail

Event Timeline

emrekultursay created this revision.Feb 16 2023, 11:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 11:09 PM
emrekultursay requested review of this revision.Feb 16 2023, 11:09 PM
Herald added a project: Restricted Project. · View Herald TranscriptFeb 16 2023, 11:09 PM

Fix indentation.

labath accepted this revision.Feb 20 2023, 7:51 AM

Nice catch.

As discussed internally, it would be great if we could remove this android-specific code path (by removing support for OS versions which necessitated it).

This revision is now accepted and ready to land.Feb 20 2023, 7:51 AM

As discussed internally, it would be great if we could remove this android-specific code path (by removing support for OS versions which necessitated it).

For now, Android Studio still requires the ability to debug API levels 16-19. The next time that min API level is bumped up, we can revisit this.

Can you submit the change for me?

This revision was automatically updated to reflect the committed changes.

@emrekultursay, do you think you can get this into the release/16.x branch next? It fixed lldb for us on the Android Termux app.

Sure, you are right that it should be pulled back into release/16.x, and I expect it to apply cleanly. However, I don't know what mechanism should bve used to create cherry-pick changes into release branches on GitHub: (1) this was not a GitHub issue/PR, so I guess I cannot use that mechanism; (2) I can run git cherry-pick myself, and then run arc diff to create a new Phabricator review (with a new D number?) but I don't know if that's the right way, (3) maybe there's some special "arc" commands to create a cherry-pick? (4) any other way?

I looked online and it appears that you nominate a trunk commit by opening a github issue? I am new to this LLVM workflow myself, but here is what appears to be a recent example.

Yes, that is the correct process.