Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SR-10635] Crash post migration to xcode 10.2 #53035

Closed
swift-ci opened this issue May 8, 2019 · 9 comments
Closed

[SR-10635] Crash post migration to xcode 10.2 #53035

swift-ci opened this issue May 8, 2019 · 9 comments

Comments

@swift-ci
Copy link
Collaborator

@swift-ci swift-ci commented May 8, 2019

Previous ID SR-10635
Radar rdar://problem/50858819
Original Reporter sohilr (JIRA User)
Type Bug
Status Resolved
Resolution Done

Attachment: Download

Environment

Crashes on Device only

Additional Detail from JIRA
Votes 0
Component/s Compiler
Labels Bug, 5.0Regression, RunTimeCrash
Assignee @slavapestov
Priority Medium

md5: 7688e6f426119ffdb3f24739144588f6

Issue Description:

We recently migrated to Xcode 10.2.1 from Xcode 10.1 and have started observing crash in libswiftCore.dylib framework. Below are two such stacktraces. We noticed that the crash occurs only for the ipa build via command line. we are unable to reproduce this issue in simulator and can only reproduce it on device.

0 libswiftCore.dylib 0x00000001c15a5c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
1 libswiftCore.dylib 0x00000001c15a5c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
2 libswiftCore.dylib 0x00000001c15a4340 swift_getAssociatedTypeWitness + 176
3 libswiftCore.dylib 0x00000001c14392bc OptionSet.intersection+ 1225404 (_:) + 76
4 MobileApp 0x0000000107531890 protocol witness for SetAlgebra.intersection+ 16717968 (_:) in conformance UIRectEdge + 80
5 libswiftCore.dylib 0x00000001c1439528 OptionSet<>.insert+ 1226024 (_:) + 220
6 MobileApp 0x0000000107531944 protocol witness for SetAlgebra.insert+ 16718148 (_:) in conformance UIRectEdge + 68
7 libswiftCore.dylib 0x00000001c145f390 SetAlgebra.init<A>+ 1381264 (_:) + 568
8 MobileApp 0x0000000108e48cb0 protocol witness for SetAlgebra.init<A>+ 43027632 (_:) in conformance NSStringDrawingOptions + 44
9 libswiftCore.dylib 0x00000001c145f6a0 SetAlgebra<>.init+ 1382048 (arrayLiteral:) + 168



0 libswiftCore.dylib 0x00000001c15a5c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
1 libswiftCore.dylib 0x00000001c15a5c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
2 libswiftCore.dylib 0x00000001c15a4340 swift_getAssociatedTypeWitness + 176
3 libswiftCore.dylib 0x00000001c1436dbc static _SwiftNewtypeWrapper<>._conditionallyBridgeFromObjectiveC+ 1215932 (_:result:) + 76
4 MobileApp 0x00000001076cac60 protocol witness for static _ObjectiveCBridgeable._conditionallyBridgeFromObjectiveC+ 16723040 (_:result:) in conformance UIActivityType + 80
5 libswiftCore.dylib 0x00000001c15904a4 _bridgeNonVerbatimFromObjectiveCConditional<A>+ 2630820 (_:_:_:) + 236
6 libswiftCore.dylib 0x00000001c133c968 _conditionallyBridgeFromObjectiveC<A>+ 190824 (_:_:) + 268
@belkadan
Copy link
Contributor

@belkadan belkadan commented May 8, 2019

@mikeash, @rjmccall, does this sound familiar?

@rjmccall
Copy link
Member

@rjmccall rjmccall commented May 8, 2019

Other than that being a type-demangling path, no, it doesn't. Any sort of message along with the crash?

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented May 8, 2019

Comment by Angelo Di Paolo (JIRA)

Here's a more complete version of the crash from the bug description:
Exception Type:  EXC_BAD_ACCESS (SIGSEGV)
Exception Subtype: KERN_INVALID_ADDRESS at 0x0000000000000000
VM Region Info: 0 is not in any region.  Bytes before following region: 4334977024
      REGION TYPE                      START - END             [ VSIZE] PRT/MAX SHRMOD  REGION DETAIL
      UNUSED SPACE AT START
--->  
      __TEXT                 0000000102628000-0000000102ac0000 [ 4704K] r-x/r-x SM=COW  ...t.app/WalmartTermination Signal: Segmentation fault: 11
Termination Reason: Namespace SIGNAL, Code 0xb
Terminating Process: exc handler [4620]
Triggered by Thread:  0Thread 0 name:  Dispatch queue: com.apple.main-thread
Thread 0 Crashed:
0   libswiftCore.dylib              0x00000001f3d47c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
1   libswiftCore.dylib              0x00000001f3d47c64 swift_getAssociatedTypeWitnessSlowImpl+ 2718820 (swift::MetadataRequest, swift::TargetWitnessTable<swift::InProcess>*, swift::TargetMetadata<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*, swift::TargetProtocolRequirement<swift::InProcess> const*) + 212
2   libswiftCore.dylib              0x00000001f3d46340 swift_getAssociatedTypeWitness + 176
3   libswiftCore.dylib              0x00000001f3bdb2bc OptionSet.intersection+ 1225404 (_:) + 76
4   WalmartCore                     0x00000001052a1c74 protocol witness for SetAlgebra.intersection+ 16784500 (_:) in conformance UIRectEdge + 80
5   libswiftCore.dylib              0x00000001f3bdb528 OptionSet<>.insert+ 1226024 (_:) + 220
6   WalmartCore                     0x00000001052a1d28 protocol witness for SetAlgebra.insert+ 16784680 (_:) in conformance UIRectEdge + 68
7   libswiftCore.dylib              0x00000001f3c01390 SetAlgebra.init<A>+ 1381264 (_:) + 568
8   WalmartCore                     0x0000000106bb7ee0 protocol witness for SetAlgebra.init<A>+ 43089632 (_:) in conformance NSStringDrawingOptions + 44
9   libswiftCore.dylib              0x00000001f3c016a0 SetAlgebra<>.init+ 1382048 (arrayLiteral:) + 168

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented May 8, 2019

Comment by Angelo Di Paolo (JIRA)

Possibility related to this? https://bugs.swift.org/browse/SR-10463

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented May 9, 2019

Comment by Angelo Di Paolo (JIRA)

Also worth noting about the crash in the ticket description: When distributing an archive, if "Rebuild from bitcode" is checked, we don't get a crash in the build. However, if we do not check "rebuild from bitcode", we see the crash.

@swift-ci
Copy link
Collaborator Author

@swift-ci swift-ci commented May 16, 2019

Comment by Sohil Rupani (JIRA)

I have attached additional crash seen in libswiftCore framework. Unlike other crashes, this one is only noticed in iPhone 5, 10.3.3 / 10.2.1

@slavapestov
Copy link
Member

@slavapestov slavapestov commented Jun 14, 2019

Is the crash always at the same point in the program? Is there any way you could share the source or a binary? It looks like findConformingSuperclass() might be returning null. Any ideas, @DougGregor?

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Jun 15, 2019

I'm wondering if it's the runtime bug fixed by

#24759

which hasn't made it into any release yet. The stack trace looks very, very similar.

@DougGregor
Copy link
Member

@DougGregor DougGregor commented Sep 14, 2019

We believe this was fixed in Xcode 11 based on several fixes in that area. Can you confirm whether it is indeed fixed for you? If not, we have more digging to do.

@swift-ci swift-ci transferred this issue from apple/swift-issues Apr 25, 2022
This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants