Random crash on iPhone7 with os13.3.1 after a long test run

Hi,
let me try to picture my problem here…
We have setup a Selenium grid with 4 iOS devices connected. On that Mac which connected with 4 iOS devices, we uses Appium 1.16.0.
And we setup a daily Safari webpage test which has about 3 hours long.
They works perfectly without any problem.

Recently we decided to upgrade all these 4 iOS device to 13.3.1. They still worked fine for a week.
But then, our iPhone 7(the oldest device in our hub) showed some random error like:

2020-03-13 06:13:46:596 - [XCUITest] Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

2020-03-13 06:13:46:612 - [iProxy@deb4192c] Error: Connection was refused to port 8202 2020-03-13 06:13:46:596 - [XCUITest] Error getting screenshot: An unknown server-side error occurred while processing the command. Original error: Could not proxy command to remote server. Original error: Error: socket hang up

2020-03-13 06:13:46:612 - [iProxy@deb4192c] Error: Connection was refused to port 8202

when this happened, it would happen more frequently over the time, and finally all test case will fail with this error.

we tried:
-recompile WDA and reinstall on that device
-assign another system port
-reinstall Appium and install latest iProxy
but all fail to solve the problem.

The only way to solve the problem is to restart that iPhone 7, but the problem happens again roughly about every week.

while other 3 iOS device(iPhone8 plus, iPad) do not have any problem.
Can anyone give me a hint for investigation? or simply because the memory usage problem on that iPhone 7?

Thanks.

I would check the device log first, especially for the time period when connection refuse happens. Perhaps it has some more traces of what is happening there

thanks for replying.

I have checked the device log via xcode, but I cannot find anything seems to be useful. except there are some log said there were high cpu usage, but it’s not the time when connection refuse happened.

I have also tried to observe the log via Console, I see something like “mediaserverd -> memory pressure” log when the connection refuse happened.

Yes I know these may not be helpful.

ok… finally it happens again after a week
I noticed that there was a number of crash logs about “lsd” and syncdefaultsd at the time happened.

Process: lsd [20100]
Path: /usr/libexec/lsd
Identifier: lsd
Version: ???
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd [1]
Coalition: com.apple.lsd [123]

Date/Time: 2020-03-20 07:39:34.2626 +0800
Launch Time: 2020-03-20 07:38:30.5484 +0800
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: 7.30.01
Report Version: 104

Exception Type: EXC_CRASH (SIGABRT)
Exception Codes: 0x0000000000000000, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY
Triggered by Thread: 1


Hardware Model: iPhone9,1
Process: syncdefaultsd [4987]
Path: /System/Library/PrivateFrameworks/SyncedDefaults.framework/Support/syncdefaultsd
Identifier: syncdefaultsd
Version: ???
Code Type: ARM-64 (Native)
Role: Unspecified
Parent Process: launchd [1]
Coalition: com.apple.syncdefaultsd [213]

Date/Time: 2020-03-19 06:02:11.1415 +0800
Launch Time: 2020-03-19 06:02:10.0181 +0800
OS Version: iPhone OS 13.3.1 (17D50)
Release Type: User
Baseband Version: 7.30.01
Report Version: 104

Exception Type: EXC_GUARD
Exception Codes: 0x6000000000000012, 0x0000000000000002
Exception Note: SIMULATED (this is NOT a crash)
Termination Reason: LIBSYSTEM, Application Triggered Fault
Triggered by Thread: 2