SR-1406: Xcode crashing while indexing


(Timothy J. Wood) #1

I’m still hitting https://bugs.swift.org/browse/SR-1406 with the latest Swift 3 snapshot. To try to help track this down, I’ve build a local snapshot with a trimmed down version of `./utils/build-toolchain local.swift` (just removing the stuff that looked test related):

% ./utils/build-script --ios --tvos --watchos --lldb --llbuild --swiftpm --release-debuginfo --build-subdir=buildbot_osx --ios --tvos --watchos --assertions --no-swift-stdlib-assertions -- --lldb-no-debugserver --lldb-use-system-debugserver --lldb-build-type=Release --verbose-build --build-ninja --build-swift-static-stdlib --compiler-vendor=apple '--swift-sdks=OSX;IOS;IOS_SIMULATOR;TVOS;TVOS_SIMULATOR;WATCHOS;WATCHOS_SIMULATOR' --install-swift --install-lldb --install-llbuild --install-swiftpm --install-destdir=/Users/bungi/Source/Swift/swift/swift-nightly-install --darwin-install-extract-symbols --install-symroot=/Users/bungi/Source/Swift/swift/swift-nightly-symroot --install-prefix=/Library/Developer/Toolchains/swift-LOCAL-2016-05-13-a.xctoolchain/usr --reconfigure --installable-package=/Users/bungi/Source/Swift/swift/swift-LOCAL-2016-05-13-a-osx.tar.gz --swift-enable-ast-verifier=0 '--swift-install-components=compiler;clang-builtin-headers;stdlib;sdk-overlay;license;sourcekit-xpc-service;swift-remote-mirror-headers' '--llvm-install-components=libclang;libclang-headers' --installable-package=/Users/bungi/Source/Swift/swift/swift-LOCAL-2016-05-13-a-osx.tar.gz --symbols-package=/Users/bungi/Source/Swift/swift/swift-LOCAL-2016-05-13-a-osx-symbols.tar.gz --darwin-toolchain-bundle-identifier=local.swift.20160513 '--darwin-toolchain-display-name=Local Swift Development Snapshot 2016-05-13' '--darwin-toolchain-display-name-short=Local Swift Development Snapshot' --darwin-toolchain-name=swift-LOCAL-2016-05-13-a --darwin-toolchain-version=swift-LOCAL-2016-05-13-a --darwin-toolchain-alias=Local

Xcode then crashes here:

Thread 13:: Dispatch queue: com.apple.xcode.swift.indexer
0 sourcekitd 0x00000001143eaa50 abort + 32 (Signals.inc:440)
1 sourcekitd 0x00000001143eaa21 __assert_rtn + 81
2 sourcekitd 0x0000000114367fe0 sourcekitd_send_request + 912 (sourcekitd.cpp:186)
3 com.apple.dt.IDELanguageSupportCore 0x000000010f889bc7 -[IDEIndexSwiftDataSource issueSourceKitRequest:requestBlock:responseBlock:] + 235
4 com.apple.dt.IDELanguageSupportCore 0x000000010f88be33 __46-[IDEIndexSwiftDataSource generateDataForJob:]_block_invoke + 479
5 com.apple.dt.DVTFoundation 0x0000000108681667 __DVTDispatchAsync_block_invoke + 293
6 libdispatch.dylib 0x00007fff8e4f593d _dispatch_call_block_and_release + 12
7 libdispatch.dylib 0x00007fff8e4ea40b _dispatch_client_callout + 8
8 libdispatch.dylib 0x00007fff8e4ef03b _dispatch_queue_drain + 754
9 libdispatch.dylib 0x00007fff8e4f5707 _dispatch_queue_invoke + 549
10 libdispatch.dylib 0x00007fff8e4edd53 _dispatch_root_queue_drain + 538
11 libdispatch.dylib 0x00007fff8e4edb00 _dispatch_worker_thread3 + 91
12 libsystem_pthread.dylib 0x00007fff9bb294de _pthread_wqthread + 1129
13 libsystem_pthread.dylib 0x00007fff9bb27341 start_wqthread + 13

This doesn’t seem particularly informative — does anyone have suggestions on extra logging/debug options to help track this down?

-tim