swift-llbuild icon indicating copy to clipboard operation
swift-llbuild copied to clipboard

[SR-11750] Xcode crash on workspace loading for every app launch

Open swift-ci opened this issue 6 years ago • 3 comments

Previous ID SR-11750
Radar None
Original Reporter ludo (JIRA User)
Type Bug

Attachment: Download

Additional Detail from JIRA
Votes 0
Component/s llbuild
Labels Bug, Crash, libSwiftPM
Assignee None
Priority Medium

md5: d518b24860e65a53dcb38fd8eea09deb

is duplicated by:

  • SR-12064 Xcode quit unexpectedly while using the libSwiftPM.dylib plug-in

Issue Description:

Xcode keeps crashing while loading my workspace at every app launch after 1 second or less.

Version: 11.2 (15526)

OS Version: Mac OS X 10.15.1 (19B88)

Exception Type:        EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes:       0x0000000000000001, 0x0000000000000000
Exception Note:        EXC_CORPSE_NOTIFY

Termination Signal:    Illegal instruction: 4
Termination Reason:    Namespace SIGNAL, Code 0x4
Terminating Process:   exc handler [6746]

Application Specific Information:
ProductBuildVersion: 11B52
Fatal error: Please file a bug at https://bugs.swift.org with this info -- LLBuildValue: ###dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Did not find a matching key", underlyingError: nil))### ----- ###{"env":{"__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","CA_ASSERT_MAIN_THREAD_TRANSACTIONS":"1","CA_DEBUG_TRANSACTIONS":"1","HOME":"\/Users\/ludovic","LOGNAME":"ludovic","MallocNanoZone":"0","PATH":"\/Applications\/Xcode.app\/Contents\/Developer\/usr\/bin:\/usr\/bin:\/bin:\/usr\/sbin:\/sbin","SHELL":"\/bin\/zsh","SSH_AUTH_SOCK":"\/private\/tmp\/com.apple.launchd.7zhDFX5cdp\/Listeners","TMPDIR":"\/var\/folders\/8z\/kvf8b9ys0fnft8nl8_4xxkx40000gn\/T\/","USER":"ludovic","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"com.apple.dt.Xcode.8304"}}###: file /Library/Caches/com.apple.xbs/Sources/swiftpm/swiftpm-15502/Sources/SPMLLBuild/llbuild.swift, line 232

Thread 22 Crashed:: Dispatch queue: -[IDEExecutionEnvironment initWithWorkspaceArena:] (QOS: UNSPECIFIED)
0   libswiftCore.dylib              0x00007fff6de45e4d specialized _assertionFailure(_:_:file:line:flags:) + 509
1   libswiftCore.dylib              0x00007fff6dc42c09 _assertionFailure(_:_:file:line:flags:) + 25
2   libSwiftPM.dylib                0x0000000126b1e483 LLBuildValue.init(_:) + 707
3   libSwiftPM.dylib                0x0000000126ab6d56 FileInfoRule.isResultValid(_:) + 150
4   libSwiftPM.dylib                0x0000000126b1eb15 protocol witness for Rule.isResultValid(_:) in conformance LLBuildRule + 21
5   com.apple.dt.llbuild            0x0000000126eeda41 0x126edd000 + 68161
6   com.apple.dt.llbuild            0x0000000126eece2c 0x126edd000 + 65068
7   com.apple.dt.llbuild            0x0000000126ee1eb3 std::__1::__function::__func<(anonymous namespace)::CAPIBuildEngineDelegate::lookupRule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(llbuild::core::BuildEngine&, llbuild::core::Rule const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&), std::__1::allocator<(anonymous namespace)::CAPIBuildEngineDelegate::lookupRule(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&)::'lambda'(llbuild::core::BuildEngine&, llbuild::core::Rule const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&)>, bool (llbuild::core::BuildEngine&, llbuild::core::Rule const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&)>::operator()(llbuild::core::BuildEngine&, llbuild::core::Rule const&, std::__1::vector<unsigned char, std::__1::allocator<unsigned char> > const&) + 47
8   com.apple.dt.llbuild            0x0000000126f523c6 (anonymous namespace)::BuildEngineImpl::scanRule((anonymous namespace)::BuildEngineImpl::RuleInfo&) + 208
9   com.apple.dt.llbuild            0x0000000126f4e1f5 llbuild::core::BuildEngine::build(std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> > const&) + 1389
10  com.apple.dt.llbuild            0x0000000126ee15a9 llb_buildengine_build + 153
11  com.apple.dt.llbuild            0x0000000126eec92d 0x126edd000 + 63789
12  libSwiftPM.dylib                0x0000000126b1e049 LLBuildEngine.build<A>(key:) + 281
13  libSwiftPM.dylib                0x0000000126ab9fce specialized ManifestLoader.loadJSONString(path:manifestVersion:packageIdentity:fs:diagnostics:) + 878
14  libSwiftPM.dylib                0x0000000126abb1e5 specialized ManifestLoader.loadFile(path:baseURL:version:manifestVersion:fileSystem:diagnostics:) + 357
15  libSwiftPM.dylib                0x0000000126abbd96 specialized ManifestLoader.load(packagePath:baseURL:version:manifestVersion:fileSystem:diagnostics:) + 358
16  libSwiftPM.dylib                0x0000000126ab494d protocol witness for ManifestLoaderProtocol.load(packagePath:baseURL:version:manifestVersion:fileSystem:diagnostics:) in conformance ManifestLoader + 29
17  libSwiftPM.dylib                0x0000000126ab275c ManifestLoaderProtocol.load(package:baseURL:version:manifestVersion:fileSystem:diagnostics:) + 28
18  libSwiftPM.dylib                0x0000000126ba572e closure #&#8203;1 in Workspace.loadManifest(packagePath:url:version:diagnostics:) + 494
19  libSwiftPM.dylib                0x0000000126bba11d partial apply for closure #&#8203;1 in Workspace.loadManifest(packagePath:url:version:diagnostics:) + 45
20  libSwiftPM.dylib                0x0000000126bc36c9 closure #&#8203;1 in Workspace.loadManifest(packagePath:url:version:diagnostics:)partial apply + 9
21  libSwiftPM.dylib                0x0000000126bba144 partial apply for thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error) + 20
22  libSwiftPM.dylib                0x0000000126bc35d9 thunk for @callee_guaranteed () -> (@owned Manifest, @error @owned Error)partial apply + 9
23  libSwiftPM.dylib                0x0000000126b3cf2a DiagnosticsEngine.wrap<A>(with:_:) + 42
24  libSwiftPM.dylib                0x0000000126bb394a specialized Workspace.loadDependencyManifests(root:diagnostics:) + 3290
25  libSwiftPM.dylib                0x0000000126bb82ac specialized Workspace._resolve(root:forceResolution:extraConstraints:diagnostics:retryOnPackagePathMismatch:) + 316
26  libSwiftPM.dylib                0x0000000126bbcaef specialized Workspace.loadPackageGraph(root:createMultipleTestProducts:createREPLProduct:forceResolvedVersions:diagnostics:) + 143
27  libSwiftPM.dylib                0x0000000126ba3545 Workspace.loadPackageGraph(root:createMultipleTestProducts:createREPLProduct:forceResolvedVersions:diagnostics:) + 21
28  com.apple.dt.SwiftPM            0x00000001268d2118 closure #&#8203;1 in SPMWorkspace.processPackageGraphActionsInBackgroundIfNeeded() + 3688
29  com.apple.dt.IDE.IDESwiftPackageSupport 0x000000011ac3b3cd closure #&#8203;1 in IDESwiftWorkspace.enqueue(_:) + 477
30  com.apple.dt.IDE.IDESwiftPackageSupport 0x000000011ac3efc5 partial apply for closure #&#8203;1 in IDESwiftWorkspace.enqueue(_:) + 37
31  com.apple.dt.IDE.IDESwiftPackageSupport 0x000000011ac3b95c thunk for @escaping @callee_guaranteed (@guaranteed DVTOperation) -> () + 44
32  com.apple.dt.DVTFoundation      0x0000000100c55375 -[DVTOperation main] + 287
33  com.apple.Foundation            0x00007fff39b22d80 __NSOPERATION_IS_INVOKING_MAIN__ + 17
34  com.apple.Foundation            0x00007fff39988524 -[NSOperation start] + 731
35  com.apple.Foundation            0x00007fff39b2318e __NSOPERATIONQUEUE_IS_STARTING_AN_OPERATION__ + 17
36  com.apple.Foundation            0x00007fff399b18e8 __NSOQSchedule_f + 182
37  libdispatch.dylib               0x00007fff6e76a134 _dispatch_block_async_invoke2 + 83
38  libdispatch.dylib               0x00007fff6e75e50e _dispatch_client_callout + 8
39  libdispatch.dylib               0x00007fff6e7606c0 _dispatch_continuation_pop + 414
40  libdispatch.dylib               0x00007fff6e75fdbe _dispatch_async_redirect_invoke + 703
41  libdispatch.dylib               0x00007fff6e76c7e2 _dispatch_root_queue_drain + 326
42  libdispatch.dylib               0x00007fff6e76cf22 _dispatch_worker_thread2 + 92
43  libsystem_pthread.dylib         0x00007fff6e9b76d5 _pthread_wqthread + 220
44  libsystem_pthread.dylib         0x00007fff6e9b757b start_wqthread + 15

swift-ci avatar Nov 10 '19 07:11 swift-ci

@aciidb0mb3r 51146826?

beccadax avatar Nov 11 '19 22:11 beccadax

Comment by Jan Sondergaard (JIRA)

Just experienced in Xcode 11.4 on MacOS 10.15.4.

Version: 11.4 (16134)
Build Info: IDEFrameworks-16134000000000000~38 (11E146)
Responsible: Xcode [1386]

PlugIn Path: /Applications/Xcode.app/Contents/PlugIns/IDESwiftPackageSupport.ideplugin/Contents/Frameworks/SwiftPM.framework/Versions/A/Libraries/libSwiftPM.dylib
PlugIn Identifier: libSwiftPM.dylib
PlugIn Version: ??? (16074)

Date/Time: 2020-04-03 19:57:28.674 -0700
OS Version: Mac OS X 10.15.4 (19E266)

Time Awake Since Boot: 670 seconds

System Integrity Protection: enabled

Crashed Thread: 14 Dispatch queue: -[IDEExecutionEnvironment initWithWorkspaceArena:] (QOS: UNSPECIFIED)

Exception Type: EXC_BAD_INSTRUCTION (SIGILL)
Exception Codes: 0x0000000000000001, 0x0000000000000000
Exception Note: EXC_CORPSE_NOTIFY

Termination Signal: Illegal instruction: 4
Termination Reason: Namespace SIGNAL, Code 0x4
Terminating Process: exc handler [1386]

Application Specific Information:
ProductBuildVersion: 11E146
Fatal error: Please file a bug at https://bugs.swift.org with this info – LLBuildValue: ###dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Did not find a matching key", underlyingError: nil))### --— ###{"env":{"__CF_USER_TEXT_ENCODING":"0x1F5:0x0:0x0","CA_ASSERT_MAIN_THREAD_TRANSACTIONS":"1","CA_DEBUG_TRANSACTIONS":"1","DISPLAY":"/private/tmp/com.apple.launchd.sxMtfw6sRh/org.macosforge.xquartz:0","HOME":"/Users/ServicepaliMac","LOGNAME":"ServicepaliMac","MallocNanoZone":"0","PATH":"/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin","SHELL":"/bin/bash","SSH_AUTH_SOCK":"/private/tmp/com.apple.launchd.z7nODsyP8f/Listeners","TMPDIR":"/var/folders/n2/6yvxqttj0jq7yrd5ym6jn_mr0000gn/T/","USER":"ServicepaliMac","XPC_FLAGS":"0x0","XPC_SERVICE_NAME":"com.apple.dt.Xcode.2204"}}###: file /Library/Caches/com.apple.xbs/Sources/swiftpm/swiftpm-16074/Sources/SPMLLBuild/llbuild.swift, line 232

Thread 0:: Dispatch queue: com.apple.main-thread
0 libswiftCore.dylib 0x00007fff6f399ad8 swift_conformsToSwiftProtocolImpl(swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptor<swift::InProcess> const*, llvm::StringRef) + 248
1 libswiftCore.dylib 0x00007fff6f399946 swift_conformsToProtocolImpl(swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptor<swift::InProcess> const*) + 86
2 libswiftCore.dylib 0x00007fff6f3685ea swift::_conformsToProtocol(swift::OpaqueValue const*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolDescriptorRef<swift::InProcess>, swift::TargetWitnessTable<swift::InProcess> const**) + 42
3 libswiftCore.dylib 0x00007fff6f36c2cb _conformsToProtocols(swift::OpaqueValue const*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetExistentialTypeMetadata<swift::InProcess> const*, swift::TargetWitnessTable<swift::InProcess> const**) + 251
4 libswiftCore.dylib 0x00007fff6f36b63e _dynamicCastToExistential(swift::OpaqueValue*, swift::OpaqueValue*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetExistentialTypeMetadata<swift::InProcess> const*, swift::DynamicCastFlags) + 398
5 com.apple.dt.UVModel 0x000000013b3d380a specialized ModelPath.firstAncestor(startingAtParent:matching🙂 + 1050
6 com.apple.dt.UVModel 0x000000013b360995 ParseTree.previewVariableModelPath(modelPath🙂 + 53
7 com.apple.dt.UVModel 0x000000013b360950 ParseTree.previewProviderDeclarationModelPath(modelPath🙂 + 16
8 com.apple.dt.UVKit 0x000000013accb421 EditorCoordinator.selectedPreviewIdentifier(referencedBy🙂 + 1201
9 com.apple.dt.UVKit 0x000000013accae99 closure #6 in EditorCoordinator.init(workspaceDocument🙂 + 105
10 com.apple.dt.UVKit 0x000000013acd692c partial apply for closure #6 in EditorCoordinator.init(workspaceDocument🙂 + 12
11 com.apple.dt.UVKit 0x000000013adba37c closure #1 in SelectionStore.selection(paths:origin🙂 + 12
12 com.apple.dt.UVKit 0x000000013add8c51 partial apply for closure #1 in SelectionStore.selection(paths:origin🙂 + 17
13 com.apple.dt.UVKit 0x000000013add8c9f partial apply for thunk for @callee_guaranteed (@guaranteed ModelPath) -> (@out SelectionItem, @error @owned Error) + 63
14 com.apple.dt.PreviewFoundation 0x000000013b29e9e0 0x13b22b000 + 473568
15 com.apple.dt.UVKit 0x000000013add36fa XcodeSwiftDocumentScene.pullSelectionFromSourceEditor() + 938
16 com.apple.dt.UVKit 0x000000013add3b79 closure #3 in XcodeSwiftDocumentScene.init(editor:host:store:queryManager:didChangeScene:selectionStore:shouldShowCanvas:forceNoThunking🙂 + 1033
17 com.apple.dt.UVKit 0x000000013ae9b371 partial apply for thunk for @escaping @callee_guaranteed () -> () + 17
18 com.apple.dt.PreviewFoundation 0x000000013b2625ae 0x13b22b000 + 226734
19 com.apple.dt.UVKit 0x000000013ae904f4 SourceCodeDocumentStore.publishParseTree() + 3028
20 com.apple.dt.UVKit 0x000000013ae90c13 closure #1 in closure #2 in SourceCodeDocumentStore.updateParseTreeFuture(_:activity🙂 + 243
21 com.apple.dt.PreviewFoundation 0x000000013b246d41 0x13b22b000 + 113985
22 com.apple.dt.PreviewFoundation 0x000000013b24535f 0x13b22b000 + 107359
23 com.apple.dt.PreviewFoundation 0x000000013b245421 0x13b22b000 + 107553
24 com.apple.dt.UVKit 0x000000013ae8c719 thunk for @escaping @callee_guaranteed () -> () + 25
25 libdispatch.dylib 0x00007fff6f9fa6c4 _dispatch_call_block_and_release + 12
26 libdispatch.dylib 0x00007fff6f9fb658 _dispatch_client_callout + 8
27 libdispatch.dylib 0x00007fff6fa06cab _dispatch_main_queue_callback_4CF + 936
28 com.apple.CoreFoundation 0x00007fff35b42041 CFRUNLOOP_IS_SERVICING_THE_MAIN_DISPATCH_QUEUE + 9
29 com.apple.CoreFoundation 0x00007fff35b01e47 __CFRunLoopRun + 2028
30 com.apple.CoreFoundation 0x00007fff35b00ffe CFRunLoopRunSpecific + 462
31 com.apple.HIToolbox 0x00007fff34734abd RunCurrentEventLoopInMode + 292
32 com.apple.HIToolbox 0x00007fff347347d5 ReceiveNextEventCommon + 584
33 com.apple.HIToolbox 0x00007fff34734579 _BlockUntilNextEventMatchingListInModeWithFilter + 64
34 com.apple.AppKit 0x00007fff32d7fc99 _DPSNextEvent + 883
35 com.apple.AppKit 0x00007fff32d7e4e0 -[NSApplication(NSEvent) _nextEventMatchingEventMask:untilDate:inMode:dequeue:] + 1352
36 com.apple.dt.DVTKit 0x00000001068f6153 -[DVTApplication nextEventMatchingMask:untilDate:inMode:dequeue:] + 390
37 com.apple.AppKit 0x00007fff32d701ee -[NSApplication run] + 658
38 com.apple.AppKit 0x00007fff32d41ff6 NSApplicationMain + 777
39 com.apple.dt.Xcode 0x0000000105f6fdd5 main + 741
40 libdyld.dylib 0x00007fff6fa54cc9 start + 1

swift-ci avatar Apr 04 '20 04:04 swift-ci

Comment by Max Chuquimia (JIRA)

Still occurring in Xcode 11.5, crash report attached. Xcode_2020-06-04-112557_IT-C02YT10MLVDV.crash

swift-ci avatar Jun 04 '20 02:06 swift-ci