New issue
Advanced search Search tips

Issue 739163 link

Starred by 1 user

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: iOS
Pri: 2
Type: Bug

Blocking:
issue 736068



Sign in to add a comment

Random failure of compilation of asset catalog or xib

Project Member Reported by sdefresne@chromium.org, Jul 4 2017

Issue description

Compilation of assets catalog or xib sometime randomly fails with the following error:

2017-07-04 04:59:19.460 ibtoold[23487:41214] CoreSimulator is attempting to unload a stale CoreSimulatorService job.  Existing job (com.apple.CoreSimulator.CoreSimulatorService.179.1.E8ttyeDeVgWK) is from an older version and is being removed to prevent problems.

This is due to the fact that ibtool/actool try to contact a daemon that is of a different version form the one expected by the tool. This usually happen when upgrading version.

One workaround may be to terminate the service before any builds or even before running any of the invocation of ibtool/actool if this is fast enough. Using a named pool for running those tools with a job count of 1 should make this safe.

Command to shutdown the service is:

$ launchctl stop com.apple.CoreSimulator.CoreSimulatorService

justincohen: WDYT?
 
I would expect to see unintended side effects when calling this during a build.  Locally this might mess up people with multiple projects open, or active debug sessions, and I strongly doubt it's slow.

It's possible we could call this before the build runs.

FWIW, Apple said this would be fixed in Xcode 9, but I haven't confirmed that.

Are there specific builders this is hitting, that are shared between mac and ios builds?  Can we stop sharing these builders for the time being as a short term fix, especially if Xcode 9 really fixes this.
actool doesn't even fail here, this is because compile_xcassets is too conservative.

Adding a line for "attempting to unload a stale CoreSimulatorService job" should fix it to compile_xcassests ignore lines should fix this.

I'm not sure why this builder (mostly vm796-m4) has so many stale CoreSimulatorServices.
OK, I'll try to make compile_xcassets.py a bit less conservative.
Owner: sdefresne@chromium.org
Status: Assigned (was: Untriaged)
Components: Build
Blocking: 736068
Status: Started (was: Assigned)
Project Member

Comment 10 by bugdroid1@chromium.org, Jul 6 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/b5820db5ef26d58bcdfe1ce6dcfb77130a8f879a

commit b5820db5ef26d58bcdfe1ce6dcfb77130a8f879a
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Thu Jul 06 20:24:51 2017

Make build/toolchain/mac/compile_xcassets.py less strict.

The script build/toolchain/mac/compile_xcassets.py tries to turn
actool warnings into errors and to discard unrelevant messages
but was too strict causing compilation failures when actool was
just printing informational messages.

Change the script to be less strict and only keep the warnings or
error matching the '.*\.xcassets:.* (error|warning): .*' pattern.

Add unit test that the new function to filter actool output works
as intended.

Bug:  739163 , 736068 
Change-Id: I7a7e2c0765159e50809516c067703b6d59d91a8c
Reviewed-on: https://chromium-review.googlesource.com/561008
Commit-Queue: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Cr-Commit-Position: refs/heads/master@{#484728}
[modify] https://crrev.com/b5820db5ef26d58bcdfe1ce6dcfb77130a8f879a/build/toolchain/mac/compile_xcassets.py
[add] https://crrev.com/b5820db5ef26d58bcdfe1ce6dcfb77130a8f879a/build/toolchain/mac/compile_xcassets_unittests.py

Status: Fixed (was: Started)
Project Member

Comment 12 by bugdroid1@chromium.org, Jul 9 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/c8ddaa9787cdff766f819c402d2dcd6de796fa90

commit c8ddaa9787cdff766f819c402d2dcd6de796fa90
Author: Sylvain Defresne <sdefresne@chromium.org>
Date: Sun Jul 09 21:18:30 2017

Drop less output of actool from compile_xcassets.py.

Change compile_xcassets.py to keep all output in known sections
(except com.apple.actool.compilation-results) as some errors do
not follow the pattern that was used, discarding the compilation
error message.

Bug:  739163 
Change-Id: Ide40508913e5d32111ad9ba2225745d67465023b
Reviewed-on: https://chromium-review.googlesource.com/563298
Reviewed-by: Justin Cohen <justincohen@chromium.org>
Reviewed-by: Dirk Pranke <dpranke@chromium.org>
Commit-Queue: Sylvain Defresne <sdefresne@chromium.org>
Cr-Commit-Position: refs/heads/master@{#485164}
[modify] https://crrev.com/c8ddaa9787cdff766f819c402d2dcd6de796fa90/build/toolchain/mac/compile_xcassets.py
[modify] https://crrev.com/c8ddaa9787cdff766f819c402d2dcd6de796fa90/build/toolchain/mac/compile_xcassets_unittests.py

Sign in to add a comment