This is an archive of the discontinued LLVM Phabricator instance.

lldbutil: add a retry mechanism for the ios simulator
ClosedPublic

Authored by aprantl on Aug 7 2020, 12:11 PM.

Details

Summary

We've been seeing this failure on green dragon when the system is under high load. Unfortunately this is outside of LLDB's control.

Diff Detail

Event Timeline

aprantl requested review of this revision.Aug 7 2020, 12:11 PM
aprantl created this revision.
JDevlieghere added inline comments.Aug 7 2020, 12:26 PM
lldb/packages/Python/lldbsuite/test/lldbutil.py
826

Why is this necessary? Is there an error case where error.GetCString is not a python string? If so we should probably factor this out in a function and do the if sys.version_info.major == 2: str.decode('utf-8', 'replace') trick instead because otherwise the retry won't kick in.

aprantl added inline comments.Aug 7 2020, 12:31 PM
lldb/packages/Python/lldbsuite/test/lldbutil.py
826

It may be None. So I guess we could write and error.GetCString()? I just didn't want to crash on unexpected input.

aprantl updated this revision to Diff 283995.Aug 7 2020, 12:39 PM

Address review feedback

JDevlieghere accepted this revision.Aug 7 2020, 12:40 PM

LGTM with the comments addressed. Thanks for fixing this!

lldb/packages/Python/lldbsuite/test/lldbutil.py
824

Nit: can we make this a global constant like SIMULATOR_RETRY?

826

Got it, yeah then that should be sufficient.

This revision is now accepted and ready to land.Aug 7 2020, 12:40 PM
This revision was automatically updated to reflect the committed changes.
Herald added a project: Restricted Project. · View Herald TranscriptAug 7 2020, 1:29 PM