Bug 158756

Summary: Continuous "Reentrancy avoided" error messages in run-webkit-tests if Simulator quits unexpectedly
Product: WebKit Reporter: Aakash Jain <aakash_jain>
Component: Tools / TestsAssignee: Aakash Jain <aakash_jain>
Status: RESOLVED FIXED    
Severity: Normal CC: aakash_jain, ap, commit-queue, glenn, lforschler
Priority: P2    
Version: WebKit Nightly Build   
Hardware: Unspecified   
OS: Unspecified   
See Also: https://bugs.webkit.org/show_bug.cgi?id=152719
Attachments:
Description Flags
Proposed patch
none
Updated patch none

Description Aakash Jain 2016-06-14 14:50:16 PDT
While simulators are booting up, if someone manually kills a simulator (or simulator gets killed for some reason), we notice following continuos error messages in logs:

14:36:13.791 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
14:36:14.875 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
14:36:15.961 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
14:36:17.050 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
14:36:18.137 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
14:36:19.224 12047 Error in checking Simulator boot status.
Could not print domain: 141: Reentrancy avoided
Comment 1 Aakash Jain 2016-06-14 14:51:32 PDT
This happens because the command use to check the Simulator boot status fails, and we keep retrying every second until timeout is hit (default timeout is 5 mins).
Comment 2 Aakash Jain 2016-06-14 15:13:16 PDT
Created attachment 281288 [details]
Proposed patch
Comment 3 Alexey Proskuryakov 2016-06-14 15:31:18 PDT
Comment on attachment 281288 [details]
Proposed patch

View in context: https://bugs.webkit.org/attachment.cgi?id=281288&action=review

> Tools/Scripts/webkitpy/xcode/simulator.py:288
> +                    _log.warn("Error in checking Simulator boot status. Will retry in 1 second.")
> +                    if Simulator.device_state(udid) != Simulator.DeviceState.BOOTED:
> +                        raise RuntimeError('Simuator device quit unexpectedly.')

Can't the "will retry" message be untrue now?
Comment 4 Aakash Jain 2016-06-14 15:34:58 PDT
It is still true. Even if the simulator device is booted, sometimes "xcrun simctl spawan uddid launchctl" command fails for unknown reasons, in that case we do retry after 1 seconds.
Comment 5 Alexey Proskuryakov 2016-06-14 15:51:16 PDT
What if we raise the exception instead of waiting?
Comment 6 Aakash Jain 2016-06-14 15:55:04 PDT
Created attachment 281293 [details]
Updated patch
Comment 7 WebKit Commit Bot 2016-06-14 16:26:34 PDT
Comment on attachment 281293 [details]
Updated patch

Clearing flags on attachment: 281293

Committed r202070: <http://trac.webkit.org/changeset/202070>
Comment 8 WebKit Commit Bot 2016-06-14 16:26:38 PDT
All reviewed patches have been landed.  Closing bug.