Description
Previous ID | SR-16046 |
Radar | None |
Original Reporter | @buttaface |
Type | Bug |
Environment
Built on Ubuntu 20.04 x86_64, runs on Android 12 AArch64 in AArch32 mode
Additional Detail from JIRA
Votes | 0 |
Component/s | Standard Library |
Labels | Bug |
Assignee | None |
Priority | Medium |
md5: 93ad93ca919af1f8e8fec1e4c8d8de9c
Issue Description:
I'm unable to reproduce when cross-compiling the same NIO trunk commit aa631d3 with Swift 5.5.3, suggesting this is a recent regression. This is the stack trace for the failing test testSendmmsgLotsOfData()
, from a stock lldb without Swift support that runs on Android:
(lldb) bt
thread Debug Info: Don't reset the debug scope after leaving the outermost s… #6, name = 'NIO-ELT-0-#0', stop reason = signal SIGSEGV: address access protected (fault address: 0xf2fbbffc)
frame #0: 0xf510933c libswiftCore.so`getCache(swift::TargetTypeContextDescriptor<swift::InProcess> const&) + 128
frame Redundant Load Elimination Patches #1: 0xf51094dc libswiftCore.so`_swift_getGenericMetadata(swift::MetadataRequest, void const* const*, swift::TargetTypeContextDescriptor<swift::InProcess> const*) + 32
frame Remove unnecessaryunsafeUnwrap
calls. #2: 0xf50e8e2c libswiftCore.so`__swift_instantiateGenericMetadata + 32
frame Initial implementation of a @_cdecl attribute to export top-level functions to C #3: 0xf4e20ef4 libswiftCore.so`$sSqMa + 24
frame install Foundation via the ninja script and add the test phase for Foundation #4: 0x00bd7890 swift-nioPackageTests.xctest`$s7NIOCore14CircularBufferV4maskSivg at CircularBuffer.swift:30:29
frame Only run bindings-build-record on OS X due to test flakiness on Liunx… #5: 0x00bd7a0c swift-nioPackageTests.xctest`$s7NIOCore14CircularBufferV13indexAdvanced0D02byS2i_SitF at CircularBuffer.swift:55:37
frame Debug Info: Don't reset the debug scope after leaving the outermost s… #6: 0x00be1294 swift-nioPackageTests.xctest`$s7NIOCore14CircularBufferV16verifyInvariantsSbyF at CircularBuffer.swift:753:26
frame Fix a bug in SILValue's hoistAddressProjections #7: 0x00be0cd8 swift-nioPackageTests.xctest`$s7NIOCore14CircularBufferV15_doubleCapacityyyF at CircularBuffer.swift:357:9
frame Simplify configure pass for Foundation to use a defined variable for XCTest's build directory #8: 0x00bdfe70 swift-nioPackageTests.xctest`$s7NIOCore14CircularBufferV6appendyyxF at CircularBuffer.swift:312:18
frame update related projects list to include Foundation and XCTest #9: 0x00c33040 swift-nioPackageTests.xctest`$s7NIOCore20MarkedCircularBufferV6appendyyxF at MarkedCircularBuffer.swift:38:22
frame Remove the FunctionEnumeration data structure from CalleeAnalysis #10: 0x00f1b5f4 swift-nioPackageTests.xctest`$s8NIOPosix26PendingDatagramWritesState33_DAB463F912477C8697B1F8AEBF8BD15ALLV6appendyyAA0bC5WriteACLLVF at PendingDatagramWritesManager.swift:185:28
frame Alias analysis cleanups #11: 0x00f1eb88 swift-nioPackageTests.xctest`$s8NIOPosix28PendingDatagramWritesManagerC3add8envelope7promiseSb7NIOCore17AddressedEnvelopeVyAG10ByteBufferVG_AG16EventLoopPromiseVyytGSgtF at PendingDatagramWritesManager.swift:423:20
frame Add support to create xctoolchain with code sign #12: 0x00f6b930 swift-nioPackageTests.xctest`$s8NIOPosix15DatagramChannelC18bufferPendingWrite4data7promisey7NIOCore6NIOAnyV_AG16EventLoopPromiseVyytGSgtF at SocketChannel.swift:675:32
frame Use typed boxes to simplify capture representation in SILGen #13: 0x00ec1550 swift-nioPackageTests.xctest`$s8NIOPosix17BaseSocketChannelC6write0_7promisey7NIOCore6NIOAnyV_AF16EventLoopPromiseVyytGSgtF at BaseSocketChannel.swift:670:9
frame Reduce memory footprint of the Swift compiler #14: 0x00eca14c swift-nioPackageTests.xctest`$s8NIOPosix17BaseSocketChannelCyxG7NIOCore0D4CoreAaeFP6write0_7promiseyAE6NIOAnyV_AE16EventLoopPromiseVyytGSgtFTW at <compiler-generated>:0
frame Remove conditional compilation of tvOS #15: 0x00bceb14 swift-nioPackageTests.xctest`$s7NIOCore18HeadChannelHandlerC5write7context4data7promiseyAA0cD7ContextC_AA6NIOAnyVAA16EventLoopPromiseVyytGSgtF at ChannelPipeline.swift:1311:38
frame Added a link to Testing.rst in the readme file #16: 0x00bcef20 swift-nioPackageTests.xctest`$s7NIOCore18HeadChannelHandlerCAA01_c8OutboundD0A2aDP5write7context4data7promiseyAA0cD7ContextC_AA6NIOAnyVAA16EventLoopPromiseVyytGSgtFTW at <compiler-generated>:0
frame Fix the license #17: 0x00bca56c swift-nioPackageTests.xctest`$s7NIOCore21ChannelHandlerContextC11invokeWrite33_F5AC316541457BD146E3694279514AA3LL_7promiseyAA6NIOAnyV_AA16EventLoopPromiseVyytGSgtF at ChannelPipeline.swift:1768:29
frame Fix URL for apple/swift-cmark #18: 0x00bca5e0 swift-nioPackageTests.xctest`$s7NIOCore21ChannelHandlerContextC11invokeWrite33_F5AC316541457BD146E3694279514AA3LL_7promiseyAA6NIOAnyV_AA16EventLoopPromiseVyytGSgtF at ChannelPipeline.swift:1770:24
frame Fix typo in docs/ARCOptimization.rst #19: 0x00bc8da8 swift-nioPackageTests.xctest`$s7NIOCore15ChannelPipelineC6write033_F5AC316541457BD146E3694279514AA3LL_7promiseyAA6NIOAnyV_AA16EventLoopPromiseVyytGSgtF at ChannelPipeline.swift:825:30
frame [README] syntax highlighting! #20: 0x00bc8c58 swift-nioPackageTests.xctest`$s7NIOCore15ChannelPipelineC5write_7promiseyAA6NIOAnyV_AA16EventLoopPromiseVyytGSgtF at ChannelPipeline.swift:735:13
frame converted ApiNotes Readme.txt to markdown #21: 0x00bb55a0 swift-nioPackageTests.xctest`$s7NIOCore7ChannelPAAE5write_7promiseyAA6NIOAnyV_AA16EventLoopPromiseVyytGSgtF at Channel.swift:181:18
frame Remove extra / in git commands in README #22: 0x00eca3e4 swift-nioPackageTests.xctest`$s8NIOPosix17BaseSocketChannelCyqd__G7NIOCore0D15OutboundInvokerAaeFP5write_7promiseyAE6NIOAnyV_AE16EventLoopPromiseVyytGSgtFTW at <compiler-generated>:0
frame Fix typo #23: 0x0123af30 swift-nioPackageTests.xctest`$s13NIOPosixTests015DatagramChannelB0C22testSendmmsgLotsOfDatayyKFyycfU_ at DatagramChannelTests.swift:268:35
frame updated spelling mistake of instead #24: 0x00b1619c swift-nioPackageTests.xctest`$ss5Error_pIegzo_ytsAA_pIegrzo_TR at <compiler-generated>:0
frame Fix cmark checkout path #25: 0x012572c8 swift-nioPackageTests.xctest`$ss5Error_pIegzo_ytsAA_pIegrzo_TRTA at <compiler-generated>:0
frame Copy code of conduct from website to repository #26: 0x00bff250 swift-nioPackageTests.xctest`$s7NIOCore9EventLoopPAAE6submityAA0bC6FutureCyqd_GqdyKclFyycfU at EventLoop.swift:559:37
frame Fix tiny typo #27: 0x00c0280c swift-nioPackageTests.xctest`$s7NIOCore9EventLoopPAAE6submityAA0bC6FutureCyqd_Gqd_yKclFyycfU_TA at <compiler-generated>:0
frame Spelling fix #28: 0x00f42364 swift-nioPackageTests.xctest`$s8NIOPosix19SelectableEventLoopC3runyyKFyyXEfU2_ at SelectableEventLoop.swift:523:30
frame Use https instead of git@ for cloning instructions #29: 0x00b10b28 swift-nioPackageTests.xctest`$ss5Error_pIgzo_ytsAA_pIegrzo_TR at <compiler-generated>:0
frame Fix typo on "committing" #30: 0x00f45d3c swift-nioPackageTests.xctest`$ss5Error_pIgzo_ytsAA_pIegrzo_TRTA.9 at <compiler-generated>:0
frame Simplify obtaining of swift sources #31: 0x00f3b120 swift-nioPackageTests.xctest`$s8NIOPosix19withAutoReleasePoolyxxyKXEKlF at SelectableEventLoop.swift:28:16
frame Fix typo in String.swift documentation #32: 0x00f40500 swift-nioPackageTests.xctest`$s8NIOPosix19SelectableEventLoopC3runyyKF at SelectableEventLoop.swift:522:21
frame comment whitespace #33: 0x00f05ce8 swift-nioPackageTests.xctest`$s8NIOPosix27MultiThreadedEventLoopGroupC06runTheE033_C2B1528F4FBA68A3DBFA89DBAEBE9D4DLL6thread06parentF003candE22BeShutdownIndividually15selectorFactory11initializer_yAA9NIOThreadC_ACSgSbAA8SelectorCyAA15NIORegistrationVGyKcyALcyAA010SelectabledE0CctFZ at MultiThreadedEventLoopGroup.swift:89:22
frame Fixexecution
typo #34: 0x00f06500 swift-nioPackageTests.xctest`$s8NIOPosix27MultiThreadedEventLoopGroupC014setupThreadAnddE033_C2B1528F4FBA68A3DBFA89DBAEBE9D4DLL4name06parentF015selectorFactory11initializerAA010SelectabledE0CSS_AcA8SelectorCyAA15NIORegistrationVGyKcyAA9NIOThreadCctFZyARcfU_ at MultiThreadedEventLoopGroup.swift:110:41
frame Fix Typos #35: 0x00f0c8ec swift-nioPackageTests.xctest`$s8NIOPosix27MultiThreadedEventLoopGroupC014setupThreadAnddE033_C2B1528F4FBA68A3DBFA89DBAEBE9D4DLL4name06parentF015selectorFactory11initializerAA010SelectabledE0CSS_AcA8SelectorCyAA15NIORegistrationVGyKcyAA9NIOThreadCctFZyARcfU_TA at <compiler-generated>:0
frame Fixes langauges/languages typo in www/Philosophies & test/Prototypes/… #36: 0x00f047e8 swift-nioPackageTests.xctest`$s8NIOPosix9NIOThreadCIegg_ACytIegnr_TR at <compiler-generated>:0
frame Fixed Typos in 'Philosophies.rst' #37: 0x00f80ad4 swift-nioPackageTests.xctest`$s8NIOPosix9NIOThreadCIegg_ACytIegnr_TRTA at <compiler-generated>:0
frame Include Markdown LICENSE #38: 0x00f8448c swift-nioPackageTests.xctest`$s8NIOPosix14ThreadOpsPosixO3run6handle4args06detachB0ySiSgz_AA3BoxCyyAA9NIOThreadCc4body_SSSg4nametGSbtFZSvSgAQcfU_ at ThreadPosix.swift:105:13
frame Fixing typo in TypeChecker.rst #39: 0x00f84624 swift-nioPackageTests.xctest`$s8NIOPosix14ThreadOpsPosixO3run6handle4args06detachB0ySiSgz_AA3BoxCyyAA9NIOThreadCc4body_SSSg4nametGSbtFZSvSgAQcfU_To at <compiler-generated>:0
frame Fix 'committing' and 'standard' typos in Testing.rst #40: 0xf44832e8 libc.so`__pthread_start(void*) + 42
frame Fix Typos and spelling #41: 0xf443c064 libc.so`__start_thread + 32
I build the NIO test runner by following the instructions for my Android SDK, all other NIO tests that passed with Swift 5.5.3 also pass with 5.6.
@nate-chandler, maybe you know what's going on with the metadata caching here. @Lukasa, you may want to investigate on watchOS or any other remaining 32-bit ARM platforms and see what's going on.