vapor / core Goto Github PK
View Code? Open in Web Editor NEW๐ Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
License: MIT License
๐ Utility package containing tools for byte manipulation, Codable, OS APIs, and debugging.
License: MIT License
Currently, LazyFuture is defined as:
public typealias LazyFuture<T> = () -> (Future<T>)
In order to support chaining various NIO/Async functions, it should support throwing:
public typealias LazyFuture<T> = () throws -> (Future<T>)
The Bits
target has a BitsError.swift
file which imports Debugging
, but the target does not have the Debugging
target as a dependency, causing a compiler error.
I am not sure if this is a linux, swift, or core issue.
Core/Process+Execute.swift:163:17: warning: 'launchPath' is deprecated: renamed to 'executableURL'
Core/Process+Execute.swift:167:17: warning: 'launch()' is deprecated: renamed to 'run'
Do not get these warnings in Xcode.
Version 3.9.0 of Core
In
core/Sources/Async/QueueHandler.swift
Line 73 in 92cef89
writeOutputIfEnqueued
calls itself. Unless the compiler can optimize this away as a tail recursion, it could lead to stack overflows if there are very many elements in outputQueue
. (Still unlikely, but not sure if it's worth taking any risks with that.)Using MySQL fluent ... loops on:
func decode<T>(_ type: T.Type) throws -> T where T : Decodable {
let decoder = KeyStringDecoder(codingPath: codingPath, result: result)
return try T(from: decoder)
}
For this class: core/Sources/Core/RFC1123.swift
https://github.com/vapor/core/blob/5f4049900be7eacf4de43aa1240f4eb101c2edb6/Sources/Core/RFC1123.swift
The date format is "EEE',' dd MMM yyyy HH':'mm':'ss 'GMT'".
But in fact, the real date string may be: "Thu, 01-Jan-1970 00:00:01 GMT". For this case, the expires date will be nil.
So, it's better to fit to more corresponding date format.
This causes issues (see vapor/fluent#359)
at least the following tests experience thread unsafety:
AsyncTests.AsyncTests testSyncFlatten
CoreTests.CoreTests testProcessAsyncExecute
CoreTests.CoreTests testProcessExecute
$ swift test --sanitize=thread
[146/146] Linking CorePackageTests
Test Suite 'All tests' started at 2019-09-09 9:48:05.465 pm
Test Suite 'CorePackageTests.xctest' started at 2019-09-09 9:48:05.465 pm
Test Suite 'AsyncTests' started at 2019-09-09 9:48:05.466 pm
Test Case '-[AsyncTests.AsyncTests testFlatten]' started.
Test Case '-[AsyncTests.AsyncTests testFlatten]' passed (0.102 seconds).
Test Case '-[AsyncTests.AsyncTests testFlattenEmpty]' started.
Test Case '-[AsyncTests.AsyncTests testFlattenEmpty]' passed (0.001 seconds).
Test Case '-[AsyncTests.AsyncTests testFlattenFail]' started.
Test Case '-[AsyncTests.AsyncTests testFlattenFail]' passed (0.001 seconds).
Test Case '-[AsyncTests.AsyncTests testFlattenPerformance]' started.
/Users/johannes/extsrc/core/Tests/AsyncTests/AsyncTests.swift:73: Test Case '-[AsyncTests.AsyncTests testFlattenPerformance]' measured [Time, seconds] average: 2.042, relative standard deviation: 9.565%, values: [2.385000, 2.420854, 2.106240, 1.999354, 1.911730, 2.019448, 1.822433, 1.895233, 1.904915, 1.951264], performanceMetricID:com.apple.XCTPerformanceMetric_WallClockTime, baselineName: "", baselineAverage: , maxPercentRegression: 10.000%, maxPercentRelativeStandardDeviation: 10.000%, maxRegression: 0.100, maxStandardDeviation: 0.100
Test Case '-[AsyncTests.AsyncTests testFlattenPerformance]' passed (24.367 seconds).
Test Case '-[AsyncTests.AsyncTests testFlattenStackOverflow]' started.
Test Case '-[AsyncTests.AsyncTests testFlattenStackOverflow]' passed (0.093 seconds).
Test Case '-[AsyncTests.AsyncTests testFlattenStress]' started.
Test Case '-[AsyncTests.AsyncTests testFlattenStress]' passed (18.868 seconds).
Test Case '-[AsyncTests.AsyncTests testSyncFlatten]' started.
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f01758 by thread T5:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#5 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:523904 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:523904 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f01758 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2dd)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:629 (CorePackageTests:x86_64+0x2573b1)
#4 EventLoopFuture.do(_:) Future+DoCatch.swift:14 (CorePackageTests:x86_64+0x4056)
#5 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:18 (CorePackageTests:x86_64+0x5490)
#6 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#7 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#8 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#9 __invoking___ <null>:523904 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f01720 allocated by main thread:
#0 malloc <null>:523936 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:523936 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:89 (CorePackageTests:x86_64+0x258f7)
#7 partial apply for closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26a17)
#8 thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x25fa6)
#9 partial apply for thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x26ac7)
#10 thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5dc3)
#11 partial apply for thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5f0d)
#12 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:18 (CorePackageTests:x86_64+0x530c)
#13 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#14 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#15 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#16 __invoking___ <null>:523936 (CoreFoundation:x86_64h+0x4aa1b)
Thread T5 (tid=826541, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f01760 by thread T5:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#5 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:523904 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:523904 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f01760 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2fb)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:629 (CorePackageTests:x86_64+0x2573b1)
#4 EventLoopFuture.do(_:) Future+DoCatch.swift:14 (CorePackageTests:x86_64+0x4056)
#5 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:18 (CorePackageTests:x86_64+0x5490)
#6 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#7 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#8 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#9 __invoking___ <null>:523904 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f01720 allocated by main thread:
#0 malloc <null>:523936 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:523936 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:89 (CorePackageTests:x86_64+0x258f7)
#7 partial apply for closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26a17)
#8 thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x25fa6)
#9 partial apply for thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x26ac7)
#10 thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5dc3)
#11 partial apply for thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5f0d)
#12 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:18 (CorePackageTests:x86_64+0x530c)
#13 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#14 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#15 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#16 __invoking___ <null>:523936 (CoreFoundation:x86_64h+0x4aa1b)
Thread T5 (tid=826541, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f01768 by thread T5:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x2512b3)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#5 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:523904 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:523904 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f01768 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:59 (CorePackageTests:x86_64+0x24e693)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenFailure(_:) EventLoopFuture.swift:648 (CorePackageTests:x86_64+0x2595ce)
#4 EventLoopFuture.catch(_:) Future+DoCatch.swift:29 (CorePackageTests:x86_64+0x4133)
#5 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:25 (CorePackageTests:x86_64+0x558f)
#6 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#7 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#8 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#9 __invoking___ <null>:523904 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f01720 allocated by main thread:
#0 malloc <null>:523936 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:523936 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:89 (CorePackageTests:x86_64+0x258f7)
#7 partial apply for closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26a17)
#8 thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x25fa6)
#9 partial apply for thunk for @escaping @callee_guaranteed () -> (@owned EventLoopFuture<Int>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x26ac7)
#10 thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5dc3)
#11 partial apply for thunk for @escaping @callee_guaranteed () -> (@out EventLoopFuture<A1>, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x5f0d)
#12 handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:18 (CorePackageTests:x86_64+0x530c)
#13 Collection.syncFlatten<A>(on:) Future+Flatten.swift:34 (CorePackageTests:x86_64+0x4fa8)
#14 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#15 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#16 __invoking___ <null>:523936 (CoreFoundation:x86_64h+0x4aa1b)
Thread T5 (tid=826541, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b140000d4b8 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:23 (CorePackageTests:x86_64+0x5c86)
#5 partial apply for closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) <compiler-generated> (CorePackageTests:x86_64+0x67e1)
#6 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#7 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#8 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#9 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#10 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#11 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#12 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#13 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#14 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#15 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#16 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#17 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#18 __tsan::invoke_and_release_block(void*) <null>:1593392 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#19 _dispatch_client_callout <null>:1593392 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b140000d4b8 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2dd)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#5 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#6 __invoking___ <null>:1593392 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b140000d480 allocated by main thread:
#0 malloc <null>:1593424 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1593424 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 Collection.syncFlatten<A>(on:) Future+Flatten.swift:10 (CorePackageTests:x86_64+0x4a91)
#7 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#8 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#9 __invoking___ <null>:1593424 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b140000d4c0 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:23 (CorePackageTests:x86_64+0x5c86)
#5 partial apply for closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) <compiler-generated> (CorePackageTests:x86_64+0x67e1)
#6 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#7 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#8 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#9 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#10 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#11 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#12 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#13 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#14 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#15 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#16 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#17 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#18 __tsan::invoke_and_release_block(void*) <null>:1593392 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#19 _dispatch_client_callout <null>:1593392 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b140000d4c0 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2fb)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#5 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#6 __invoking___ <null>:1593392 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b140000d480 allocated by main thread:
#0 malloc <null>:1593424 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1593424 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 Collection.syncFlatten<A>(on:) Future+Flatten.swift:10 (CorePackageTests:x86_64+0x4a91)
#7 AsyncTests.testSyncFlatten() AsyncTests.swift:100 (CorePackageTests:x86_64+0x240c7)
#8 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#9 __invoking___ <null>:1593424 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0c00060588 by thread T13:
#0 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ab2)
#1 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#2 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#3 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#4 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#5 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#6 closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:23 (CorePackageTests:x86_64+0x5c86)
#7 partial apply for closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) <compiler-generated> (CorePackageTests:x86_64+0x67e1)
#8 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#9 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#10 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#11 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#12 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#13 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#14 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#15 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#16 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#17 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#18 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#19 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#20 __tsan::invoke_and_release_block(void*) <null>:1592224 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#21 _dispatch_client_callout <null>:1592224 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0c00060588 by main thread:
#0 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x343609)
#1 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#4 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#5 __invoking___ <null>:1592224 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 40 at 0x7b0c00060570 allocated by main thread:
#0 malloc <null>:1592256 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1592256 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#4 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#5 __invoking___ <null>:1592256 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:121 in ConditionLock.lock()
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0800026db0 by thread T13:
#0 Lock.lock() lock.swift:55 (CorePackageTests:x86_64+0x342cbe)
#1 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ac3)
#2 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#3 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#4 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#5 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#6 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#7 closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) Future+Flatten.swift:23 (CorePackageTests:x86_64+0x5c86)
#8 partial apply for closure #1 in handle #1 <A><A1>(_:) in Collection.syncFlatten<A>(on:) <compiler-generated> (CorePackageTests:x86_64+0x67e1)
#9 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#10 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#11 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#12 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#13 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#14 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#15 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#16 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#17 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#18 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:93 (CorePackageTests:x86_64+0x25cda)
#19 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#20 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#21 __tsan::invoke_and_release_block(void*) <null>:1592096 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#22 _dispatch_client_callout <null>:1592096 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0800026db0 by main thread:
#0 Lock.init() lock.swift:36 (CorePackageTests:x86_64+0x34298f)
#1 Lock.__allocating_init() lock.swift (CorePackageTests:x86_64+0x342854)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#6 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#7 __invoking___ <null>:1592096 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 24 at 0x7b0800026da0 allocated by main thread:
#0 malloc <null>:1592128 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1592128 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 AsyncTests.testSyncFlatten() AsyncTests.swift:101 (CorePackageTests:x86_64+0x2426e)
#6 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#7 __invoking___ <null>:1592128 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:55 in Lock.lock()
==================
==================
WARNING: ThreadSanitizer: Swift access race (pid=12902)
Read of size 8 at 0x7b080001b350 by main thread:
#0 implicit closure #2 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x261cf)
#1 partial apply for implicit closure #2 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2623b)
#2 thunk for @callee_guaranteed () -> (@owned [Int], @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x21a46)
#3 thunk for @callee_guaranteed () -> (@owned [Int], @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0x262b7)
#4 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null> (libswiftXCTest.dylib:x86_64+0xa083)
#5 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#6 __invoking___ <null> (CoreFoundation:x86_64h+0x4aa1b)
Previous modifying access of Swift variable at 0x7b080001b350 by thread T13:
#0 closure #1 in closure #1 in AsyncTests.testSyncFlatten() AsyncTests.swift:94 (CorePackageTests:x86_64+0x25d37)
#1 partial apply for closure #1 in closure #1 in AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x2c1ff)
#2 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#3 __tsan::invoke_and_release_block(void*) <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#4 _dispatch_client_callout <null> (libdispatch.dylib:x86_64+0x34dd)
Location is heap block of size 24 at 0x7b080001b340 allocated by main thread:
#0 malloc <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null> (libswiftCore.dylib:x86_64+0x2cdd98)
#2 @objc AsyncTests.testSyncFlatten() <compiler-generated> (CorePackageTests:x86_64+0x26b77)
#3 __invoking___ <null> (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: Swift access race <compiler-generated> in implicit closure #2 in AsyncTests.testSyncFlatten()
==================
Test Case '-[AsyncTests.AsyncTests testSyncFlatten]' passed (1.644 seconds).
Test Case '-[AsyncTests.AsyncTests testVariadicMap]' started.
Test Case '-[AsyncTests.AsyncTests testVariadicMap]' passed (0.001 seconds).
Test Suite 'AsyncTests' passed at 2019-09-09 9:48:50.542 pm.
Executed 8 tests, with 0 failures (0 unexpected) in 45.076 (45.077) seconds
Test Suite 'ByteBufferPeekTests' started at 2019-09-09 9:48:50.543 pm
Test Case '-[BitsTests.ByteBufferPeekTests testPeekBinaryFloatingPoint]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekBinaryFloatingPoint]' passed (0.001 seconds).
Test Case '-[BitsTests.ByteBufferPeekTests testPeekBytes]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekBytes]' passed (0.001 seconds).
Test Case '-[BitsTests.ByteBufferPeekTests testPeekData]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekData]' passed (0.001 seconds).
Test Case '-[BitsTests.ByteBufferPeekTests testPeekFirstByte]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekFirstByte]' passed (0.001 seconds).
Test Case '-[BitsTests.ByteBufferPeekTests testPeekFixedWidthInteger]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekFixedWidthInteger]' passed (0.001 seconds).
Test Case '-[BitsTests.ByteBufferPeekTests testPeekString]' started.
Test Case '-[BitsTests.ByteBufferPeekTests testPeekString]' passed (0.001 seconds).
Test Suite 'ByteBufferPeekTests' passed at 2019-09-09 9:48:50.548 pm.
Executed 6 tests, with 0 failures (0 unexpected) in 0.005 (0.005) seconds
Test Suite 'ByteBufferRequireTests' started at 2019-09-09 9:48:50.548 pm
Test Case '-[BitsTests.ByteBufferRequireTests testRequireBinaryFloatingPoint]' started.
Test Case '-[BitsTests.ByteBufferRequireTests testRequireBinaryFloatingPoint]' passed (0.003 seconds).
Test Case '-[BitsTests.ByteBufferRequireTests testRequireData]' started.
Test Case '-[BitsTests.ByteBufferRequireTests testRequireData]' passed (0.002 seconds).
Test Case '-[BitsTests.ByteBufferRequireTests testRequireFixedWidthInteger]' started.
Test Case '-[BitsTests.ByteBufferRequireTests testRequireFixedWidthInteger]' passed (0.002 seconds).
Test Case '-[BitsTests.ByteBufferRequireTests testRequireString]' started.
Test Case '-[BitsTests.ByteBufferRequireTests testRequireString]' passed (0.002 seconds).
Test Suite 'ByteBufferRequireTests' passed at 2019-09-09 9:48:50.558 pm.
Executed 4 tests, with 0 failures (0 unexpected) in 0.009 (0.009) seconds
Test Suite 'CoreTests' started at 2019-09-09 9:48:50.558 pm
Test Case '-[CoreTests.CoreTests testBase64]' started.
Test Case '-[CoreTests.CoreTests testBase64]' passed (0.001 seconds).
Test Case '-[CoreTests.CoreTests testBase64URL]' started.
Test Case '-[CoreTests.CoreTests testBase64URL]' passed (0.001 seconds).
Test Case '-[CoreTests.CoreTests testBase64URLEscaping]' started.
Test Case '-[CoreTests.CoreTests testBase64URLEscaping]' passed (0.003 seconds).
Test Case '-[CoreTests.CoreTests testHeaderValue]' started.
Test Case '-[CoreTests.CoreTests testHeaderValue]' passed (0.002 seconds).
Test Case '-[CoreTests.CoreTests testHexEncodedString]' started.
Test Case '-[CoreTests.CoreTests testHexEncodedString]' passed (0.000 seconds).
Test Case '-[CoreTests.CoreTests testProcessAsyncExecute]' started.
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Write of size 1 at 0x7b0800010130 by thread T15:
#0 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:138 (CorePackageTests:x86_64+0xd765c)
#1 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#2 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#3 __tsan::invoke_and_release_block(void*) <null>:6429216 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#4 _dispatch_client_callout <null>:6429216 (libdispatch.dylib:x86_64+0x34dd)
Previous read of size 1 at 0x7b0800010130 by thread T5:
[failed to restore the stack]
Location is heap block of size 17 at 0x7b0800010120 allocated by main thread:
#0 malloc <null>:6429248 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:6429248 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:75 (CorePackageTests:x86_64+0xd6bad)
#3 CoreTests.testProcessAsyncExecute() CoreTests.swift:17 (CorePackageTests:x86_64+0xde260)
#4 @objc CoreTests.testProcessAsyncExecute() <compiler-generated> (CorePackageTests:x86_64+0xdf647)
#5 __invoking___ <null>:6429248 (CoreFoundation:x86_64h+0x4aa1b)
Thread T15 (tid=826982, running) is a GCD worker thread
Thread T5 (tid=826541, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race Process+Execute.swift:138 in closure #3 in static NSTask.asyncExecute(_:_:on:_:)
==================
Test Case '-[CoreTests.CoreTests testProcessAsyncExecute]' passed (0.077 seconds).
Test Case '-[CoreTests.CoreTests testProcessExecute]' started.
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f59638 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:1598544 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:1598544 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f59638 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2dd)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#5 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#6 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#7 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#8 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#9 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1598544 (libswiftXCTest.dylib:x86_64+0xa083)
#10 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#11 __invoking___ <null>:1598544 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f59600 allocated by main thread:
#0 malloc <null>:1598576 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1598576 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#10 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#11 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#12 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1598576 (libswiftXCTest.dylib:x86_64+0xa083)
#13 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#14 __invoking___ <null>:1598576 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f59640 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:1598544 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:1598544 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f59640 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2fb)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#5 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#6 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#7 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#8 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#9 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1598544 (libswiftXCTest.dylib:x86_64+0xa083)
#10 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#11 __invoking___ <null>:1598544 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f59600 allocated by main thread:
#0 malloc <null>:1598576 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1598576 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#10 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#11 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#12 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1598576 (libswiftXCTest.dylib:x86_64+0xa083)
#13 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#14 __invoking___ <null>:1598576 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0c0003db48 by thread T13:
#0 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ab2)
#1 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#2 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#3 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#4 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#5 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#6 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#7 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#8 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#9 __tsan::invoke_and_release_block(void*) <null>:1597376 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#10 _dispatch_client_callout <null>:1597376 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0c0003db48 by main thread:
#0 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x343609)
#1 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#6 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#7 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#8 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1597376 (libswiftXCTest.dylib:x86_64+0xa083)
#9 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#10 __invoking___ <null>:1597376 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 40 at 0x7b0c0003db30 allocated by main thread:
#0 malloc <null>:1597408 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1597408 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#6 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#7 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#8 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1597408 (libswiftXCTest.dylib:x86_64+0xa083)
#9 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#10 __invoking___ <null>:1597408 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:121 in ConditionLock.lock()
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b08000370f0 by thread T13:
#0 Lock.lock() lock.swift:55 (CorePackageTests:x86_64+0x342cbe)
#1 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ac3)
#2 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#3 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#4 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#5 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#6 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#7 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#8 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#9 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#10 __tsan::invoke_and_release_block(void*) <null>:1597248 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#11 _dispatch_client_callout <null>:1597248 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b08000370f0 by main thread:
#0 Lock.init() lock.swift:36 (CorePackageTests:x86_64+0x34298f)
#1 Lock.__allocating_init() lock.swift (CorePackageTests:x86_64+0x342854)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#8 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#9 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#10 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1597248 (libswiftXCTest.dylib:x86_64+0xa083)
#11 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#12 __invoking___ <null>:1597248 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 24 at 0x7b08000370e0 allocated by main thread:
#0 malloc <null>:1597280 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1597280 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#8 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#9 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#10 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null>:1597280 (libswiftXCTest.dylib:x86_64+0xa083)
#11 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#12 __invoking___ <null>:1597280 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:55 in Lock.lock()
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b080001fdb0 by main thread:
#0 static NSTask.execute(_:_:) Process+Execute.swift:56 (CorePackageTests:x86_64+0xd4a8e)
#1 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#2 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#3 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#4 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#5 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null> (libswiftXCTest.dylib:x86_64+0xa083)
#6 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#7 __invoking___ <null> (CoreFoundation:x86_64h+0x4aa1b)
Previous write of size 1 at 0x7b080001fdb0 by thread T17:
[failed to restore the stack]
Location is heap block of size 32 at 0x7b080001fda0 allocated by main thread:
#0 malloc <null> (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null> (libswiftCore.dylib:x86_64+0x2cdd98)
#2 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#3 implicit closure #1 in CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd0d1)
#4 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#5 partial apply for thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0xdd247)
#6 closure #1 in XCTAssertEqual<A>(_:_:_:file:line:) <null> (libswiftXCTest.dylib:x86_64+0xa083)
#7 @objc CoreTests.testProcessExecute() <compiler-generated> (CorePackageTests:x86_64+0xdd3d7)
#8 __invoking___ <null> (CoreFoundation:x86_64h+0x4aa1b)
Thread T17 (tid=826985, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race Process+Execute.swift:56 in static NSTask.execute(_:_:)
==================
Test Case '-[CoreTests.CoreTests testProcessExecute]' passed (0.084 seconds).
Test Case '-[CoreTests.CoreTests testProcessExecuteCurl]' started.
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Write of size 1 at 0x7b080003b850 by thread T18:
#0 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:138 (CorePackageTests:x86_64+0xd765c)
#1 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#2 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#3 __tsan::invoke_and_release_block(void*) <null>:8038944 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#4 _dispatch_client_callout <null>:8038944 (libdispatch.dylib:x86_64+0x34dd)
Previous read of size 1 at 0x7b080003b850 by thread T13:
#0 closure #1 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:103 (CorePackageTests:x86_64+0xd6dd6)
#1 partial apply for closure #1 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8c03)
#2 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#3 __tsan::invoke_and_release_block(void*) <null>:8038944 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#4 _dispatch_client_callout <null>:8038944 (libdispatch.dylib:x86_64+0x34dd)
Location is heap block of size 17 at 0x7b080003b840 allocated by main thread:
#0 malloc <null>:8038976 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:8038976 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#3 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#4 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#5 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#6 __invoking___ <null>:8038976 (CoreFoundation:x86_64h+0x4aa1b)
Thread T18 (tid=826986, running) is a GCD worker thread
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race Process+Execute.swift:138 in closure #3 in static NSTask.asyncExecute(_:_:on:_:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f596d8 by thread T18:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:8037456 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:8037456 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f596d8 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2dd)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#5 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#6 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#7 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#8 __invoking___ <null>:8037456 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f596a0 allocated by main thread:
#0 malloc <null>:8037488 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:8037488 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#10 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#11 __invoking___ <null>:8037488 (CoreFoundation:x86_64h+0x4aa1b)
Thread T18 (tid=826986, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f596e0 by thread T18:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:8037456 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:8037456 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f596e0 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2fb)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:818 (CorePackageTests:x86_64+0x25ddb8)
#4 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#5 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#6 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#7 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#8 __invoking___ <null>:8037456 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f596a0 allocated by main thread:
#0 malloc <null>:8037488 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:8037488 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#10 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#11 __invoking___ <null>:8037488 (CoreFoundation:x86_64h+0x4aa1b)
Thread T18 (tid=826986, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0c00040ab8 by thread T18:
#0 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ab2)
#1 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#2 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#3 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#4 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#5 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#6 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#7 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#8 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#9 __tsan::invoke_and_release_block(void*) <null>:8036288 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#10 _dispatch_client_callout <null>:8036288 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0c00040ab8 by main thread:
#0 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x343609)
#1 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#6 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#7 __invoking___ <null>:8036288 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 40 at 0x7b0c00040aa0 allocated by main thread:
#0 malloc <null>:8036320 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:8036320 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#6 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#7 __invoking___ <null>:8036320 (CoreFoundation:x86_64h+0x4aa1b)
Thread T18 (tid=826986, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:121 in ConditionLock.lock()
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0800034f30 by thread T18:
#0 Lock.lock() lock.swift:55 (CorePackageTests:x86_64+0x342cbe)
#1 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ac3)
#2 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#3 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#4 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#5 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#6 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#7 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#8 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#9 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#10 __tsan::invoke_and_release_block(void*) <null>:8036160 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#11 _dispatch_client_callout <null>:8036160 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0800034f30 by main thread:
#0 Lock.init() lock.swift:36 (CorePackageTests:x86_64+0x34298f)
#1 Lock.__allocating_init() lock.swift (CorePackageTests:x86_64+0x342854)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#8 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#9 __invoking___ <null>:8036160 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 24 at 0x7b0800034f20 allocated by main thread:
#0 malloc <null>:8036192 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:8036192 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 CoreTests.testProcessExecuteCurl() CoreTests.swift:10 (CorePackageTests:x86_64+0xdd741)
#8 @objc CoreTests.testProcessExecuteCurl() <compiler-generated> (CorePackageTests:x86_64+0xdde27)
#9 __invoking___ <null>:8036192 (CoreFoundation:x86_64h+0x4aa1b)
Thread T18 (tid=826986, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:55 in Lock.lock()
==================
Test Case '-[CoreTests.CoreTests testProcessExecuteCurl]' passed (0.796 seconds).
Test Case '-[CoreTests.CoreTests testProcessExecuteMissing]' started.
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f597c8 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:1598544 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:1598544 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f597c8 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2dd)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:629 (CorePackageTests:x86_64+0x2573b1)
#4 EventLoopFuture.do(_:) Future+DoCatch.swift:14 (CorePackageTests:x86_64+0x4056)
#5 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:48 (CorePackageTests:x86_64+0x7fe7)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#10 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#12 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598544 (libswiftXCTest.dylib:x86_64+0xffeb)
#13 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#14 __invoking___ <null>:1598544 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f59790 allocated by main thread:
#0 malloc <null>:1598576 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1598576 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:144 (CorePackageTests:x86_64+0xd659c)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598576 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1598576 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f597d0 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:1598544 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:1598544 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f597d0 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:54 (CorePackageTests:x86_64+0x24e2fb)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:629 (CorePackageTests:x86_64+0x2573b1)
#4 EventLoopFuture.do(_:) Future+DoCatch.swift:14 (CorePackageTests:x86_64+0x4056)
#5 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:48 (CorePackageTests:x86_64+0x7fe7)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#10 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#12 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598544 (libswiftXCTest.dylib:x86_64+0xffeb)
#13 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#14 __invoking___ <null>:1598544 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f59790 allocated by main thread:
#0 malloc <null>:1598576 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1598576 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:144 (CorePackageTests:x86_64+0xd659c)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598576 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1598576 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f597d8 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x2512b3)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#4 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#5 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#6 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#7 __tsan::invoke_and_release_block(void*) <null>:1598544 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#8 _dispatch_client_callout <null>:1598544 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f597d8 by main thread:
#0 CallbackList.append(_:) EventLoopFuture.swift:59 (CorePackageTests:x86_64+0x24e693)
#1 EventLoopFuture._addCallback(_:) EventLoopFuture.swift:594 (CorePackageTests:x86_64+0x255176)
#2 EventLoopFuture._whenComplete(_:) EventLoopFuture.swift:603 (CorePackageTests:x86_64+0x255567)
#3 EventLoopFuture.whenFailure(_:) EventLoopFuture.swift:648 (CorePackageTests:x86_64+0x2595ce)
#4 EventLoopFuture.catch(_:) Future+DoCatch.swift:29 (CorePackageTests:x86_64+0x4133)
#5 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:55 (CorePackageTests:x86_64+0x80b4)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#7 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#8 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#9 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#10 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#12 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598544 (libswiftXCTest.dylib:x86_64+0xffeb)
#13 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#14 __invoking___ <null>:1598544 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f59790 allocated by main thread:
#0 malloc <null>:1598576 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1598576 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:134 (CorePackageTests:x86_64+0xd5dea)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:144 (CorePackageTests:x86_64+0xd659c)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1598576 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1598576 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f02698 by thread T13:
#0 EventLoopPromise._resolve(value:) EventLoopFuture.swift:191 (CorePackageTests:x86_64+0x2505b4)
#1 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#2 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#3 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#4 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#5 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#6 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#7 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#8 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#9 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#10 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#11 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#12 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#13 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#14 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#15 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#16 __tsan::invoke_and_release_block(void*) <null>:1596112 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#17 _dispatch_client_callout <null>:1596112 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f02698 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:360 (CorePackageTests:x86_64+0x25235a)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1596112 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1596112 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1596144 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1596144 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1596144 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1596144 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:191 in EventLoopPromise._resolve(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f026a0 by thread T13:
#0 EventLoopPromise._resolve(value:) EventLoopFuture.swift:191 (CorePackageTests:x86_64+0x2505d1)
#1 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#2 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#3 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#4 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#5 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#6 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#7 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#8 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#9 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#10 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#11 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#12 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#13 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#14 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#15 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#16 __tsan::invoke_and_release_block(void*) <null>:1596112 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#17 _dispatch_client_callout <null>:1596112 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f026a0 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:360 (CorePackageTests:x86_64+0x252386)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1596112 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1596112 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1596144 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1596144 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1596144 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1596144 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:191 in EventLoopPromise._resolve(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f02690 by thread T13:
#0 EventLoopFuture.value.didset EventLoopFuture.swift:338 (CorePackageTests:x86_64+0x251722)
#1 EventLoopFuture.value.setter <compiler-generated> (CorePackageTests:x86_64+0x251aac)
#2 EventLoopFuture._setValue(value:) EventLoopFuture.swift:677 (CorePackageTests:x86_64+0x2511e2)
#3 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#4 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#5 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#6 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#7 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#8 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#9 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#10 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#11 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#12 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#13 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#14 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#15 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#16 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#17 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#18 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#19 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#20 __tsan::invoke_and_release_block(void*) <null>:1594640 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#21 _dispatch_client_callout <null>:1594640 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f02690 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:362 (CorePackageTests:x86_64+0x25259f)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594640 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1594640 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1594672 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1594672 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594672 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1594672 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:338 in EventLoopFuture.value.didset
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Atomic write of size 1 at 0x7b0400300120 by thread T13:
#0 __tsan_atomic8_store <null>:1594160 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x465ac)
#1 catmc_atomic__Bool_store c-atomics.c:95 (CorePackageTests:x86_64+0x581c4)
#2 @nonobjc catmc_atomic__Bool_store(_:_:) <compiler-generated> (CorePackageTests:x86_64+0x3300cf)
#3 thunk for @escaping @callee_guaranteed (@unowned OpaquePointer, @unowned Bool) -> () <compiler-generated> (CorePackageTests:x86_64+0x330973)
#4 partial apply for thunk for @escaping @callee_guaranteed (@unowned OpaquePointer, @unowned Bool) -> () <compiler-generated> (CorePackageTests:x86_64+0x3422a8)
#5 UnsafeEmbeddedAtomic.store(_:) atomics.swift:167 (CorePackageTests:x86_64+0x32e960)
#6 EventLoopFuture.value.didset EventLoopFuture.swift:338 (CorePackageTests:x86_64+0x251749)
#7 EventLoopFuture.value.setter <compiler-generated> (CorePackageTests:x86_64+0x251aac)
#8 EventLoopFuture._setValue(value:) EventLoopFuture.swift:677 (CorePackageTests:x86_64+0x2511e2)
#9 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#10 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#11 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#12 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#13 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#14 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#15 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#16 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#17 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#18 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#19 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#20 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#21 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#22 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#23 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#24 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#25 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#26 __tsan::invoke_and_release_block(void*) <null>:1594160 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#27 _dispatch_client_callout <null>:1594160 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 1 at 0x7b0400300120 by main thread:
#0 catmc_atomic__Bool_create c-atomics.c:95 (CorePackageTests:x86_64+0x57ea5)
#1 @nonobjc catmc_atomic__Bool_create(_:) <compiler-generated> (CorePackageTests:x86_64+0x32f4f6)
#2 thunk for @escaping @callee_guaranteed (@unowned Bool) -> (@unowned OpaquePointer) <compiler-generated> (CorePackageTests:x86_64+0x3302eb)
#3 partial apply for thunk for @escaping @callee_guaranteed (@unowned Bool) -> (@unowned OpaquePointer) <compiler-generated> (CorePackageTests:x86_64+0x3426a0)
#4 UnsafeEmbeddedAtomic.init(value:) atomics.swift:48 (CorePackageTests:x86_64+0x32e2cd)
#5 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:362 (CorePackageTests:x86_64+0x252549)
#6 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#7 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#8 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#9 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#10 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#11 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#12 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#13 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#14 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#15 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#16 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#17 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#18 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594160 (libswiftXCTest.dylib:x86_64+0xffeb)
#19 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#20 __invoking___ <null>:1594160 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 1 at 0x7b0400300120 allocated by main thread:
#0 malloc <null>:1594192 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 catmc_atomic__Bool_create c-atomics.c:95 (CorePackageTests:x86_64+0x57e88)
#2 @nonobjc catmc_atomic__Bool_create(_:) <compiler-generated> (CorePackageTests:x86_64+0x32f4f6)
#3 thunk for @escaping @callee_guaranteed (@unowned Bool) -> (@unowned OpaquePointer) <compiler-generated> (CorePackageTests:x86_64+0x3302eb)
#4 partial apply for thunk for @escaping @callee_guaranteed (@unowned Bool) -> (@unowned OpaquePointer) <compiler-generated> (CorePackageTests:x86_64+0x3426a0)
#5 UnsafeEmbeddedAtomic.init(value:) atomics.swift:48 (CorePackageTests:x86_64+0x32e2cd)
#6 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:362 (CorePackageTests:x86_64+0x252549)
#7 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#8 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#9 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#10 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#11 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#12 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#13 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#14 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#15 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#16 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#17 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#18 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#19 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594192 (libswiftXCTest.dylib:x86_64+0xffeb)
#20 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#21 __invoking___ <null>:1594192 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race c-atomics.c:95 in catmc_atomic__Bool_store
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f026a8 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25126c)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#4 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#5 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#6 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#7 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#8 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#9 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#10 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#11 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#12 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#13 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#14 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#15 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#16 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#17 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#18 __tsan::invoke_and_release_block(void*) <null>:1595216 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#19 _dispatch_client_callout <null>:1595216 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f026a8 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:357 (CorePackageTests:x86_64+0x25226b)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595216 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595216 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1595248 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1595248 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595248 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595248 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f026b0 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x25128f)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#4 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#5 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#6 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#7 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#8 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#9 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#10 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#11 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#12 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#13 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#14 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#15 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#16 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#17 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#18 __tsan::invoke_and_release_block(void*) <null>:1595216 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#19 _dispatch_client_callout <null>:1595216 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f026b0 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:357 (CorePackageTests:x86_64+0x252297)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595216 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595216 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1595248 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1595248 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595248 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595248 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b1400f026b8 by thread T13:
#0 EventLoopFuture._setValue(value:) EventLoopFuture.swift:678 (CorePackageTests:x86_64+0x2512b3)
#1 EventLoopPromise._setValue(value:) EventLoopFuture.swift:206 (CorePackageTests:x86_64+0x250b99)
#2 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x250667)
#3 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#4 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#5 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#6 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#7 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#8 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#9 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#10 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#11 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#12 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#13 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#14 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#15 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#16 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#17 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#18 __tsan::invoke_and_release_block(void*) <null>:1595216 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#19 _dispatch_client_callout <null>:1595216 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b1400f026b8 by main thread:
#0 EventLoopFuture.init(eventLoop:value:file:line:) EventLoopFuture.swift:357 (CorePackageTests:x86_64+0x2522c4)
#1 EventLoopFuture.__allocating_init(eventLoop:value:file:line:) EventLoopFuture.swift (CorePackageTests:x86_64+0x251e10)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595216 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595216 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 80 at 0x7b1400f02670 allocated by main thread:
#0 malloc <null>:1595248 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1595248 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.__allocating_init(eventLoop:file:line:) EventLoopFuture.swift:373 (CorePackageTests:x86_64+0x2501fc)
#3 EventLoopPromise.init(eventLoop:file:line:) EventLoopFuture.swift:163 (CorePackageTests:x86_64+0x24fee1)
#4 EventLoop.newPromise<A>(of:file:line:) EventLoop.swift:322 (CorePackageTests:x86_64+0x2356ff)
#5 EventLoop.newPromise<A>(_:file:line:) Async+NIO.swift:13 (CorePackageTests:x86_64+0x152f)
#6 EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:46 (CorePackageTests:x86_64+0x7eda)
#7 static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:150 (CorePackageTests:x86_64+0xd680e)
#8 static NSTask.execute(_:_:) Process+Execute.swift:45 (CorePackageTests:x86_64+0xd439f)
#9 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#10 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#11 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#12 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#13 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1595248 (libswiftXCTest.dylib:x86_64+0xffeb)
#14 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#15 __invoking___ <null>:1595248 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race EventLoopFuture.swift:678 in EventLoopFuture._setValue(value:)
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0c00057fa8 by thread T13:
#0 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ab2)
#1 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#2 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#3 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#4 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#5 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#6 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#7 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#8 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#9 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#10 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#11 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#12 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#13 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#14 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#15 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#16 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#17 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#18 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#19 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#20 __tsan::invoke_and_release_block(void*) <null>:1594048 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#21 _dispatch_client_callout <null>:1594048 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0c00057fa8 by main thread:
#0 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x343609)
#1 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#6 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#7 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#8 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594048 (libswiftXCTest.dylib:x86_64+0xffeb)
#9 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#10 __invoking___ <null>:1594048 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 40 at 0x7b0c00057f90 allocated by main thread:
#0 malloc <null>:1594080 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1594080 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#3 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#4 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#5 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#6 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#7 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#8 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1594080 (libswiftXCTest.dylib:x86_64+0xffeb)
#9 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#10 __invoking___ <null>:1594080 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:121 in ConditionLock.lock()
==================
==================
WARNING: ThreadSanitizer: data race (pid=12902)
Read of size 8 at 0x7b0800028250 by thread T13:
#0 Lock.lock() lock.swift:55 (CorePackageTests:x86_64+0x342cbe)
#1 ConditionLock.lock() lock.swift:121 (CorePackageTests:x86_64+0x343ac3)
#2 closure #2 in EventLoopFuture.wait(file:line:) EventLoopFuture.swift:819 (CorePackageTests:x86_64+0x25e96c)
#3 partial apply for closure #2 in EventLoopFuture.wait(file:line:) <compiler-generated> (CorePackageTests:x86_64+0x26458f)
#4 CallbackList._run() EventLoopFuture.swift:82 (CorePackageTests:x86_64+0x24ef00)
#5 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#6 EventLoopPromise.fail(error:) EventLoopFuture.swift:179 (CorePackageTests:x86_64+0x250ac6)
#7 closure #1 in EventLoopFuture.flatMap<A>(to:_:) Future+Map.swift:53 (CorePackageTests:x86_64+0x83a3)
#8 partial apply for closure #1 in EventLoopFuture.flatMap<A>(to:_:) <compiler-generated> (CorePackageTests:x86_64+0x84c4)
#9 closure #1 in EventLoopFuture.whenSuccess(_:) EventLoopFuture.swift:631 (CorePackageTests:x86_64+0x259402)
#10 partial apply for closure #1 in EventLoopFuture.whenSuccess(_:) <compiler-generated> (CorePackageTests:x86_64+0x25cfdf)
#11 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24e71b)
#12 thunk for @escaping @callee_guaranteed () -> (@owned CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x26880d)
#13 thunk for @escaping @callee_guaranteed () -> (@out CallbackList) <compiler-generated> (CorePackageTests:x86_64+0x24dfcb)
#14 thunk for @escaping @callee_guaranteed () -> (@out CallbackList)partial apply <compiler-generated> (CorePackageTests:x86_64+0x268a5b)
#15 CallbackList._run() EventLoopFuture.swift:108 (CorePackageTests:x86_64+0x24faf5)
#16 EventLoopPromise._resolve(value:) EventLoopFuture.swift:192 (CorePackageTests:x86_64+0x2506c5)
#17 EventLoopPromise.succeed(result:) EventLoopFuture.swift:171 (CorePackageTests:x86_64+0x25045a)
#18 closure #3 in static NSTask.asyncExecute(_:_:on:_:) Process+Execute.swift:139 (CorePackageTests:x86_64+0xd76b9)
#19 partial apply for closure #3 in static NSTask.asyncExecute(_:_:on:_:) <compiler-generated> (CorePackageTests:x86_64+0xd8eed)
#20 thunk for @escaping @callee_guaranteed () -> () <compiler-generated> (CorePackageTests:x86_64+0x25e00)
#21 __tsan::invoke_and_release_block(void*) <null>:1593920 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x6d65b)
#22 _dispatch_client_callout <null>:1593920 (libdispatch.dylib:x86_64+0x34dd)
Previous write of size 8 at 0x7b0800028250 by main thread:
#0 Lock.init() lock.swift:36 (CorePackageTests:x86_64+0x34298f)
#1 Lock.__allocating_init() lock.swift (CorePackageTests:x86_64+0x342854)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#8 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#9 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#10 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1593920 (libswiftXCTest.dylib:x86_64+0xffeb)
#11 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#12 __invoking___ <null>:1593920 (CoreFoundation:x86_64h+0x4aa1b)
Location is heap block of size 24 at 0x7b0800028240 allocated by main thread:
#0 malloc <null>:1593952 (libclang_rt.tsan_osx_dynamic.dylib:x86_64h+0x4e6ba)
#1 swift_slowAlloc <null>:1593952 (libswiftCore.dylib:x86_64+0x2cdd98)
#2 ConditionLock.init(value:) lock.swift:108 (CorePackageTests:x86_64+0x3435bc)
#3 ConditionLock.__allocating_init(value:) lock.swift (CorePackageTests:x86_64+0x343330)
#4 EventLoopFuture.wait(file:line:) EventLoopFuture.swift:817 (CorePackageTests:x86_64+0x25dcad)
#5 static NSTask.execute(_:_:) Process+Execute.swift:52 (CorePackageTests:x86_64+0xd4494)
#6 static NSTask.execute(_:_:) Process+Execute.swift:27 (CorePackageTests:x86_64+0xd3ef5)
#7 implicit closure #1 in CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdf9f1)
#8 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error) <compiler-generated> (CorePackageTests:x86_64+0x1ceb6)
#9 thunk for @callee_guaranteed () -> (@owned String, @error @owned Error)partial apply <compiler-generated> (CorePackageTests:x86_64+0xdfb67)
#10 closure #1 in XCTAssertThrowsError<A>(_:_:file:line:_:) <null>:1593952 (libswiftXCTest.dylib:x86_64+0xffeb)
#11 @objc CoreTests.testProcessExecuteMissing() <compiler-generated> (CorePackageTests:x86_64+0xdfcb7)
#12 __invoking___ <null>:1593952 (CoreFoundation:x86_64h+0x4aa1b)
Thread T13 (tid=826938, running) is a GCD worker thread
SUMMARY: ThreadSanitizer: data race lock.swift:55 in Lock.lock()
==================
Test Case '-[CoreTests.CoreTests testProcessExecuteMissing]' passed (0.153 seconds).
Test Suite 'CoreTests' passed at 2019-09-09 9:48:51.677 pm.
Executed 9 tests, with 0 failures (0 unexpected) in 1.119 (1.119) seconds
Test Suite 'FooErrorTests' started at 2019-09-09 9:48:51.677 pm
Test Case '-[DebuggingTests.FooErrorTests testCausesAndSuggestions]' started.
Test Case '-[DebuggingTests.FooErrorTests testCausesAndSuggestions]' passed (0.000 seconds).
Test Case '-[DebuggingTests.FooErrorTests testIdentifier]' started.
Test Case '-[DebuggingTests.FooErrorTests testIdentifier]' passed (0.000 seconds).
Test Case '-[DebuggingTests.FooErrorTests testOmitEmptyFields]' started.
Test Case '-[DebuggingTests.FooErrorTests testOmitEmptyFields]' passed (0.002 seconds).
Test Case '-[DebuggingTests.FooErrorTests testPrintable]' started.
โ ๏ธ Foo Error: You do not have a `foo`.
- id: FooError.noFoo
Here are some possible causes:
- You did not set the flongwaffle.
- The session ended before a `Foo` could be made.
- The universe conspires against us all.
- Computers are hard.
These suggestions could address the issue:
- You really want to use a `Bar` here.
- Take up the guitar and move to the beach.
Vapor's documentation talks about this:
- http://documentation.com/Foo
- http://documentation.com/foo/noFoo
Test Case '-[DebuggingTests.FooErrorTests testPrintable]' passed (0.001 seconds).
Test Case '-[DebuggingTests.FooErrorTests testReadableName]' started.
Test Case '-[DebuggingTests.FooErrorTests testReadableName]' passed (0.000 seconds).
Test Suite 'FooErrorTests' passed at 2019-09-09 9:48:51.681 pm.
Executed 5 tests, with 0 failures (0 unexpected) in 0.003 (0.004) seconds
Test Suite 'GeneralTests' started at 2019-09-09 9:48:51.681 pm
Test Case '-[DebuggingTests.GeneralTests testBulletedList]' started.
Test Case '-[DebuggingTests.GeneralTests testBulletedList]' passed (0.000 seconds).
Test Case '-[DebuggingTests.GeneralTests testMinimumConformance]' started.
Test Case '-[DebuggingTests.GeneralTests testMinimumConformance]' passed (0.001 seconds).
Test Suite 'GeneralTests' passed at 2019-09-09 9:48:51.682 pm.
Executed 2 tests, with 0 failures (0 unexpected) in 0.001 (0.001) seconds
Test Suite 'ReflectableTests' started at 2019-09-09 9:48:51.682 pm
Test Case '-[CoreTests.ReflectableTests testArrayNested]' started.
Test Case '-[CoreTests.ReflectableTests testArrayNested]' passed (0.014 seconds).
Test Case '-[CoreTests.ReflectableTests testCache]' started.
Test Case '-[CoreTests.ReflectableTests testCache]' passed (0.011 seconds).
Test Case '-[CoreTests.ReflectableTests testCaseIterableExtension]' started.
Test Case '-[CoreTests.ReflectableTests testCaseIterableExtension]' passed (0.000 seconds).
Test Case '-[CoreTests.ReflectableTests testCustomCodingKeys]' started.
Test Case '-[CoreTests.ReflectableTests testCustomCodingKeys]' passed (0.002 seconds).
Test Case '-[CoreTests.ReflectableTests testGH112]' started.
Test Case '-[CoreTests.ReflectableTests testGH112]' passed (0.002 seconds).
Test Case '-[CoreTests.ReflectableTests testGH119]' started.
Test Case '-[CoreTests.ReflectableTests testGH119]' passed (0.001 seconds).
Test Case '-[CoreTests.ReflectableTests testNestedStruct]' started.
Test Case '-[CoreTests.ReflectableTests testNestedStruct]' passed (0.016 seconds).
Test Case '-[CoreTests.ReflectableTests testNonOptionalsOnly]' started.
Test Case '-[CoreTests.ReflectableTests testNonOptionalsOnly]' passed (0.003 seconds).
Test Case '-[CoreTests.ReflectableTests testProperties]' started.
Test Case '-[CoreTests.ReflectableTests testProperties]' passed (0.011 seconds).
Test Case '-[CoreTests.ReflectableTests testPropertyA]' started.
Test Case '-[CoreTests.ReflectableTests testPropertyA]' passed (0.001 seconds).
Test Case '-[CoreTests.ReflectableTests testPropertyDepth]' started.
Test Case '-[CoreTests.ReflectableTests testPropertyDepth]' passed (0.002 seconds).
Test Case '-[CoreTests.ReflectableTests testStruct]' started.
Test Case '-[CoreTests.ReflectableTests testStruct]' passed (0.030 seconds).
Test Case '-[CoreTests.ReflectableTests testStructCustomProperties]' started.
Test Case '-[CoreTests.ReflectableTests testStructCustomProperties]' passed (0.001 seconds).
Test Suite 'ReflectableTests' passed at 2019-09-09 9:48:51.776 pm.
Executed 13 tests, with 0 failures (0 unexpected) in 0.093 (0.094) seconds
Test Suite 'TraceableTests' started at 2019-09-09 9:48:51.776 pm
Test Case '-[DebuggingTests.TraceableTests testPrintable]' started.
โ ๏ธ [TestError.foo: So we can test stuff] [Possible causes: What do you expect, you're testing errors.] [Suggested fixes: Get a better keyboard to chair interface.]
โ ๏ธ TestError: So we can test stuff
- id: TestError.foo
Here are some possible causes:
- What do you expect, you're testing errors.
These suggestions could address the issue:
- Get a better keyboard to chair interface.
Test Case '-[DebuggingTests.TraceableTests testPrintable]' passed (0.003 seconds).
Test Suite 'TraceableTests' passed at 2019-09-09 9:48:51.780 pm.
Executed 1 test, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'CorePackageTests.xctest' passed at 2019-09-09 9:48:51.780 pm.
Executed 48 tests, with 0 failures (0 unexpected) in 46.308 (46.314) seconds
Test Suite 'All tests' passed at 2019-09-09 9:48:51.780 pm.
Executed 48 tests, with 0 failures (0 unexpected) in 46.308 (46.315) seconds
ThreadSanitizer: reported 31 warnings
Exited with signal code 6
Steps
PostgreSQLModel
subclass with a Data
propertyExpected Result
Migration for your new model runs and creates a bytea
PostgeSQL column
Actual Result
Error is thrown: โ ๏ธ [CoreError.ReflectionDecodable:
Datadoes not conform to
ReflectionDecodable.]
I am trying to create a Vapor app with a model that includes properties of type [URL]
. I am running into an issue when trying to migrate with Fluent where it crashes with a fatal error.
Fatal error: URL does not conform to
KeyStringDecodable
.
I'm not exactly sure why this is failing. It would be nice to be able to use URL on my models.
This could be nice for converting between types.
extension Data {
public func convert<T>(to type: T.Type = T.self) -> T where T: LosslessDataConvertible {
return T.convertFromData(self)
}
}
Vapor Core needs a Peek extension while @tanner0101's PR on Nio is proccessed
This code crashes in the beta branch:
import CodableKit
import Foundation
_ = UUID.properties()
Producing the following error:
Thread 1: Fatal error: 'try!' expression unexpectedly raised an error: Swift.DecodingError.dataCorrupted(Swift.DecodingError.Context(codingPath: [], debugDescription: "Attempted to decode UUID from invalid UUID string.", underlyingError: nil))
This also happens whenever Decodable.properties()
is called on a type that has a UUID field.
This happens because CodingKeyCollector
works by pretending to decode a type. When it encounters a String
, it tries to decode "0"
:
func decode(_ type: String.Type) throws -> String {
result.add(type: type, atPath: codingPath)
return "0"
}
I was able to temporarily fix the crasher by changing that function in CodingKeyCollectorSingleValueDecoder
to:
func decode(_ type: String.Type) throws -> String {
result.add(type: type, atPath: codingPath)
return "00000000-0000-0000-0000-000000000000"
}
A slightly more robust solution is to add a decode(_ type: UUID.Type) -> UUID
that handles that special case.
Still, this only fixes this one case and doesn't address the class of potential errors that arise from assuming that any Decodable
can be successfully decoded with an arbitrary combination of values (false
, "0"
, 0
).
Hello, ๐ I was just thinking if Core is supported by Cocoapods? Atm, I have the 2.0.1 version installed and I have some issues since this version isn't updated to Swift 4.0.1. As I checked in the PR's the PR regarding the newest version of Swift is already merged but the pod's version isn't updated just yet. ๐ค
Application crashed with NIO-ELT-#0 (2): Assertion failed
in following place after completion of migration.
https://github.com/vapor/core/tree/3.0.1/Sources/Async/QueueHandler.swift#L95
My code just changed the database in api-template to MySQL.
I do not know which package's problem, so I submitted it as a Core's issue.
My environment is as follows.
macOS High Sierra 10.13.2
mysql Ver 14.14 Distrib 5.7.18, for osx10.12 (x86_64) using EditLine wrapper
{
"object": {
"pins": [
{
"package": "Console",
"repositoryURL": "https://github.com/vapor/console.git",
"state": {
"branch": null,
"revision": "273cf2ed1f4daba88a452494c342020171d8c7b8",
"version": "3.0.0-rc.2.2"
}
},
{
"package": "Core",
"repositoryURL": "https://github.com/vapor/core.git",
"state": {
"branch": null,
"revision": "225aff2b69049f2a4d9a4aae71d27ba7fb083032",
"version": "3.0.1"
}
},
{
"package": "Crypto",
"repositoryURL": "https://github.com/vapor/crypto.git",
"state": {
"branch": null,
"revision": "e77aa181580b466fb26865918b62973d9fbfaed6",
"version": "3.0.0"
}
},
{
"package": "DatabaseKit",
"repositoryURL": "https://github.com/vapor/database-kit.git",
"state": {
"branch": null,
"revision": "e594e658cc001e04b8d4ad13881d8714c510f94f",
"version": "1.0.0-rc.2.2.2"
}
},
{
"package": "Engine",
"repositoryURL": "https://github.com/vapor/engine.git",
"state": {
"branch": null,
"revision": "4846ea9abeb04863f82f618ee8cb22650a82ae3c",
"version": "3.0.0-rc.2.1.1"
}
},
{
"package": "Fluent",
"repositoryURL": "https://github.com/vapor/fluent.git",
"state": {
"branch": null,
"revision": "eb63485dfd6fbd0773a25e1b94830fbcedaa8266",
"version": "3.0.0-rc.2.3.1"
}
},
{
"package": "FluentMySQL",
"repositoryURL": "https://github.com/vapor/fluent-mysql.git",
"state": {
"branch": null,
"revision": "7cf4f25b5b8fd22b373944750c6c50b6ddbc8024",
"version": "3.0.0-rc.2.3"
}
},
{
"package": "MySQL",
"repositoryURL": "https://github.com/vapor/mysql.git",
"state": {
"branch": null,
"revision": "198576a6963973a691baaafdb1a01a078affe65c",
"version": "3.0.0-rc.2.1.2"
}
},
{
"package": "Routing",
"repositoryURL": "https://github.com/vapor/routing.git",
"state": {
"branch": null,
"revision": "2fc1d4de22a54848b35ad17b3e7f7816f19ebf90",
"version": "3.0.0-rc.2"
}
},
{
"package": "Service",
"repositoryURL": "https://github.com/vapor/service.git",
"state": {
"branch": null,
"revision": "281a70b69783891900be31a9e70051b6fe19e146",
"version": "1.0.0"
}
},
{
"package": "swift-nio",
"repositoryURL": "https://github.com/apple/swift-nio.git",
"state": {
"branch": null,
"revision": "a0b7f646fba61402da384b3202f54c27debb5e13",
"version": "1.3.1"
}
},
{
"package": "swift-nio-ssl",
"repositoryURL": "https://github.com/apple/swift-nio-ssl.git",
"state": {
"branch": null,
"revision": "ea006b6368dbd9dbfd297deb6ddb3f070b72d043",
"version": "1.0.1"
}
},
{
"package": "swift-nio-ssl-support",
"repositoryURL": "https://github.com/apple/swift-nio-ssl-support.git",
"state": {
"branch": null,
"revision": "c02eec4e0e6d351cd092938cf44195a8e669f555",
"version": "1.0.0"
}
},
{
"package": "swift-nio-zlib-support",
"repositoryURL": "https://github.com/apple/swift-nio-zlib-support.git",
"state": {
"branch": null,
"revision": "37760e9a52030bb9011972c5213c3350fa9d41fd",
"version": "1.0.0"
}
},
{
"package": "TemplateKit",
"repositoryURL": "https://github.com/vapor/template-kit.git",
"state": {
"branch": null,
"revision": "61ed3d3b0df4c181d6b88e06b418f425978ac2af",
"version": "1.0.0-rc.2.0.3"
}
},
{
"package": "Validation",
"repositoryURL": "https://github.com/vapor/validation.git",
"state": {
"branch": null,
"revision": "1ce87fc2d18a8f15a491805825063c8db493a51e",
"version": "2.0.0-rc.2.1.1"
}
},
{
"package": "Vapor",
"repositoryURL": "https://github.com/vapor/vapor.git",
"state": {
"branch": null,
"revision": "63d758beb98efc08e8db960372c64ae3704c7616",
"version": "3.0.0-rc.2.2.3"
}
}
]
},
"version": 1
}
Process+Execute.swift and Thread+Async.swift don't compile on these platforms
If you try and build and run the API template with the latest reflection stuff, it fails with:
[ INFO ] Migrating 'sqlite' database (FluentProvider.swift:28)
[ INFO ] Preparing migration 'Todo' (MigrationContainer.swift:50)
โ ๏ธ [FluentError.reflectProperty: No property reflected for Swift.WritableKeyPath<App.Todo, Swift.Optional<Swift.Int>>] [/Users/condot01/dev/Vapor/ReflectTest/.build/checkouts/fluent.git-6251908308727715749/Sources/Fluent/Migration/Migration.swift:28:124]
This is apparently due to computed properties on classes (the ID key) not having an offset
The latest stable version 1.1.1 uses Foundation's Base64 encoding, which is broken in the 3.1 release, causing low-level crashes in JWT (already worked around), websockets (vapor/vapor#970) and possibly other places.
Let's say you have a model like so:
final class Account: MySQLModel, Migration, Content, Parameter {
var id: Int?
var authId: UUID
var status: Status = .provisioned
enum Status: Int, Codable, MySQLDataConvertible, MySQLColumnDefinitionStaticRepresentable {
public static var mySQLColumnDefinition = MySQLColumnDefinition.tinyInt()
case provisioned = 0
case activated = 1
case verified = 2
}
}
The auto-generated migration fails with MySQL.MySQLErrorPacket(errorCode: 1060, sqlStateMarker: Optional("#"), sqlState: Optional("42S21"), errorMessage: "Duplicate column name \'status\'"))
Digging into it, it's because Reflection is outputting duplicate properties for the Status field. Printing the list of generated properties yields:
[
id: Optional<Int>,
authId: UUID,
status: Status,
status: Int
]
According to https://github.com/vapor/core/blob/master/Sources/Async/Future%2BFlatten.swift, "the order of the results will match the order of the futures in the input array.". But the current implementation simply adds an awaiter to each future, which appends its result to the final result array. That means that elements actually get appended in the order in which the futures are fulfilled, not in the order the futures had in the input array.
Byte+Control.swift line 93 :
public static let tilda: Byte = 0x7E
should be spelled tilde
not tilda
your call whether an @available renamed is needed with fix.
Also line 108:
public static let pipe: UInt8 = 0x7C
should be
public static let pipe: Byte = 0x7C
Moving vapor/fluent#524 here.
This would allow Fluent model properties to be Set
(not only Array
):
extension Set: ReflectionDecodable {
/// See `ReflectionDecodable.reflectDecoded()` for more information.
public static func reflectDecoded() throws -> (Set<Element>, Set<Element>) {
let reflected = try [Element].reflectDecoded()
return (Set(reflected.0), Set(reflected.1))
}
/// See `ReflectionDecodable.reflectDecodedIsLeft(_:)` for more information.
public static func reflectDecodedIsLeft(_ item: Set<Element>) throws -> Bool {
return try [Element].reflectDecodedIsLeft(Array(item))
}
}
Remove RFC1123 date formatting from Vapor into Core
In particular, these lines are spinning uncontrollably after the child process exited.
Xcode's memory debugger revealed that the file handle and related objects are kept in memory by the autorelease pool โ and explicitly wrapping the Process.execute call with @autoreleasepool
resolved the issue.
Process.asyncExecute doesn't seem to have this issue, and I have not tested anything on Linux.
This model
struct Pet: PostgreSQLJSONType, Codable {
var name: String
var type: String
}
struct Person: PostgreSQLModel, Migration{
var id: Int?
var title: String
var pets: [Pet]
}
causes this fatal error:
Pet does not conform to KeyStringDecodable
Add a file protocol like
public protocol FileProtocol {
func load(path: String) throws -> Bytes
func save(bytes: Bytes, to path: String) throws
}
In Xcode 11, if you open the Package.swift file directly (to get a new Xcode 11 Swift Package project) uses of DirectoryConfig.workDir
fail, probably due to DerviedData being in a new place. This breaks .env
and Leaf etc.
Current workaround - use swift package generate-xcodeproj
and use the generated project
Add the ability to init Bytes from a hex string and also to convert bytes to hex strings.
public protocol SequenceInitializable: Sequence {
init(_ sequence: [Iterator.Element])
}
/**
Provides access to hexStrings
Move to vapor/core
*/
extension SequenceInitializable where Iterator.Element == Byte {
public init(hexString: String) {
var data = Bytes()
var gen = hexString.characters.makeIterator()
while let c1 = gen.next(), let c2 = gen.next() {
let s = String([c1, c2])
guard let d = Byte(s, radix: 16) else {
break
}
data.append(d)
}
self.init(data)
}
}
extension Sequence where Iterator.Element == Byte {
public var hexString: String {
#if os(Linux)
return self.lazy.reduce("") { $0 + (NSString(format:"%02x", $1).description) }
#else
let s = self.lazy.reduce("") { $0 + String(format:"%02x", $1) }
return s
#endif
}
}
At the moment we are implementing `flatten ourself in
core/Sources/Async/Future+Flatten.swift
Line 42 in 3b72f2c
We could investigate whether we could replace that with an almost-trivial call to https://github.com/apple/swift-nio/blob/82a6e4d8215660005127547106aa8cf10817cb78/Sources/NIO/EventLoopFuture.swift#L915.
I found the current version is 2.2.0,but the version in cocoapods is still 2.0.0.
Process.asyncExecute
contains this code:
core/Sources/Core/Process+Execute.swift
Lines 99 to 117 in 96ce86e
In particular, there's an unsynchronised, shared variable running
that's read and written to from multiple threads. That is undefined behaviour which might amongst random crashes, infinite while running
loops (even if running
gets set to false) might lead to arbitrary worse behaviour.
This can easily be fixed by using a lock around every use of running
. But I'd recommend restructuring the code. At present it keeps three background threads blocked for every execution of a process. Worse, because Dispatch
normally uses a finitely sized thread-pool this code might just randomly deadlock. The reason it might randomly deadlock is that it will only finish when this code is executed:
core/Sources/Core/Process+Execute.swift
Lines 135 to 139 in 96ce86e
But the promise.succeed
is inside of a globalQueue.async
which needs an available dispatch thread to run. And while it waits for that dispatch thread to become available it blocks to others (to read stderr
and stdout
). In other words: We need three available dispatch threads to make progress which is an anti-pattern in Dispatch because the thread pool has a finite number of threads so it can totally happen that all of Dispatch's threads are blocked and only become unblocked when more threads become available (which won't happen if the thread pool is exhausted).
extension ReflectionDecodable where Self: CaseIterable {
public static func reflectDecoded() throws -> (Self, Self) {
guard !allCases.isEmpty, allCases.count > 1 else { throw ReflectionError() }
guard let first = allCases.first, let last = allCases.last else { throw ReflectionError() }
return (first, last)
}
}
4.2 PR ?
Currently, Future.flatMap
is implemented like this:
core/Sources/Async/Future+Map.swift
Line 45 in fda3ebd
Would it be possible to call through to SwiftNIO's implementation of Future.then
instead?
Let me know if I'm missing something.
I have a table with over 100 columns. Using migrations addProperties(to: builder)
has no issues, but when specifying each column using builder.field(for: \.myColumn)
, then bad things happen.
Memory usage climbs to over 100mb and the execution is frozen for ~1 minute. From profiling, I believe CodableReflection is the cause of this, specifically this function:
public static func anyDecodeProperty(valueType: Any.Type, keyPath: AnyKeyPath) throws -> ReflectedProperty?
I think when the context is active, it should return the reflected.1
. However currently it returns reflected.0
.
func decode<T>(_ type: T.Type, forKey key: K) throws -> T where T : Decodable {
if nextIsOptional {
context.addProperty(type: T?.self, at: codingPath + [key])
nextIsOptional = false
} else {
context.addProperty(type: T.self, at: codingPath + [key])
}
if let type = T.self as? AnyReflectionDecodable.Type, let reflected = try? type.anyReflectDecoded() {
if context.isActive {
context.activeCodingPath = codingPath + [key]
return reflected.0 as! T
}
return reflected.1 as! T
} else {
let decoder = ReflectionDecoder(codingPath: codingPath + [key], context: context)
return try T(from: decoder)
}
}
The default implementation of ReflectionDecodable sets the .0 to be falsy value and .1 to be truthy value.
eg.
extension Bool: ReflectionDecodable {
/// See `ReflectionDecodable.reflectDecoded()` for more information.
public static func reflectDecoded() -> (Bool, Bool) { return (false, true) }
}
extension FixedWidthInteger {
/// See `ReflectionDecodable.reflectDecoded()` for more information.
public static func reflectDecoded() -> (Self, Self) { return (0, 1) }
}
The latest 3.6.0 release breaks type casting, xcode mentions that a forced cast from Error
to Debuggable
always succeeds. I use this quite a bit in my unit tests, but i also noticed that the Logger
also notices this, saying that the case is already handled, but i don't think it actually is.
Happening on line 29
public func report(error e: Error,...
switch e {
...
default:
let reason: String
switch e {
case let localized as LocalizedError: reason = localized.localizedDescription
// Case is already handled by previous patterns; consider removing it
case let convertible as CustomStringConvertible: reason = convertible.description
default: reason = "\(e)"
}
Looks like conforming NSError
to Debuggable
causes incorrect type casting. A quick test;
enum DebuggableTest: Debuggable {
case foo
var identifier: String {
switch self {
case .foo: return "foo"
}
}
var reason: String {
switch self {
case .foo: return "FooBar"
}
}
static func test() throws {
throw DebuggableTest.foo
}
}
func testDebuggableTest() throws {
// Works fine, no type casting happening
XCTAssertEqual(DebuggableTest.foo.identifier, "foo")
XCTAssertThrowsError(try DebuggableTest.test(), "test") { err in
// err is Error
// Notices that a force downcast from `Error` to `Debuggable` always succeeds, so Error probably conforms to NSError?
// Test fails, because the identifier is "0", should be "foo"
XCTAssertEqual(DebuggableTest.foo.identifier, (err as! Debuggable).identifier)
}
let downcast: Error = DebuggableTest.foo
let upcast = downcast as Debuggable
// Prints "0" as per NSError extension, instead of "foo"
// All of this works fine without the NSError extension
print(upcast.identifier)
}
Is there somewhere where Error
actually conforms to NSError
? Since Xcode/Swift notices that the downcast always succeeds.
It doesn't actually creates a DebuggableTest
but just uses the identifier getter from the NSError extension.
Is there another way to cast i should use?
A goal for version 4 of this package is to move all helpers in the Async
module upstream and remove the dependency on Swift NIO here. The reasoning is:
This will obviously be quite a big breaking change, so this is open to discussion!
swift snapshot 2016-12-07-a on Ubuntu 16.04
daniel@ubuntu:~$ cd core/
daniel@ubuntu:~/core$ swift build
Compile Swift Module 'libc' (1 sources)
Compile Swift Module 'Core' (28 sources)
0 swift 0x00000000034be138
1 swift 0x00000000034be876
2 libpthread.so.0 0x00007f2a92a163e0
3 swift 0x0000000000e0a42c
4 swift 0x0000000000e0a9cf
5 swift 0x000000000064f1bd
6 swift 0x0000000000651fb6
7 swift 0x000000000061a7aa
8 swift 0x0000000000612924
9 swift 0x00000000006b7522
10 swift 0x00000000006b70fd
11 swift 0x000000000061758b
12 swift 0x000000000061847b
13 swift 0x0000000000618ad5
14 swift 0x0000000000480870
15 swift 0x000000000047c28c
16 swift 0x000000000043aca7
17 libc.so.6 0x00007f2a9112f830 __libc_start_main + 240
18 swift 0x00000000004380e9
Stack dump:
0. Program arguments: /home/daniel/apple/usr/bin/swift -frontend -c /home/daniel/core/Sources/Core/Dispatch.swift /home/daniel/core/Sources/Core/Result.swift /home/daniel/core/Sources/Core/Semaphore.swift /home/daniel/core/Sources/Core/RFC1123.swift /home/daniel/core/Sources/Core/Bool+String.swift /home/daniel/core/Sources/Core/Sequence.swift /home/daniel/core/Sources/Core/Extractable.swift /home/daniel/core/Sources/Core/Portal.swift /home/daniel/core/Sources/Core/String+CaseInsensitiveCompare.swift /home/daniel/core/Sources/Core/Strand.swift /home/daniel/core/Sources/Core/Equatable.swift /home/daniel/core/Sources/Core/DispatchTime+Utilities.swift -primary-file /home/daniel/core/Sources/Core/StaticDataBuffer.swift /home/daniel/core/Sources/Core/String.swift /home/daniel/core/Sources/Core/Lock.swift /home/daniel/core/Sources/Core/Box.swift /home/daniel/core/Sources/Core/UnsignedInteger.swift /home/daniel/core/Sources/Core/Collection+Safe.swift /home/daniel/core/Sources/Core/FileProtocol.swift /home/daniel/core/Sources/Core/Array.swift /home/daniel/core/Sources/Core/PercentEncoding.swift /home/daniel/core/Sources/Core/Byte/Bytes.swift /home/daniel/core/Sources/Core/Byte/Byte.swift /home/daniel/core/Sources/Core/Byte/ByteAliases.swift /home/daniel/core/Sources/Core/Byte/BytesSlice+PatternMatching.swift /home/daniel/core/Sources/Core/Byte/Byte+Random.swift /home/daniel/core/Sources/Core/Byte/Bytes+Base64.swift /home/daniel/core/Sources/Core/Byte/BytesConvertible.swift -target x86_64-unknown-linux-gnu -disable-objc-interop -I /home/daniel/core/.build/debug -enable-testing -g -module-cache-path /home/daniel/core/.build/debug/ModuleCache -D SWIFT_PACKAGE -emit-module-doc-path /home/daniel/core/.build/debug/Core.build/StaticDataBuffer~partial.swiftdoc -Onone -parse-as-library -module-name Core -emit-module-path /home/daniel/core/.build/debug/Core.build/StaticDataBuffer~partial.swiftmodule -emit-dependencies-path /home/daniel/core/.build/debug/Core.build/StaticDataBuffer.d -emit-reference-dependencies-path /home/daniel/core/.build/debug/Core.build/StaticDataBuffer.swiftdeps -num-threads 8 -o /home/daniel/core/.build/debug/Core.build/StaticDataBuffer.swift.o
1. While silgen constructor initializer SIL function @_TFC4Core16StaticDataBuffercuRxs8SequenceWx8Iterator7Element_zVs5UInt8rfT5bytesx_S0_ for 'init' at /home/daniel/core/Sources/Core/StaticDataBuffer.swift:12:12
<unknown>:0: error: unable to execute command: Segmentation fault
<unknown>:0: error: compile command failed due to signal (use -v to see invocation)
<unknown>:0: error: build had 1 command failures
error: exit(1): /home/daniel/apple/usr/bin/swift-build-tool -f /home/daniel/core/.build/debug.yaml
This should be in core, also needs a cleanup.
When working with Vapor, I recently was surprised to learn that Future.map
was a synchronous method that returns a future. I had been under the mistaken impression that it executed the closure on the event loop.
Compare: https://github.com/vapor/core/blob/master/Sources/Async/Future%2BGlobal.swift#L11-L21
with .submit
: https://github.com/apple/swift-nio/blob/ae13d135f79e7b60281f9bf4c1cf1b3341a7339f/Sources/NIO/EventLoop.swift#L268-L280
Just checking that this wasn't an oversight, because the two methods appear to be very close in implementation.
The error message should be better here.
Allows greater flexibility, but you get the same result. Not sure what the effect on performance you get.
public static func decodeProperty(forKey keyPath: AnyKeyPath) throws -> ReflectedProperty? {
let T = type(of: keyPath).valueType
guard T.self is AnyReflectionDecodable.Type else {
throw CoreError(identifier: "ReflectionDecodable", reason: "`\(T.self)` does not conform to `ReflectionDecodable`.")
}
if let cached = ReflectedPropertyCache.storage[keyPath] {
return cached
}
var maxDepth = 0
a: while true {
defer { maxDepth += 1 }
var activeOffset = 0
if maxDepth > 42 {
return nil
}
b: while true {
defer { activeOffset += 1 }
let context = ReflectionDecoderContext(activeOffset: activeOffset, maxDepth: maxDepth)
let decoder = ReflectionDecoder(codingPath: [], context: context)
let decoded = try Self(from: decoder)
guard let codingPath = context.activeCodingPath else {
// no more values are being set at this depth
break b
}
guard let t = T.self as? AnyReflectionDecodable.Type else {
break b
}
if try t.anyReflectDecodedIsLeft(decoded[keyPath: keyPath] as Any) {
let property = ReflectedProperty(any: T.self, at: codingPath.map { $0.stringValue })
ReflectedPropertyCache.storage[keyPath] = property
return property
}
}
}
}
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.