Git Product home page Git Product logo

swift-server-community / apnswift Goto Github PK

View Code? Open in Web Editor NEW
677.0 18.0 102.0 479 KB

📱HTTP/2 Apple Push Notification Service built with swift - send push notifications to iOS, iPadOS, tvOS, macOS, watchOS, visionOS, and Safari!

License: Apache License 2.0

Swift 99.12% Dockerfile 0.13% Shell 0.75%
swift swift-nio-http2 swift-nio apns apns-http2 sswg apnswift apple apple-push-notifications safari-push-notifications

apnswift's People

Contributors

0xtim avatar code28 avatar diggory avatar dimitribouniol avatar ffried avatar finestructure avatar florianreinhart avatar fpseverino avatar franzbusch avatar grighakobian avatar grosch avatar gverdouw avatar itcohorts avatar junyukuang avatar jverkoey avatar kylebrowning avatar ladiesman218 avatar lgaches avatar lukascz avatar mackoj avatar madsodgaard avatar mark-urbanthings avatar nakajima avatar paunik avatar rodericj avatar ryu0118 avatar tanner0101 avatar timaellis avatar vojtarylko avatar wangzhizhou avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

apnswift's Issues

[BUG]'APNSwiftAlert' is deprecated: renamed to 'APNSwiftAlert'

I receive the following warning message:
'APNSwiftAlert' is deprecated: renamed to 'APNSwiftAlert'
Use 'APNSwiftAlert' instead
with code:
let alert = APNSwiftPayload.APNSwiftAlert( title: "", subtitle:"", body: "" )

Platform:

  • Xcode 13.1
  • Version apnswift 3.2.0

[BUG] Build failed after add APNSwift through Swift Package Manager

After add APNSwift, I try to cmd+B but I got fail. The error messages these below.

Undefined symbol: _ECDSA_SIG_free
Undefined symbol: _ECDSA_do_sign
Undefined symbol: _BIO_free
Undefined symbol: _BIO_s_mem
Undefined symbol: _PEM_read_bio_ECPrivateKey
Undefined symbol: _BN_num_bits
Undefined symbol: _EC_KEY_free
Undefined symbol: _BN_bn2bin
Undefined symbol: _BIO_new
Undefined symbol: _BIO_write
Undefined symbol: _SHA256_Final
Undefined symbol: _SHA256_Update
Undefined symbol: _SHA256_Init

Support for cert authentication

It would be amazing to have access to cert authentication. In big corporation like ours we never get access to anything else :(

Build fails on Linux : use of undeclared type 'BIGNUM'

Building on Linux fails with several of the following

/srv/datadisk01/www/VideoSaverServer/.build/checkouts/APNSwift/Sources/APNSwift/APNSwiftSigner.swift:56:31: error: use of undeclared type 'BIGNUM'
        var r : UnsafePointer<BIGNUM>? = nil

Swift version 5.1-dev
Ubuntu 18

[BUG] ES256 signer is not according to spec

Describe the bug
The ES256 implementation in APNSwiftSigner stores the signature in the DEM format. According to the spec the signature should be the concatenation of the R and S values as big-endian integers.

It's funny, because Apple's server actually accepts these JWTs. When you try to check a JWT generated from this library with jwt.io you will however get an "Invalid Signature" error.

If you change the code to produce the correct format, Apple's server is still happy. So I'm not sure what the best course of action is? Probably would be better to use the correct encoding, wdyt?

The correct encoding would be something like this:

let sig = try digest.withUnsafeBytes { ptr -> UnsafeMutablePointer<ECDSA_SIG> in
    guard let sig = ECDSA_do_sign(ptr.baseAddress?.assumingMemoryBound(to: UInt8.self), Int32(ptr.count), pkey) else {
        throw SigningError("Error while signing.")
    }
    return sig
}
defer { ECDSA_SIG_free(sig) }

let r = sig.pointee.r
let s = sig.pointee.s

var rb = [UInt8](repeating: 0, count: Int(BN_num_bits(r)+7)/8)
var sb = [UInt8](repeating: 0, count: Int(BN_num_bits(s)+7)/8)
let lenr = Int(BN_bn2bin(r, &rb))
let lens = Int(BN_bn2bin(s, &sb))

return Array(rb[0..<lenr] + sb[0..<lens])

Example

Generate a new key pair:
openssl ecparam -genkey -name prime256v1 -noout -out ec256-key-pair.pem

Private Key

-----BEGIN EC PRIVATE KEY-----
MHcCAQEEIEY5/amzr1QgHrLNZ8eHu926YERGWqB6QaDpNFcGxjsToAoGCCqGSM49
AwEHoUQDQgAEdbP7WQ/U4e5/CAqoBxatQb/5CEgJ070yMNGmWg5O6v2Q4M0l4CXK
cc94a66VttRZgVg6jE/ju+2mdHP7JWLmcQ==
-----END EC PRIVATE KEY-----

Public Key

-----BEGIN PUBLIC KEY-----
MFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEdbP7WQ/U4e5/CAqoBxatQb/5CEgJ
070yMNGmWg5O6v2Q4M0l4CXKcc94a66VttRZgVg6jE/ju+2mdHP7JWLmcQ==
-----END PUBLIC KEY-----

Using this library produces for example this JWT:

eyJraWQiOiJEOUFZSVhJM0ZKIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJQSVo4SEpOVkJCIiwiaWF0IjoxNTY1MjU5NjQxfQ.MEUCIBWC-39SmgpRt_u6KJoroxahLprEo0cSLCoTFQOuXF6SAiEAxkpZob5j4RioIuW323lUAAAqbXE7E1A5JbHshjsMMiQ

If you copy this and try to verify it in jwt.io, it will fail.

With the encoding shown above you will get the following JWT. This JWT verifies correctly on jwt.io

eyJraWQiOiJEOUFZSVhJM0ZKIiwiYWxnIjoiRVMyNTYifQ.eyJpc3MiOiJQSVo4SEpOVkJCIiwiaWF0IjoxNTY1MjU5NjQxfQ.Mt2H-xWK4Z_at-thGusdit-eOYa9EksMu_LvVBa1irvQ7qfuZ1KcqH61d48eOI2ZaK_cgGNLAijwg3f2WF_mJA

[BUG] Dependancy issue when adding to Vapor project

After adding APNSwift to any of my Vapor 3.0.0 or 3.3.1 projects, using Swift package manger and then updating, half way through updating the packages, Swift package manager will hang and go to 100% cpu.
I'm able to build and run APNSwift and Vapor project independently but when adding APNSwift to Vapor it hangs.

It also hangs when only adding swift-nio-http2 to a Vapor project.
It did not hang when changing APNSwift dependencies versions to:

    dependencies: [
        .package(url: "https://github.com/apple/swift-nio", from: "1.0.0"),
        .package(url: "https://github.com/apple/swift-nio-ssl", from: "1.0.0"),
        .package(url: "https://github.com/apple/swift-nio-http2", .upToNextMinor(from: "0.1.0"))
    ],

To Reproduce
Steps to reproduce the behavior:

  1. Add APNSwift to a Vapor project
    dependencies: [
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/vapor/fluent-sqlite.git", from: "3.0.0"),
        .package(url: "https://github.com/kylebrowning/APNSwift.git", .upToNextMinor(from: "1.3.0"))
    ],
  1. Update dependancies.
  2. After updating a few packages Swift package manager should hang and go to 100% CPU on one thread.

Expected behavior
Vapor project should update successfully project.

Platform:

  • OS: Mac OS 10.14.5 (Xcode 10& 11 installed) & Mac OS 10.15 (Xcode 11)
  • APNSwift 1.3.0
  • Vapor 3.0.0

Additional context
Hopefully this is just me being dumb and not doing something correctly 🤞

HTTP2 pipeline is configured too early

I think you have a bug here:

https://github.com/kylebrowning/swift-nio-http2-apns/blob/4fa6353d29ac7eb0fe5ad3656ba04ee1eda8ea87/Sources/NIOAPNS/APNSConnection.swift#L18

If the connection to the first initialized channel fails then you'll capture the wrong multiplexer instance (because the happy eyeballs connector will call the channelInitializer multiple times).

Moving the call to configureHTTP2Pipeline to a callback once you have a connection should fix it up!

[Question] - SwiftPM seems to hang when i include this dependency in a new vapor project

Wasn't sure where else to post this, but including this as a dependency causes SwiftPM to hang. If I include the dependency it hangs on explicitly, it hangs on a different one... I'm not sure where to look to see what's going on, the best I can do is use --verbose when updating vapor.

╰─❱ vapor update --verbose
Updating ...
Updating https://github.com/vapor/vapor.git
Updating https://github.com/kylebrowning/APNSwift.git
Updating https://github.com/vapor/service.git
Updating https://github.com/vapor/url-encoded-form.git
Updating https://github.com/vapor/template-kit.git
Updating https://github.com/vapor/routing.git
Updating https://github.com/vapor/multipart.git
Updating https://github.com/vapor/crypto.git
Updating https://github.com/vapor/core.git
Updating https://github.com/vapor/console.git
Updating https://github.com/vapor/database-kit.git
Updating https://github.com/vapor/http.git
Updating https://github.com/vapor/websocket.git
Updating https://github.com/vapor/validation.git
Updating https://github.com/apple/swift-nio.git
Updating https://github.com/apple/swift-nio-zlib-support.git
Updating https://github.com/apple/swift-nio-ssl-support.git
Updating https://github.com/apple/swift-nio-ssl.git
Updating https://github.com/apple/swift-nio-http2.git

Here is my package.swift

// swift-tools-version:4.0
import PackageDescription

let package = Package(
    name: "hackathon",
    products: [
        .library(name: "hackathon", targets: ["App"]),
    ],
    dependencies: [
        // 💧 A server-side Swift web framework.
        .package(url: "https://github.com/vapor/vapor.git", from: "3.0.0"),
        .package(url: "https://github.com/kylebrowning/APNSwift.git", from: "1.0.0")
//        .package(url: "https://github.com/apple/swift-nio-http2.git", from: "1.3.0"),
    ],
    targets: [
        .target(name: "App", dependencies: ["Vapor", "APNSwift"]),
        .target(name: "Run", dependencies: ["App"]),
        .testTarget(name: "AppTests", dependencies: ["App"])
    ]
)

If I uncomment the latter package, it hangs on a different package:

╰─❱ vapor update --verbose
Updating ...
Updating https://github.com/vapor/vapor.git
Updating https://github.com/kylebrowning/APNSwift.git
Updating https://github.com/apple/swift-nio-http2.git
Updating https://github.com/vapor/template-kit.git
Updating https://github.com/vapor/routing.git
Updating https://github.com/vapor/http.git
Updating https://github.com/vapor/url-encoded-form.git
Updating https://github.com/vapor/service.git
Updating https://github.com/vapor/console.git
Updating https://github.com/vapor/database-kit.git
Updating https://github.com/vapor/multipart.git
Updating https://github.com/vapor/core.git
Updating https://github.com/vapor/crypto.git
Updating https://github.com/vapor/websocket.git
Updating https://github.com/vapor/validation.git
Updating https://github.com/apple/swift-nio.git
Updating https://github.com/apple/swift-nio-zlib-support.git
Updating https://github.com/apple/swift-nio-ssl-support.git
Updating https://github.com/apple/swift-nio-ssl.git

I'm willing to dig in to resolve this, just not sure where I should look at this point

NOTE: it completes fine if I remove APNSwift

unit tests

This package needs some unit tests. I'm not sure how to get access to a shared key for communicating with APNS though. Does apple have any public dev keys?

Crash on Linux

let apns = try APNSwiftConnection.connect(configuration: apnsConfig, on: group.next()).wait()

This sample code crashes for me when run on Linux, macOS works, though. This is the log:

Precondition failed: BUG DETECTED: wait() must not be called when on an EventLoop.
Calling wait() on any EventLoop can lead to

  • deadlocks
  • stalling processing of other connections (Channels) that are handled on the EventLoop that wait was called on

Further information:

  • current eventLoop: Optional(SelectableEventLoop { selector = Selector { descriptor = 12 }, thread = NIOThread(name = NIO-ELT-0-#0), scheduledTasks = PriorityQueue(count: 1): [ScheduledTask(readyTime: 126607040292521)] })
  • event loop associated to future: SelectableEventLoop { selector = Selector { descriptor = 17 }, thread = NIOThread(name = NIO-ELT-1-#0) }
    Current stack trace:
    0 libswiftCore.so 0x00007fe2ed12eae0 swift_reportError + 50
    1 libswiftCore.so 0x00007fe2ed1a7270 swift_stdlib_reportFatalErrorInFile + 109
    2 libswiftCore.so 0x00007fe2eceb44d2 + 1414354
    3 libswiftCore.so 0x00007fe2eceb41fb + 1413627
    4 libswiftCore.so 0x00007fe2eceb2ee0 assertionFailure(:
    :file:line🎏) + 447
    5 MicroSwitch 0x000055885dd35e3b + 12746299
    6 MicroSwitch 0x000055885dd3c1ee + 12771822
    7 MicroSwitch 0x000055885da7ddf7 + 9895415
    8 MicroSwitch 0x000055885d9ea4c8 + 9290952
    9 MicroSwitch 0x000055885d9e9f6c + 9289580
    10 MicroSwitch 0x000055885d9eacf4 + 9293044
    11 MicroSwitch 0x000055885d9ecd14 + 9301268
    12 libswiftCore.so 0x00007fe2ecf15f00 Sequence.forEach(:) + 413
    13 MicroSwitch 0x000055885d9e9d8e + 9289102
    14 MicroSwitch 0x000055885d9ead3c + 9293116
    15 MicroSwitch 0x000055885d9ead84 + 9293188
    16 libswiftCore.so 0x00007fe2ecf15f00 Sequence.forEach(
    :) + 413
    17 MicroSwitch 0x000055885d9e9a93 + 9288339
    18 MicroSwitch 0x000055885d9eb259 + 9294425
    19 MicroSwitch 0x000055885d9dc304 + 9233156
    20 MicroSwitch 0x000055885d9dc3f7 + 9233399
    21 MicroSwitch 0x000055885d9dc333 + 9233203
    22 MicroSwitch 0x000055885d817c8e + 7380110
    23 MicroSwitch 0x000055885d814f33 + 7368499
    24 MicroSwitch 0x000055885d814da9 + 7368105
    25 MicroSwitch 0x000055885d94322c + 8606252
    26 MicroSwitch 0x000055885d943113 + 8605971
    27 MicroSwitch 0x000055885d942f5a + 8605530
    28 MicroSwitch 0x000055885d942ee0 + 8605408
    29 MicroSwitch 0x000055885d8162f0 + 7373552
    30 MicroSwitch 0x000055885d818ea3 + 7384739
    31 MicroSwitch 0x000055885d909ae0 + 8370912
    32 MicroSwitch 0x000055885d908fb1 + 8368049
    33 MicroSwitch 0x000055885d90b959 + 8378713
    34 MicroSwitch 0x000055885da420e9 + 9650409
    35 MicroSwitch 0x000055885da3e8da + 9636058
    36 MicroSwitch 0x000055885da3e78d + 9635725
    37 MicroSwitch 0x000055885dc78974 + 11970932
    38 MicroSwitch 0x000055885dc749fe + 11954686
    39 MicroSwitch 0x000055885dc79f19 + 11976473
    40 MicroSwitch 0x000055885dc961ba + 12091834
    41 MicroSwitch 0x000055885dc7eaa4 + 11995812
    42 MicroSwitch 0x000055885dc82749 + 12011337
    43 MicroSwitch 0x000055885da42250 + 9650768
    44 MicroSwitch 0x000055885da46b4c + 9669452
    45 MicroSwitch 0x000055885da301d1 + 9576913
    46 MicroSwitch 0x000055885d8c7c2d + 8100909
    47 MicroSwitch 0x000055885da42250 + 9650768
    48 MicroSwitch 0x000055885da46b4c + 9669452
    49 MicroSwitch 0x000055885dc185ee + 11576814
    50 MicroSwitch 0x000055885dc1a619 + 11585049
    51 MicroSwitch 0x000055885da42250 + 9650768
    52 MicroSwitch 0x000055885da3ea5a + 9636442
    53 MicroSwitch 0x000055885da4476d + 9660269
    54 MicroSwitch 0x000055885dcca3aa + 12305322
    55 MicroSwitch 0x000055885dccb372 + 12309362
    56 MicroSwitch 0x000055885dccc4d9 + 12313817
    57 MicroSwitch 0x000055885dd3840f + 12755983
    58 MicroSwitch 0x000055885dd39cef + 12762351
    59 MicroSwitch 0x000055885dd3a063 + 12763235
    60 MicroSwitch 0x000055885dd3ea84 + 12782212
    61 MicroSwitch 0x000055885dd428a9 + 12798121
    62 MicroSwitch 0x000055885dd496a4 + 12826276
    63 MicroSwitch 0x000055885dd39989 + 12761481
    64 MicroSwitch 0x000055885dd3d054 + 12775508
    65 MicroSwitch 0x000055885d9c9c1f + 9157663
    66 MicroSwitch 0x000055885dd3d074 + 12775540
    67 MicroSwitch 0x000055885dd34862 + 12740706
    68 MicroSwitch 0x000055885dd3886d + 12757101
    69 MicroSwitch 0x000055885dd02e01 + 12537345
    70 MicroSwitch 0x000055885dd034ae + 12539054
    71 MicroSwitch 0x000055885dd08683 + 12560003
    72 MicroSwitch 0x000055885dd01a1f + 12532255
    73 MicroSwitch 0x000055885dd71491 + 12989585
    74 MicroSwitch 0x000055885dd74012 + 13000722
    75 MicroSwitch 0x000055885dd74179 + 13001081
    76 libpthread.so.0 0x00007fe2ecb93609 + 38409
    77 libc.so.6 0x00007fe2ec009250 clone + 67
    Illegal instruction (core dumped)

Platform:

  • OS: Ubuntu 20.04, Swift 5.5.1

APNSwift and Vapor 3

Is there a release or branch that still supports Vapor 3? I am not ready to migrate to Vapor 4 yet but would still like to implement push notifications using APNSwift. I attempted to use the following code below in my Package.swift file:

package(url: "https://github.com/kylebrowning/APNSwift.git", .exact("1.3.0"))

Unfortunately this throws multiple errors (along with v1.7) about requiring certain versions of Vapor and other dependent packages.

Redefinition of ECDSA_SIG_st

Pulled off of Master and am getting this when compiling for the first time:

<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16: error: redefinition of 'ECDSA_SIG_st'
typedef struct ECDSA_SIG_st {
               ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:78:16: note: previous definition is here
typedef struct ECDSA_SIG_st {
               ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:15:3: error: typedef redefinition with different types ('struct (anonymous struct at /Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16)' vs 'struct ECDSA_SIG_st')
} ECDSA_SIG;
  ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:81:3: note: previous definition is here
} ECDSA_SIG;
  ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/NIOAPNS/DataSigner.swift:8:8: error: could not build Objective-C module 'CAPNSOpenSSL'
import CAPNSOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16: error: redefinition of 'ECDSA_SIG_st'
typedef struct ECDSA_SIG_st {
               ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:78:16: note: previous definition is here
typedef struct ECDSA_SIG_st {
               ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:15:3: error: typedef redefinition with different types ('struct (anonymous struct at /Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16)' vs 'struct ECDSA_SIG_st')
} ECDSA_SIG;
  ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:81:3: note: previous definition is here
} ECDSA_SIG;
  ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/NIOAPNS/DataSigner.swift:8:8: error: could not build Objective-C module 'CAPNSOpenSSL'
import CAPNSOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16: error: redefinition of 'ECDSA_SIG_st'
typedef struct ECDSA_SIG_st {
               ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:78:16: note: previous definition is here
typedef struct ECDSA_SIG_st {
               ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:15:3: error: typedef redefinition with different types ('struct (anonymous struct at /Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16)' vs 'struct ECDSA_SIG_st')
} ECDSA_SIG;
  ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:81:3: note: previous definition is here
} ECDSA_SIG;
  ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/NIOAPNS/DataSigner.swift:8:8: error: could not build Objective-C module 'CAPNSOpenSSL'
import CAPNSOpenSSL
       ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16: error: redefinition of 'ECDSA_SIG_st'
typedef struct ECDSA_SIG_st {
               ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:78:16: note: previous definition is here
typedef struct ECDSA_SIG_st {
               ^
<module-includes>:1:9: note: in file included from <module-includes>:1:
#import "shim.h"
        ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:15:3: error: typedef redefinition with different types ('struct (anonymous struct at /Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/CAPNSOpenSSL/shim.h:12:16)' vs 'struct ECDSA_SIG_st')
} ECDSA_SIG;
  ^
/usr/local/Cellar/openssl/1.0.2p/include/openssl/ecdsa.h:81:3: note: previous definition is here
} ECDSA_SIG;
  ^
/Users/local/Projects/AG Projects/TestAPNS/swift-nio-http2-apns/Sources/NIOAPNS/DataSigner.swift:8:8: error: could not build Objective-C module 'CAPNSOpenSSL'
import CAPNSOpenSSL
       ^

Potential Channel/ChannelHandler leak in APNSwift

Sorry, this isn't the best bug report ever because it's literally an image that I saw in the Vapor discord that prompted me to file this. Here's the message. As you can see in the image that was sent with the message, there are 234 WaitForTLSUpHandlers still alive, I reckon they're leaked somehow.

We should investigate if APNSwift is leaking either whole Channels or WaitForTLSUpHandlers, potentially this only happens in error cases?

Support for raw payloads

I occasionally have a requirement where I have raw string payloads that I'd like to send over APNS. I couldn't see a way to pass a string payload with the current set of classes and protocols. Is this something you'd be willing to support?

E.g. I just want to be able to pass something like the following:

{ "aps": { "alert": "hello world", "badge": 9, "sound": "bingbong.aiff"} ,"g": {"l": "appme:///dispatch/us?utm_medium=notification&utm_source=ec&utm_campaign=20171018"}}

Add apns-collapse-id

iOS 10 supports removable notifications by using apns-collapse-id header. That would be cool if you make this feature

https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CommunicatingwithAPNs.html

The appropriate encoding to employ for the apns-id, apns-expiration, and apns-collapse-id request headers differs depending on whether it is part of the initial or a subsequent POST operation, as follows:
The first time you send these headers, encode them with incremental indexing to allow the header names to be added to the dynamic table
Subsequent times you send these headers, encode them as literal header fields without indexing

Potential deadlock only reproducible in Linux when reusing connections

Describe the bug
I'm using APNSwift to deliver push notifications.
I'm having a deadlock (or something that never fulfill the EventLoopFuture that is returned on the .send method of APNSwiftConnection).

For context, the service I’m trying to run polls messages from a SQS queue, and then sends them using the APNSwift library.
I kept the service up all night processing notifications on a couple macOS machines and this morning they were still working. I can’t get the Linux service to work for more than 40 minutes.

I have 2 main components:

  • The QueueProcessor (1 instance)
  • The PushNotificationSender (1 instance)

While I’m sending messages via APNSwift, I stop polling from SQS.
This is how my PushNotificationSender looks like (I omitted some functions for clarity):

class PushNotificationSender {
    let group = MultiThreadedEventLoopGroup(numberOfThreads: System.coreCount)
    
    lazy var productionAPNS = connectProduction()
    lazy var sandboxAPNS = connectSandbox()
    
    func sendPush(_ pushNotificationMessage: PushNotificationMessage) -> EventLoopFuture<Void> {
        let endpoint = pushNotificationMessage.production ?
            productionAPNS.flatMapError { _ in self.connectProduction() } :
            sandboxAPNS.flatMapError { _ in self.connectSandbox() }
        
        return endpoint
            .flatMapErrorThrowing { _ in
                throw PushNotificationSenderError.connectionError
            }
            .flatMap {
                $0.send(
                    self.apnsPayload(pushNotificationMessage: pushNotificationMessage),
                    to: pushNotificationMessage.token,
                    expiration: Date().addingTimeInterval(Constants.notificationExpiration))
                    .flatMapErrorThrowing(self.flatMapErrorThrowing(error:))
            }
    }private func connectProduction() -> EventLoopFuture<APNSwiftConnection> {
        APNSwiftConnection.connect(configuration: .configuration(environment: .production),
                                   on: group.next())
    }
    
    private func connectSandbox() -> EventLoopFuture<APNSwiftConnection> {
        APNSwiftConnection.connect(configuration: .configuration(environment: .sandbox),
                                   on: group.next())
    }
}

I’m not entirely sure if it’s a deadlock or not, but it happens on the send method.

❌ Looking at my server logs (as I passed a logger to the APNSwift lib), this is what I see:

2020-06-24T20:21:46+0000 debug: Send - starting up
2020-06-24T20:21:46+0000 info: Send - sending
2020-06-24T20:21:46+0000 debug: Request - building

This is the source of the APNSwift library where that is logged

✅ This is the sequence of events when the APNS connection is not reused and everything’s fine:

2020-06-25T09:59:30+0200 debug: Connection - starting
2020-06-25T09:59:30+0200 debug: Connection - bringing up
2020-06-25T09:59:30+0200 info: Connection - up
2020-06-25T09:59:30+0200 debug: Send - starting up
2020-06-25T09:59:30+0200 info: Send - sending
2020-06-25T09:59:30+0200 debug: Request - building
2020-06-25T09:59:30+0200 debug: Response - received
2020-06-25T09:59:30+0200 info: Response - successful

✅ This is the sequence of events when the APNS connection is reused and everything’s fine too:

2020-06-25T10:23:08+0200 debug: Send - starting up
2020-06-25T10:23:08+0200 info: Send - sending
2020-06-25T10:23:08+0200 debug: Request - building
2020-06-25T10:23:08+0200 debug: Response - received
2020-06-25T10:23:08+0200 info: Response - successful

I was able to add a workaround, which is to not reuse connections. After doing that, I can’t reproduce the issue anymore on the linux machines. The way I was trying to reuse connections is this:

productionAPNS.flatMapError { _ in self.connectProduction() }

(Assuming the connection would error when closed, which I think it does on macOS)
I also just saw a bug in my code, which is that I’m not keeping the last connection upon reconnection. My productionAPNS var was never updated. To my understanding this bug only should make connections not being reused, but it shouldn’t cause the behavior that I’m seeing, right?

Platform:

  • OS: Ubuntu
  • Version 18.04
  • APNSSwift Dependency: 2.0.0-rc1

Thanks!

Make it possible to not log

Right now, it's not possible to not log, when using e.g. vapor/apns (see also issue #38), because the Request.logger or Application.logger is used as a fallback. When the parameter logger is set to nil, the logging should be disabled.

As a workaround for now, I'm passing the SwiftLogNoOpLogHandler (i.e. Logger(label: "no op logger", factory: { _ in SwiftLogNoOpLogHandler() })), but I'd rather pass nil to remove logging.

I'm happy to open a PR, but maybe we can discuss first about it: At first it's the self.logger fallback for the APNSwiftClient, but there is another fallback to self.configuration.logger in the APNSwiftConnection. The second one is not that a huge deal, because we can just pass nil in the configuration. The first one could maybe use some kind of default value instead of nil to fallback to self.logger. What do you think? Or is this behaviour just like intended?

(A small note, why I want to avoid those logs: They are a bit too verbose for me to be logged in log level info. I can achieve almost the same logs from "outside" the library and add some more detail to the logs.)

retrieving the http/2 multiplexer

In https://github.com/kylebrowning/swift-nio-apns/blob/master/Sources/NIOAPNS/APNSConnection.swift#L22-L40 I just saw that the way you retrieve the http2 multiplexer isn't 100% correct. The issue is that the channelInitializer for ClientBootstraps might be invoked more than once. That is because of happy eyeballs (there might be two channels generated, one for IPv4 and one for IPv6).

In NIO 2.1.0 @Palleas added a new method that should make it quite straightforward to retrieve the multiplexer safely: ChannelPipeline.handler(type:).

The basic idea is:

let channelAndMultiplexer: EventLoopFuture<(Channel, HTTP2StreamMultiplexer )> = ClientBootstrap(...)
    .channelInitializer { ... }
    ....
    .connect()
    .flatMap { channel in
        channel.pipeline.handler(type: HTTP2StreamMultiplexer.self).map { multiplexer in (channel, multiplexer) }
    }

This will actually work because connect only returns you one channel. From that one Channel you can then get the HTTP2StreamMultiplexer with the new handler(type:) in ChannelPipeline.

More info:

NIOTransportServices

Hi!

Would it be possible to support a NIOTSEventloopGroup instead of the MultiThreadedEventLoopGroup for the APNSwiftConnection?

greetings
Oliver

[Open Call] READ ME! Do you use APNSwift? Want to help?

Two of the graduation paths for the SSWG Incubation process out of sandbox are

  • Document that it is being used successfully in production by at least three independent end users which, in the SSWG judgement, are of adequate quality and scope.
  • Have a healthy number of committers.

Eventually I would love to apply to a higher status but I will need the communities help. Just to clarify, I have no plans to abandon, or pawn off the project, just looking for others to help so we can graduate!

  1. Are you using this in production? Attach a 🚀 below
  2. Interested in co-maintainer Attach a 👍 below

(Note, ive added the two reactions below manually for ease of use.)

Minimal Tasks

  • Publicly accessible source managed by an SCM such as github.com or similar
  • Ecosystem
  • Concurrency / IO
  • Testing, CI and Release
  • Concurrency / IO
  • Conventions and Style
  • Longevity
  • Licensing

Incubation Tasks

  • Document that it is being used successfully in production by at least three independent end users which, in the SSWG judgement, are of adequate quality and scope.
  • Have a healthy number of committers.
  • Demonstrate a substantial ongoing flow of commits and merged contributions.
  • Receive a supermajority vote from the SSWG to move to Incubation stage.

Graduation

  • Support new GA versions of Swift within 30d
  • CI setup for two latest Swift.org recommnded versions of Swift
  • CI setup for two latest versions of Swift.org recommnded Linux distributions
  • Unit tests for both macOS and Linux
  • Use official docker (when appropriate)
  • Documented release methodology
  • All packages should always work with at least the latest released version of Swift
  • Explicitly define a project governance and committer process, ideally laid out in a GOVERNANCE.md file and OWNERS.md files respectively
  • Include list of adopters for at least the primary repo ideally laid out in an ADOPTERS.md files or logos on the project website
  • Optionally, have a Developer Certificate of Origin or a Contributor License Agreement

Bulk send to multiple device tokens

Is your feature request related to a problem? Please describe.

I am working on an app which sends APNS with the same content to many devices. I was surprised to find out that this library only sends to one device token at a time, which I assume creates many small requests to Apple APNS service. The upstream service supports specifying many device ID-s in a request, and it feels like this library should too.

Describe the solution you'd like

I would like to have an API to send APNS which would let me specify many device tokens for one send call, as a simple set of Strings.

Describe alternatives you've considered

The alternative is to use the current API and send the APNS to several devices one-by-one. This works, it just creates extra network traffic and many small requests instead one bigger request.

Additional context

Can’t think of anything, feels quite straightforward.

important CI environments missing

From what I can tell, right now we're CI'ing on 5.0 on 18.04 (ie. OpenSSL 1.1) only. Given that APNSwift essentially has code that works different for OpenSSL 1.0/OpenSSL 1.1; as well as for Swift 5.0/5.1, we need at least four environments :(

  • Swift 5.0 on 18.04 (ie. OpenSSL 1.1)
  • Swift 5.0 on 16.04 (ie. OpenSSL 1.0)
  • Swift 5.1 on 18.04 (ie. OpenSSL 1.1)
  • Swift 5.1 on 16.04 (ie. OpenSSL 1.0)

On top of that, we should make use of TSan (thread sanitizer) on 5.1 (swift test --sanitize=thread) as well as ASan (address sanitizer) (swift test --sanitize=address).

[BUG] Please add iOS version to package.swift

Wonderful project, thanks so much for this - totally saved my life!

I'm not sure if the following is a bug or a feature request.

I'm working on a Xcode catalyst (multiplatform) project that uses APNSwift. The MacOS version compiles fine, but when trying to compile the project for iOS it gives the error:

The package product requires minimum platform version 13.0 for the iOS platform, but this target supports 9.0

The reason for this is because APNSwift's Package.swift doesn't contain a definition for minimum iOS version - I fixed it for me by changing the APNSwift package definition to below, but since APNSSwift also works perfectly well on iOS should it have a version number for iOS as well as MacOS?

    name: "apnswift",
    platforms: [
        .macOS(.v10_15),
	.iOS(.v13),
    ], ... 

ASan reports leaks in test suite

Address sanitizer reports a number of leaks in the test suite:

$ jw-docker-swift-5.0 bash -c 'apt-get -yy update && apt-get -yy install libssl-dev &&  swift test --sanitize=address'
Get:1 http://security.ubuntu.com/ubuntu bionic-security InRelease [88.7 kB]
Hit:2 http://archive.ubuntu.com/ubuntu bionic InRelease
Get:3 http://archive.ubuntu.com/ubuntu bionic-updates InRelease [88.7 kB]           
Get:4 http://archive.ubuntu.com/ubuntu bionic-backports InRelease [74.6 kB]                   
Get:5 http://security.ubuntu.com/ubuntu bionic-security/multiverse amd64 Packages [5391 B]
Get:6 http://security.ubuntu.com/ubuntu bionic-security/universe amd64 Packages [772 kB]               
Get:7 http://archive.ubuntu.com/ubuntu bionic-updates/restricted amd64 Packages [21.0 kB]                                         
Get:8 http://security.ubuntu.com/ubuntu bionic-security/restricted amd64 Packages [10.4 kB]                                            
Get:9 http://archive.ubuntu.com/ubuntu bionic-updates/universe amd64 Packages [1292 kB]                                                             
Get:10 http://security.ubuntu.com/ubuntu bionic-security/main amd64 Packages [674 kB]                                                               
Get:11 http://archive.ubuntu.com/ubuntu bionic-updates/multiverse amd64 Packages [8456 B]                         
Get:12 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 Packages [971 kB]
Fetched 4006 kB in 1s (3886 kB/s)                         
Reading package lists... Done
Reading package lists... Done
Building dependency tree       
Reading state information... Done
Suggested packages:
  libssl-doc
The following NEW packages will be installed:
  libssl-dev
0 upgraded, 1 newly installed, 0 to remove and 10 not upgraded.
Need to get 1566 kB of archives.
After this operation, 7846 kB of additional disk space will be used.
Get:1 http://archive.ubuntu.com/ubuntu bionic-updates/main amd64 libssl-dev amd64 1.1.1-1ubuntu2.1~18.04.4 [1566 kB]
Fetched 1566 kB in 0s (6429 kB/s)
debconf: delaying package configuration, since apt-utils is not installed
Selecting previously unselected package libssl-dev:amd64.
(Reading database ... 17772 files and directories currently installed.)
Preparing to unpack .../libssl-dev_1.1.1-1ubuntu2.1~18.04.4_amd64.deb ...
Unpacking libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.4) ...
Setting up libssl-dev:amd64 (1.1.1-1ubuntu2.1~18.04.4) ...
[453/453] Linking ./.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest
Test Suite 'All tests' started at 2019-10-05 10:31:38.459
Test Suite 'debug.xctest' started at 2019-10-05 10:31:38.493
Test Suite 'JWTTests' started at 2019-10-05 10:31:38.494
Test Case 'JWTTests.testJWTEncodingAndSign' started at 2019-10-05 10:31:38.495
Test Case 'JWTTests.testJWTEncodingAndSign' passed (0.165 seconds)
Test Case 'JWTTests.testJWTSigning' started at 2019-10-05 10:31:38.660
Test Case 'JWTTests.testJWTSigning' passed (0.048 seconds)
Test Suite 'JWTTests' passed at 2019-10-05 10:31:38.709
	 Executed 2 tests, with 0 failures (0 unexpected) in 0.213 (0.213) seconds
Test Suite 'APNSwiftRequestTests' started at 2019-10-05 10:31:38.711
Test Case 'APNSwiftRequestTests.testAlertEncoding' started at 2019-10-05 10:31:38.712
Test Case 'APNSwiftRequestTests.testAlertEncoding' passed (0.007 seconds)
Test Case 'APNSwiftRequestTests.testMinimalAlertEncoding' started at 2019-10-05 10:31:38.721
Test Case 'APNSwiftRequestTests.testMinimalAlertEncoding' passed (0.001 seconds)
Test Case 'APNSwiftRequestTests.testResponseDecoderBasics' started at 2019-10-05 10:31:38.723
Test Case 'APNSwiftRequestTests.testResponseDecoderBasics' passed (0.021 seconds)
Test Case 'APNSwiftRequestTests.testResponseDecoderHappyWithReceivingTheBodyInMultipleChunks' started at 2019-10-05 10:31:38.746
Test Case 'APNSwiftRequestTests.testResponseDecoderHappyWithReceivingTheBodyInMultipleChunks' passed (0.003 seconds)
Test Case 'APNSwiftRequestTests.testResponseDecoderAcceptsTrailers' started at 2019-10-05 10:31:38.749
Test Case 'APNSwiftRequestTests.testResponseDecoderAcceptsTrailers' passed (0.003 seconds)
Test Case 'APNSwiftRequestTests.testInvalidAuthKey' started at 2019-10-05 10:31:38.752
Test Case 'APNSwiftRequestTests.testInvalidAuthKey' passed (0.027 seconds)
Test Suite 'APNSwiftRequestTests' passed at 2019-10-05 10:31:38.779
	 Executed 6 tests, with 0 failures (0 unexpected) in 0.062 (0.062) seconds
Test Suite 'APNSwiftConfigurationTests' started at 2019-10-05 10:31:38.779
Test Case 'APNSwiftConfigurationTests.testSandboxConfiguration' started at 2019-10-05 10:31:38.789
Test Case 'APNSwiftConfigurationTests.testSandboxConfiguration' passed (0.001 seconds)
Test Case 'APNSwiftConfigurationTests.testProductionConfiguration' started at 2019-10-05 10:31:38.789
Test Case 'APNSwiftConfigurationTests.testProductionConfiguration' passed (0.0 seconds)
Test Case 'APNSwiftConfigurationTests.testSignature' started at 2019-10-05 10:31:38.790
Test Case 'APNSwiftConfigurationTests.testSignature' passed (0.002 seconds)
Test Suite 'APNSwiftConfigurationTests' passed at 2019-10-05 10:31:38.792
	 Executed 3 tests, with 0 failures (0 unexpected) in 0.003 (0.003) seconds
Test Suite 'debug.xctest' passed at 2019-10-05 10:31:38.793
	 Executed 11 tests, with 0 failures (0 unexpected) in 0.279 (0.279) seconds
Test Suite 'All tests' passed at 2019-10-05 10:31:38.794
	 Executed 11 tests, with 0 failures (0 unexpected) in 0.279 (0.279) seconds

=================================================================
==430==ERROR: LeakSanitizer: detected memory leaks

Direct leak of 264 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497b1e1b5 in _registerProtocolConformances(ConformanceState&, swift::RelativeDirectPointer<swift::TargetProtocolConformanceDescriptor<swift::InProcess>, false, int> const*, swift::RelativeDirectPointer<swift::TargetProtocolConformanceDescriptor<swift::InProcess>, false, int> const*) (/usr/lib/swift/linux/libswiftCore.so+0x3e91b5)

Direct leak of 264 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497b127c5 in _registerTypeMetadataRecords(TypeMetadataPrivateState&, swift::TargetTypeMetadataRecord<swift::InProcess> const*, swift::TargetTypeMetadataRecord<swift::InProcess> const*) (/usr/lib/swift/linux/libswiftCore.so+0x3dd7c5)

Direct leak of 264 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497b1424f in _registerProtocols((anonymous namespace)::ProtocolMetadataPrivateState&, swift::TargetProtocolRecord<swift::InProcess> const*, swift::TargetProtocolRecord<swift::InProcess> const*) (/usr/lib/swift/linux/libswiftCore.so+0x3df24f)

Indirect leak of 512 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x563e604f8900 in closure #1 (Swift.Int) -> Swift.UnsafeMutableRawPointer? in NIO.ByteBufferAllocator.init() -> NIO.ByteBufferAllocator /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:69:35
    #2 0x563e604f8958 in @objc closure #1 (Swift.Int) -> Swift.UnsafeMutableRawPointer? in NIO.ByteBufferAllocator.init() -> NIO.ByteBufferAllocator /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #3 0x563e604fd8c7 in static NIO.ByteBuffer._Storage.(allocateAndPrepareRawMemory in _243B594EFDF92ACEC7911DAF9CEF250E)(bytes: Swift.UInt32, allocator: NIO.ByteBufferAllocator) -> Swift.UnsafeMutableRawPointer /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:226:33
    #4 0x563e604ff899 in static NIO.ByteBuffer._Storage.reallocated(minimumCapacity: Swift.UInt32, allocator: NIO.ByteBufferAllocator) -> NIO.ByteBuffer._Storage /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:266:51
    #5 0x563e604f9fc2 in NIO.ByteBuffer.init(allocator: NIO.ByteBufferAllocator, startingCapacity: Swift.Int) -> NIO.ByteBuffer /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:407:34
    #6 0x563e604f95fd in NIO.ByteBufferAllocator.buffer(capacity: Swift.Int) -> NIO.ByteBuffer /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:90:16
    #7 0x563e600181ae in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:230:38
    #8 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #11 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #12 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #13 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #14 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #15 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #16 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #17 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #18 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #19 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #20 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #21 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #22 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #23 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #24 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #25 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #26 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 265 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e600195eb in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:240:32
    #3 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #4 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #6 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #7 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #8 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #9 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #10 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #11 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #12 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #13 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #14 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #15 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #16 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #17 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #18 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #19 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #20 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #21 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 256 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x7f84979c4182 in Swift._StringGuts.append(Swift._StringGutsSlice) -> () (/usr/lib/swift/linux/libswiftCore.so+0x28f182)
    #3 0x7f8497a6a8cd in function signature specialization <Arg[0] = Exploded> of Swift._StringGuts.append(Swift._StringGuts) -> () (/usr/lib/swift/linux/libswiftCore.so+0x3358cd)
    #4 0x7f8497a71d1e in function signature specialization <Arg[0] = Exploded, Arg[1] = Exploded, Arg[2] = Dead> of static Swift.String.+ infix(Swift.String, Swift.String) -> Swift.String (/usr/lib/swift/linux/libswiftCore.so+0x33cd1e)
    #5 0x563e5ff80b45 in static APNSwift.APNSwiftBearerTokenFactory.makeNewBearerToken(configuration: APNSwift.APNSwiftConfiguration) throws -> Swift.String /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift:50:42
    #6 0x563e5ff8141d in closure #1 (NIO.RepeatedTask) throws -> () in APNSwift.APNSwiftBearerTokenFactory.init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift:31:70
    #7 0x563e5ff81796 in partial apply forwarder for closure #1 (NIO.RepeatedTask) throws -> () in APNSwift.APNSwiftBearerTokenFactory.init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #8 0x563e6062bf87 in closure #1 (NIO.RepeatedTask) -> NIO.EventLoopFuture<()> in (extension in NIO):NIO.EventLoop.scheduleRepeatedTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) throws -> ()) -> NIO.RepeatedTask /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:516:21
    #9 0x563e6062bf87 in closure #1 (NIO.RepeatedTask) -> NIO.EventLoopFuture<()> in (extension in NIO):NIO.EventLoop.scheduleRepeatedTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) throws -> ()) -> NIO.RepeatedTask (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa83f87)
    #10 0x563e606251c8 in closure #1 () -> NIO.EventLoopFuture<()> in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:163:20
    #11 0x563e606251c8 in closure #1 () -> NIO.EventLoopFuture<()> in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7d1c8)
    #12 0x563e604c9eb2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.EventLoopFuture<()>, @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out NIO.EventLoopFuture<()>, @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #13 0x563e606514f3 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.EventLoopFuture<()>, @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out NIO.EventLoopFuture<()>, @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".116" /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #14 0x563e606089fd in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:37
    #15 0x563e606089fd in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa609fd)
    #16 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #17 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #18 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #21 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #22 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #23 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #24 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #25 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #26 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #27 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #28 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #29 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #30 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #31 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #32 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)

Indirect leak of 225 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e5ff7e166 in APNSwift.APNSwiftBearerTokenFactory.__allocating_init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift
    #3 0x563e600195eb in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:240:32
    #4 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #6 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #7 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #8 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #9 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #10 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #11 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #12 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #13 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #14 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #15 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #16 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #17 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #18 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #19 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #20 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #21 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #22 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 80 byte(s) in 2 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #3 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #4 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #5 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #6 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #7 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #8 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #9 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #10 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #11 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #12 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #13 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #14 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #15 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #16 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #17 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #18 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #22 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #23 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #24 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #25 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #26 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #27 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #28 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #29 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #30 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #31 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #32 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #33 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #34 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)

Indirect leak of 80 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60656cab in NIO.EventLoopFuture.__allocating_init(_eventLoop: NIO.EventLoop, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopFuture<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:415:14
    #3 0x563e6065662c in NIO.EventLoopPromise.init(eventLoop: NIO.EventLoop, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopPromise<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:166:50
    #4 0x563e6062add8 in (extension in NIO):NIO.EventLoop.makePromise<A>(of: A1.Type, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopPromise<A1> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:470:34
    #5 0x563e606082e8 in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:66:44
    #6 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #7 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #8 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #9 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #10 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #11 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #12 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #13 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #14 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #15 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #16 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #17 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #18 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #19 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #21 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #22 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #23 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #24 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #25 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #26 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #27 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #28 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #29 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #30 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #31 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #32 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #33 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #34 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)

Indirect leak of 72 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e6062c46f in (extension in NIO):NIO.EventLoop.scheduleRepeatedAsyncTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) -> NIO.EventLoopFuture<()>) -> NIO.RepeatedTask /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:544:24
    #3 0x563e6062bc63 in (extension in NIO):NIO.EventLoop.scheduleRepeatedTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) throws -> ()) -> NIO.RepeatedTask /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:522:21
    #4 0x563e5ff7e9e5 in APNSwift.APNSwiftBearerTokenFactory.init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift:30:37
    #5 0x563e5ff7e166 in APNSwift.APNSwiftBearerTokenFactory.__allocating_init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift
    #6 0x563e600195eb in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:240:32
    #7 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #8 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #10 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #11 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #12 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #13 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #14 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #15 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #16 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #17 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #18 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #19 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #20 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #21 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #22 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #23 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #24 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #25 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x7f849786f239 in Swift.Array._copyToNewBuffer(oldCount: Swift.Int) -> () (/usr/lib/swift/linux/libswiftCore.so+0x13a239)
    #3 0x7f8497a83e67 in function signature specialization <Arg[0] = Owned To Guaranteed> of Swift.Array.append(__owned A) -> () (/usr/lib/swift/linux/libswiftCore.so+0x34ee67)
    #4 0x7f84978722de in merged Swift.ContiguousArray.append(__owned A) -> () (/usr/lib/swift/linux/libswiftCore.so+0x13d2de)
    #5 0x563e60653552 in NIO.CallbackList.append(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:56:40
    #6 0x563e60661400 in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:679:29
    #7 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #8 0x563e6066a738 in NIO.EventLoopFuture.whenFailure((Swift.Error) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:737:14
    #9 0x563e60622bc9 in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:148:32
    #10 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #11 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #12 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #13 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #14 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #15 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #16 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #17 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #18 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #19 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #20 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #21 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #23 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #24 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #25 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #26 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #27 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #28 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #29 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #30 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #31 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #32 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #33 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #34 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>

Indirect leak of 64 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e604ff8c4 in static NIO.ByteBuffer._Storage.reallocated(minimumCapacity: Swift.UInt32, allocator: NIO.ByteBufferAllocator) -> NIO.ByteBuffer._Storage /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:266:20
    #3 0x563e604f9fc2 in NIO.ByteBuffer.init(allocator: NIO.ByteBufferAllocator, startingCapacity: Swift.Int) -> NIO.ByteBuffer /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:407:34
    #4 0x563e604f95fd in NIO.ByteBufferAllocator.buffer(capacity: Swift.Int) -> NIO.ByteBuffer /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/ByteBuffer-core.swift:90:16
    #5 0x563e600181ae in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:230:38
    #6 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #7 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #8 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #9 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #10 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #11 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #12 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #13 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #14 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #15 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #16 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #17 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #18 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #19 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #20 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #21 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #22 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #23 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #24 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e5ff7e9e5 in APNSwift.APNSwiftBearerTokenFactory.init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift:30:37
    #3 0x563e5ff7e166 in APNSwift.APNSwiftBearerTokenFactory.__allocating_init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift
    #4 0x563e600195eb in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:240:32
    #5 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #6 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #7 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #8 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #9 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #10 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #11 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #12 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #13 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #14 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #15 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #16 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #17 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #18 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #19 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #20 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #21 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #22 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #23 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 56 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60019568 in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:239:20
    #3 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #4 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #6 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #7 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #8 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #9 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #10 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #11 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #12 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #13 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #14 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #15 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #16 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #17 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #18 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #19 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #20 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #21 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60622bc9 in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:148:32
    #3 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #4 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #5 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #6 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #7 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #8 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #9 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #10 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #11 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #12 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #13 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #14 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #15 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #16 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #17 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #21 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #22 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #23 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #24 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #25 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #26 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #27 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #28 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #29 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #30 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #31 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #32 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #33 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #34 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60622b68 in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:142:32
    #3 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #4 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #5 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #6 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #7 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #8 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #9 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #10 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #11 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #12 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #13 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #14 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #15 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #16 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #17 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #21 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #22 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #23 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #24 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #25 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #26 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #27 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #28 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #29 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #30 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #31 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #32 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #33 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #34 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e6061fbaf in NIO.Scheduled.init(promise: NIO.EventLoopPromise<A>, cancellationTask: () -> ()) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:27:30
    #3 0x563e6060857e in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:75:25
    #4 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #5 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #6 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #7 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #8 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #9 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #11 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #12 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #13 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #14 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #15 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #16 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #17 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #19 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #20 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #23 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #24 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #25 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #26 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #27 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #28 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #29 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #30 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #31 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #32 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #33 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #34 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60608481 in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:67:20
    #3 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #4 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #6 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #7 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #8 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #10 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #11 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #12 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #13 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #14 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #15 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #16 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #17 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #18 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #19 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #23 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #24 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #25 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #26 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #27 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #28 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #29 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #30 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #31 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #32 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #33 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #34 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x7f849786f239 in Swift.Array._copyToNewBuffer(oldCount: Swift.Int) -> () (/usr/lib/swift/linux/libswiftCore.so+0x13a239)
    #3 0x7f8497a803ca in function signature specialization <Arg[0] = Owned To Guaranteed> of Swift.ContiguousArray.append(__owned A) -> () (/usr/lib/swift/linux/libswiftCore.so+0x34b3ca)
    #4 0x7f84978722de in merged Swift.ContiguousArray.append(__owned A) -> () (/usr/lib/swift/linux/libswiftCore.so+0x13d2de)
    #5 0x563e606b7a70 in NIO.Heap.append(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Heap.swift:107:22
    #6 0x563e6077a620 in NIO.PriorityQueue.push(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift:30:19
    #7 0x563e60608614 in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:78:24
    #8 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #9 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x563e60621cb7 in NIO.RepeatedTask.(begin0 in _D5D78C61B22284700B9BD1ACFBC25157)(in: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:83:41
    #11 0x563e60621431 in NIO.RepeatedTask.begin(in: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:70:18
    #12 0x563e6062c487 in (extension in NIO):NIO.EventLoop.scheduleRepeatedAsyncTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) -> NIO.EventLoopFuture<()>) -> NIO.RepeatedTask /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:545:18
    #13 0x563e6062bc63 in (extension in NIO):NIO.EventLoop.scheduleRepeatedTask(initialDelay: NIO.TimeAmount, delay: NIO.TimeAmount, notifying: NIO.EventLoopPromise<()>?, _: (NIO.RepeatedTask) throws -> ()) -> NIO.RepeatedTask /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:522:21
    #14 0x563e5ff7e9e5 in APNSwift.APNSwiftBearerTokenFactory.init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift:30:37
    #15 0x563e5ff7e166 in APNSwift.APNSwiftBearerTokenFactory.__allocating_init(eventLoop: NIO.EventLoop, configuration: APNSwift.APNSwiftConfiguration) throws -> APNSwift.APNSwiftBearerTokenFactory /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftBearerTokenFactory.swift
    #16 0x563e600195eb in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:240:32
    #17 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #20 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #21 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #22 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #23 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #24 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #25 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #26 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #27 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #28 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #29 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e606b144a in NIO.HeapType.comparator<A where A: Swift.Comparable>(type: A.Type) -> (A, A) -> Swift.Bool /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Heap.swift:30:21
    #3 0x563e606b379a in NIO.Heap.init(type: NIO.HeapType) -> NIO.Heap<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Heap.swift:50:32
    #4 0x563e60778265 in NIO.PriorityQueue.init(ascending: Swift.Bool) -> NIO.PriorityQueue<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/PriorityQueue.swift:19:21
    #5 0x563e60607c95 in NIO.EmbeddedEventLoop.init() -> NIO.EmbeddedEventLoop /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:53:69
    #6 0x563e60607a0b in NIO.EmbeddedEventLoop.__allocating_init() -> NIO.EmbeddedEventLoop /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift
    #7 0x563e60019568 in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:239:20
    #8 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #11 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #12 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #13 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #14 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #15 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #16 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #17 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #18 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #19 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #20 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #21 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #22 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #23 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #24 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #25 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #26 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 40 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x7f849786bd80 in (extension in Swift):Swift.Collection.map<A>((A.Element) throws -> A1) throws -> [A1] (/usr/lib/swift/linux/libswiftCore.so+0x136d80)
    #3 0x563e60e0f19b in NIOSSL.TLSConfiguration.applicationProtocols.setter : [Swift.String] /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:168:57
    #4 0x563e60e109c3 in NIOSSL.TLSConfiguration.init(cipherSuites: Swift.String, minimumTLSVersion: NIOSSL.TLSVersion, maximumTLSVersion: NIOSSL.TLSVersion?, certificateVerification: NIOSSL.CertificateVerification, trustRoots: NIOSSL.NIOSSLTrustRoots, certificateChain: [NIOSSL.NIOSSLCertificateSource], privateKey: NIOSSL.NIOSSLPrivateKeySource?, applicationProtocols: [Swift.String], shutdownTimeout: NIO.TimeAmount, keyLogCallback: (NIO.ByteBuffer) -> ()?, renegotiationSupport: NIOSSL.NIORenegotiationSupport) -> NIOSSL.TLSConfiguration /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:205:35
    #5 0x563e60e0d3f5 in static NIOSSL.TLSConfiguration.forClient(cipherSuites: Swift.String, minimumTLSVersion: NIOSSL.TLSVersion, maximumTLSVersion: NIOSSL.TLSVersion?, certificateVerification: NIOSSL.CertificateVerification, trustRoots: NIOSSL.NIOSSLTrustRoots, certificateChain: [NIOSSL.NIOSSLCertificateSource], privateKey: NIOSSL.NIOSSLPrivateKeySource?, applicationProtocols: [Swift.String], shutdownTimeout: NIO.TimeAmount, keyLogCallback: (NIO.ByteBuffer) -> ()?) -> NIOSSL.TLSConfiguration /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:251:16
    #6 0x563e5ff85b6d in APNSwift.APNSwiftConfiguration.init(keyIdentifier: Swift.String, teamIdentifier: Swift.String, signer: APNSwift.APNSwiftSigner, topic: Swift.String, environment: APNSwift.APNSwiftConfiguration.Environment) -> APNSwift.APNSwiftConfiguration /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftConfiguration.swift:66:50
    #7 0x563e60019540 in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:234:26
    #8 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #11 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #12 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #13 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #14 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #15 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #16 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #17 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #18 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #19 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #20 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #21 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #22 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #23 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #24 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #25 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1
    #26 0x7f849589db96 in __libc_start_main (/lib/x86_64-linux-gnu/libc.so.6+0x21b96)

Indirect leak of 36 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x7f8497872465 in Swift.Array.append<A where A == A1.Element, A1: Swift.Sequence>(contentsOf: __owned A1) -> () (/usr/lib/swift/linux/libswiftCore.so+0x13d465)
    #3 0x563e60e0bc92 in NIOSSL.encodeALPNIdentifier(identifier: Swift.String) -> [Swift.UInt8] /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:119:27
    #4 0x563e60e0f32e in reabstraction thunk helper from @callee_guaranteed (@guaranteed Swift.String) -> (@owned [Swift.UInt8], @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed Swift.String) -> (@out [Swift.UInt8], @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x563e60e11843 in partial apply forwarder for reabstraction thunk helper from @callee_guaranteed (@guaranteed Swift.String) -> (@owned [Swift.UInt8], @error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed Swift.String) -> (@out [Swift.UInt8], @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #6 0x7f849786beee in (extension in Swift):Swift.Collection.map<A>((A.Element) throws -> A1) throws -> [A1] (/usr/lib/swift/linux/libswiftCore.so+0x136eee)
    #7 0x563e60e0f19b in NIOSSL.TLSConfiguration.applicationProtocols.setter : [Swift.String] /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:168:57
    #8 0x563e60e109c3 in NIOSSL.TLSConfiguration.init(cipherSuites: Swift.String, minimumTLSVersion: NIOSSL.TLSVersion, maximumTLSVersion: NIOSSL.TLSVersion?, certificateVerification: NIOSSL.CertificateVerification, trustRoots: NIOSSL.NIOSSLTrustRoots, certificateChain: [NIOSSL.NIOSSLCertificateSource], privateKey: NIOSSL.NIOSSLPrivateKeySource?, applicationProtocols: [Swift.String], shutdownTimeout: NIO.TimeAmount, keyLogCallback: (NIO.ByteBuffer) -> ()?, renegotiationSupport: NIOSSL.NIORenegotiationSupport) -> NIOSSL.TLSConfiguration /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:205:35
    #9 0x563e60e0d3f5 in static NIOSSL.TLSConfiguration.forClient(cipherSuites: Swift.String, minimumTLSVersion: NIOSSL.TLSVersion, maximumTLSVersion: NIOSSL.TLSVersion?, certificateVerification: NIOSSL.CertificateVerification, trustRoots: NIOSSL.NIOSSLTrustRoots, certificateChain: [NIOSSL.NIOSSLCertificateSource], privateKey: NIOSSL.NIOSSLPrivateKeySource?, applicationProtocols: [Swift.String], shutdownTimeout: NIO.TimeAmount, keyLogCallback: (NIO.ByteBuffer) -> ()?) -> NIOSSL.TLSConfiguration /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio-ssl/Sources/NIOSSL/TLSConfiguration.swift:251:16
    #10 0x563e5ff85b6d in APNSwift.APNSwiftConfiguration.init(keyIdentifier: Swift.String, teamIdentifier: Swift.String, signer: APNSwift.APNSwiftSigner, topic: Swift.String, environment: APNSwift.APNSwiftConfiguration.Environment) -> APNSwift.APNSwiftConfiguration /Users/johannes/extsrc/APNSwift/Sources/APNSwift/APNSwiftConfiguration.swift:66:50
    #11 0x563e60019540 in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:234:26
    #12 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #13 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #14 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #15 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #16 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #17 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #18 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #19 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #20 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #21 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #22 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #23 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #24 0x7f84985f8d37 in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed37)
    #25 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #26 0x7f84985f8d4f in XCTest.XCTestSuite.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2ed4f)
    #27 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)
    #28 0x7f84985f5d12 in XCTest.XCTMain([(testCaseClass: XCTest.XCTestCase.Type, allTests: [(Swift.String, (XCTest.XCTestCase) throws -> ())])]) -> Swift.Never (/usr/lib/swift/linux/libXCTest.so+0x2bd12)
    #29 0x563e60e2e915 in main /Users/johannes/extsrc/APNSwift/Tests/LinuxMain.swift:10:1

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60661400 in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:679:29
    #3 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #4 0x563e6066a738 in NIO.EventLoopFuture.whenFailure((Swift.Error) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:737:14
    #5 0x563e60622bc9 in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:148:32
    #6 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #7 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #8 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #9 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #11 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #12 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #13 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #14 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #15 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #16 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #17 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #19 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #20 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #23 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #24 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #25 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #26 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #27 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #28 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #29 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #30 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #31 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #32 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #33 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #34 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60661400 in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:679:29
    #3 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #4 0x563e60665131 in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:717:14
    #5 0x563e60622b68 in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:142:32
    #6 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #7 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #8 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #9 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #10 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #11 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #12 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #13 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #14 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #15 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #16 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #17 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #19 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #20 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #23 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #24 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #25 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #26 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #27 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #28 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #29 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #30 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #31 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #32 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #33 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #34 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e60624b2d in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:165:14
    #3 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #4 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #5 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #6 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #7 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #8 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #9 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #10 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #11 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #12 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #13 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #14 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #15 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #16 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #17 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #19 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #20 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #21 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #22 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #23 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #24 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #25 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #26 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #27 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #28 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #29 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #30 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #31 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #32 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #33 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #34 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e6060857e in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:75:25
    #3 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #4 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #6 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #7 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #8 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #9 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #10 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #11 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #12 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #13 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #14 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #15 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #16 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #17 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #18 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #19 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #20 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #21 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #22 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #23 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #24 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #25 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #26 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #27 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #28 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #29 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #30 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #31 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #32 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #33 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #34 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)

Indirect leak of 32 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x7f8497afa5f1 in swift_slowAlloc (/usr/lib/swift/linux/libswiftCore.so+0x3c55f1)
    #2 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #3 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #4 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #5 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #6 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #7 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #8 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #9 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #10 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #11 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #12 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #13 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #14 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #15 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #16 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #17 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #18 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #19 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #20 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #21 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #22 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)
    #23 0x563e6060ad8e in NIO.EmbeddedEventLoop.advanceTime(by: NIO.TimeAmount) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:127:22
    #24 0x563e6001a31d in APNSwiftTests.APNSwiftRequestTests.testTokenProviderUpdate() -> () /Users/johannes/extsrc/APNSwift/Tests/APNSwiftTests/APNSwiftRequestTests.swift:261:14
    #25 0x563e5ffe42de in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #26 0x563e60023133 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #27 0x7f84985f8950 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed () -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e950)
    #28 0x7f84985f8758 in partial apply forwarder for closure #1 (XCTest.XCTestCase) throws -> () in XCTest.(test in _3BE257A46ADB477C7BF2D39968B39F9D)<A where A: XCTest.XCTestCase>((A) -> () throws -> ()) -> (XCTest.XCTestCase) throws -> () (/usr/lib/swift/linux/libXCTest.so+0x2e758)
    #29 0x7f84985f86c3 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x2e6c3)
    #30 0x7f84985f89d8 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) to @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error)partial apply forwarder with unmangled suffix ".16" (/usr/lib/swift/linux/libXCTest.so+0x2e9d8)
    #31 0x7f84985eac76 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed (@in_guaranteed XCTest.XCTestCase) -> (@out (), @error @owned Swift.Error) to @escaping @callee_guaranteed (@guaranteed XCTest.XCTestCase) -> (@error @owned Swift.Error) (/usr/lib/swift/linux/libXCTest.so+0x20c76)
    #32 0x7f84985f7118 in XCTest.XCTestCase.invokeTest() -> () (/usr/lib/swift/linux/libXCTest.so+0x2d118)
    #33 0x7f84985f6ddb in XCTest.XCTestCase.perform(XCTest.XCTestRun) -> () (/usr/lib/swift/linux/libXCTest.so+0x2cddb)
    #34 0x7f84985fb2ee in XCTest.XCTest.run() -> () (/usr/lib/swift/linux/libXCTest.so+0x312ee)

Indirect leak of 1 byte(s) in 1 object(s) allocated from:
    #0 0x563e5ff2f6f3 in malloc /home/buildnode/jenkins/workspace/oss-swift-5.1-package-linux-ubuntu-18_04/llvm/projects/compiler-rt/lib/asan/asan_malloc_linux.cc:146:3
    #1 0x563e60024299 in catmc_atomic__Bool_create /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/CNIOAtomics/src/c-atomics.c:76:1
    #2 0x563e60848b81 in @nonobjc __C.catmc_atomic__Bool_create(Swift.Bool) -> Swift.OpaquePointer /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #3 0x563e608493c5 in reabstraction thunk helper from @escaping @callee_guaranteed (@unowned Swift.Bool) -> (@unowned Swift.OpaquePointer) to @escaping @callee_guaranteed (@in_guaranteed Swift.Bool) -> (@unowned Swift.OpaquePointer) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #4 0x563e6084622b in NIOConcurrencyHelpers.UnsafeEmbeddedAtomic.init(value: A) -> NIOConcurrencyHelpers.UnsafeEmbeddedAtomic<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIOConcurrencyHelpers/atomics.swift:43:24
    #5 0x563e6065c311 in NIO.EventLoopFuture.init(_eventLoop: NIO.EventLoop, value: Swift.Result<A, Swift.Error>?, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopFuture<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:404:29
    #6 0x563e6065b71b in NIO.EventLoopFuture.__allocating_init(_eventLoop: NIO.EventLoop, value: Swift.Result<A, Swift.Error>?, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopFuture<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift
    #7 0x563e60656cab in NIO.EventLoopFuture.__allocating_init(_eventLoop: NIO.EventLoop, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopFuture<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:415:14
    #8 0x563e6065662c in NIO.EventLoopPromise.init(eventLoop: NIO.EventLoop, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopPromise<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:166:50
    #9 0x563e6062add8 in (extension in NIO):NIO.EventLoop.makePromise<A>(of: A1.Type, file: Swift.StaticString, line: Swift.UInt) -> NIO.EventLoopPromise<A1> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:470:34
    #10 0x563e606082e8 in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:66:44
    #11 0x563e60609240 in NIO.EmbeddedEventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:85:16
    #12 0x563e6060c008 in protocol witness for NIO.EventLoop.scheduleTask<A>(in: NIO.TimeAmount, _: () throws -> A1) -> NIO.Scheduled<A1> in conformance NIO.EmbeddedEventLoop : NIO.EventLoop in NIO /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #13 0x563e60624a7b in NIO.RepeatedTask.(reschedule0 in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:158:41
    #14 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:144:22
    #15 0x563e606242c4 in closure #1 (Swift.Result<(), Swift.Error>) -> () in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c2c4)
    #16 0x563e60017c03 in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed Swift.Result<(), Swift.Error>) -> () to @escaping @callee_guaranteed (@in_guaranteed Swift.Result<(), Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #17 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:757:13
    #18 0x563e6066b6b7 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac36b7)
    #19 0x563e6066143f in NIO.EventLoopFuture._addCallback(() -> NIO.CallbackList) -> NIO.CallbackList /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:682:16
    #20 0x563e606618fa in NIO.EventLoopFuture._whenComplete(() -> NIO.CallbackList) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:689:18
    #21 0x563e6066b0c4 in NIO.EventLoopFuture.whenComplete((Swift.Result<A, Swift.Error>) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:756:14
    #22 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoop.swift:143:20
    #23 0x563e60624158 in closure #1 (NIO.EventLoopFuture<()>) -> () in NIO.RepeatedTask.(reschedule in _D5D78C61B22284700B9BD1ACFBC25157)() -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa7c158)
    #24 0x563e60624c8f in reabstraction thunk helper from @escaping @callee_guaranteed (@guaranteed NIO.EventLoopFuture<()>) -> () to @escaping @callee_guaranteed (@in_guaranteed NIO.EventLoopFuture<()>) -> () /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #25 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:719:17
    #26 0x563e6066a321 in closure #1 () -> NIO.CallbackList in NIO.EventLoopFuture.whenSuccess((A) -> ()) -> () (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xac2321)
    #27 0x563e606537e2 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #28 0x563e606538c0 in partial apply forwarder for reabstraction thunk helper from @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) to @escaping @callee_guaranteed () -> (@out NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #29 0x563e60652979 in reabstraction thunk helper from @escaping @callee_guaranteed () -> (@out NIO.CallbackList) to @escaping @callee_guaranteed () -> (@owned NIO.CallbackList) /Users/johannes/extsrc/APNSwift/<compiler-generated>
    #30 0x563e60655cfe in NIO.CallbackList._run() -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:109:32
    #31 0x563e6065768f in NIO.EventLoopPromise._resolve(value: Swift.Result<A, Swift.Error>) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:230:42
    #32 0x563e60657280 in NIO.EventLoopPromise.succeed(A) -> () /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/EventLoopFuture.swift:175:14
    #33 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> /Users/johannes/extsrc/APNSwift/.build/checkouts/swift-nio/Sources/NIO/Embedded.swift:69:25
    #34 0x563e60608a29 in closure #1 () -> () in NIO.EmbeddedEventLoop.scheduleTask<A>(deadline: NIO.NIODeadline, _: () throws -> A) -> NIO.Scheduled<A> (/Users/johannes/extsrc/APNSwift/.build/x86_64-unknown-linux/debug/apnswiftPackageTests.xctest+0xa60a29)

SUMMARY: AddressSanitizer: 2999 byte(s) leaked in 29 allocation(s).

[BUG]Fatal error: leaking promise created at (file: "debug/.build/checkouts/APNSwift/Sources/APNSwift/APNSwiftConnection.swift", line: 177):

I am running a Vapor 4 app on Ubuntu 18.04 with APNSwift 1.3.0.

As of now I just send a simple notification as described in the getting started page of this repo.

I don't know if it is a coincidence but I noticed that the fatal error appears only after a couple of hours without interacting with the service.

Please let me know if I can give you other informations, it is quite a complicated bug to reproduce.

Promise leak crash

Crashing with promise leak message

Fatal error: leaking promise created at (file: "/.build/checkouts/apnswift/Sources/APNSwift/APNSwiftConnection.swift", line: 197): file /.build/checkouts/apnswift/Sources/APNSwift/APNSwiftConnection.swift, line 197

Platform:

  • OS:Ubuntu
  • Version: 18.04

Current stack trace:
0 libswiftCore.so 0x00007f625a8f7ec0 swift_reportError + 50
1 libswiftCore.so 0x00007f625a968f60 _swift_stdlib_reportFatalErrorInFile + 115
2 libswiftCore.so 0x00007f625a88cf0e + 3514126
3 libswiftCore.so 0x00007f625a88d087 + 3514503
4 libswiftCore.so 0x00007f625a68282d + 1374253
5 libswiftCore.so 0x00007f625a863e68 + 3346024
6 libswiftCore.so 0x00007f625a681bc9 + 1371081
7 Run 0x000056280b0632d0 + 6386384
8 Run 0x000056280b118efe + 7130878
9 Run 0x000056280b118e78 + 7130744
10 Run 0x000056280b062cc6 + 6384838
11 Run 0x000056280b063507 + 6386951
12 libswiftCore.so 0x00007f625a8f99ab + 3959211
13 Run 0x000056280ab7e52f + 1254703
14 libswiftCore.so 0x00007f625a8f99ab + 3959211
15 Run 0x000056280ab7e645 + 1254981
16 libswiftCore.so 0x00007f625a8f99ab + 3959211
17 Run 0x000056280b069c6a + 6413418
18 libswiftCore.so 0x00007f625a8f99ab + 3959211
19 Run 0x000056280b05ebbb + 6368187
20 Run 0x000056280b060f58 + 6377304
21 Run 0x000056280b061214 + 6378004
22 Run 0x000056280b2d285d + 8939613
23 Run 0x000056280b0673fe + 6403070
24 Run 0x000056280b0643cb + 6390731
25 Run 0x000056280b064525 + 6391077
26 Run 0x000056280b06716a + 6402410
27 Run 0x000056280b2d1c2f + 8936495
28 Run 0x000056280b2df478 + 8991864
29 Run 0x000056280b0522ac + 6316716
30 Run 0x000056280b05de61 + 6364769
31 Run 0x000056280b0522cc + 6316748
32 Run 0x000056280b052317 + 6316823
33 Run 0x000056280add491f + 3705119
34 Run 0x000056280b059be4 + 6347748
35 Run 0x000056280b04d412 + 6296594
36 Run 0x000056280b050efb + 6311675
37 Run 0x000056280b055515 + 6329621
38 Run 0x000056280b05d92a + 6363434
39 Run 0x000056280b055b4f + 6331215
40 Run 0x000056280b117231 + 7123505
41 Run 0x000056280b1176c1 + 7124673
42 Run 0x000056280b117789 + 7124873
43 libpthread.so.0 0x00007f625a31b6db + 30427
44 libc.so.6 0x00007f6257f08850 clone + 63
Illegal instruction (core dumped)

What should I use for keyIdentifier

When doing a push notification based off of a PassKit item (i.e. using a PEM instead of a p8), I'm not sure what I pass for the keyIdentifier parameter to the APNSwiftconfiguration constructor.

Create iOS app to send push notifications

In WWDC 2019 Apple introduced the ability to use Swift Packages into iOS apps with Xcode 11.

I've tried to create a sample project with this repository and I got some issues:

  • If I try to run on iOS Simulator, it compiles but the app crashes with the error:

dyld: Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib Referenced from: /Users/.../CoreSimulator/... Reason: no suitable image found. Did find: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib: mach-o, but not built for iOS simulator

  • If I try to run on iPhone it doesn't compile with several errors about SSL.

  • If I try to run it on Mac using Catalyst (run iPad app on macOS Catalina) I got the message: `

building for UIKitForMac, but linking in dylib built for macOS, file '/usr/local/Cellar/openssl/1.0.2r/lib/libssl.dylib' for architecture x86_64

Anyone knows a workaround to solve this issues?

Connection Deadlock caused by missing response & no timeout

Background
I'm building a push service on Ubuntu 18.04 with Vapor 4 & Vapor/apns, using tls authentication.
The service is nothing but sending a push to my device after several hours and then another push, running on Apple's sandbox push environment.

The Bug
After sometime, I found the push service will eventually fall into connection deadlock error reported as [ ERROR ] Connection request timed out. This might indicate a connection deadlock in your application.

After some investigation, I found it's the previous push which was sent some time ago, not getting its response.

As comparison, in the log, a normal push request should be like this

[ codes.vapor.application ] [ TRACE ] Re-using available connection (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:191)
[ codes.vapor.application ] [ DEBUG ] Send - starting up (APNSwift/APNSwiftConnection.swift:174)
[ codes.vapor.application ] [ INFO ] Send - sending (APNSwift/APNSwiftConnection.swift:204)
[ codes.vapor.application ] [ DEBUG ] Request - building (APNSwift/APNSwiftRequestEncoder.swift:68)
[ codes.vapor.application ] [ TRACE ] Request - built (APNSwift/APNSwiftRequestEncoder.swift:97)
[ codes.vapor.application ] [ TRACE ] Request - sent (APNSwift/APNSwiftRequestEncoder.swift:101)
[ codes.vapor.application ] [ DEBUG ] Response - received (APNSwift/APNSwiftStreamHandler.swift:36)
[ codes.vapor.application ] [ INFO ] Response - successful (APNSwift/APNSwiftStreamHandler.swift:53)
[ codes.vapor.application ] [ TRACE ] Releasing connection (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:262)

When the issue happens, response doesn't come, the log is like below

[ codes.vapor.application ] [ TRACE ] Re-using available connection (AsyncKit/ConnectionPool/EventLoopConnectionPool.swift:191)
[ codes.vapor.application ] [ DEBUG ] Send - starting up (APNSwift/APNSwiftConnection.swift:174)
[ codes.vapor.application ] [ INFO ] Send - sending (APNSwift/APNSwiftConnection.swift:204)
[ codes.vapor.application ] [ DEBUG ] Request - building (APNSwift/APNSwiftRequestEncoder.swift:68)
[ codes.vapor.application ] [ TRACE ] Request - built (APNSwift/APNSwiftRequestEncoder.swift:97)
[ codes.vapor.application ] [ TRACE ] Request - sent (APNSwift/APNSwiftRequestEncoder.swift:101)

As vapor/apns use only 1 max connection in configuration to initialize APNSwift, and the connection itself looks active, the connection pool will be completely jammed by the request above, waiting for its response.

So could anyone please enlighten me is there any way I could set a timeout for such case, or did I miss something?

Platform:

  • Ubuntu 18.04
  • Vapor 4.31.0
  • APNS 1.0.0
  • APNSwift 2.1.0

No way to handle error?

I see that internally, errors are handled and logged to the console, but in action this causes long-term issues, unless I am missing something. For example, if a user deletes their app, the device token becomes invalid. I see "Response - bad request badDeviceToken" printed out into the console, but I have no way of capturing this. If the 'send' function passed back the 'APNSwiftError.ResponseError' information, I could act on this information and remove the device token from storage. Otherwise, it risks sending extraneous requests to old device tokens and getting blocked from the APNS service.

Is there an easy way of getting this information/something I'm missing? Or a way to update the library? Thank you!

the update from 1.2.0 to 1.2.1 is SemVer minor but was tagged as SemVer patch

The diff between 1.2.0 and 1.2.1 contains

diff --git a/Sources/APNSwift/APNSwiftConnection.swift b/Sources/APNSwift/APNSwiftConnection.swift
index fc5ca49..5e2f9ea 100644
--- a/Sources/APNSwift/APNSwiftConnection.swift
+++ b/Sources/APNSwift/APNSwiftConnection.swift
@@ -154,6 +154,15 @@ public final class APNSwiftConnection {
      ```
      */
     public func send<Notification: APNSwiftNotification>(_ notification: Notification, pushType: APNSwiftConnection.PushType, to deviceToken: String, with encoder: JSONEncoder = JSONEncoder(), expiration: Date? = nil, priority: Int? = nil, collapseIdentifier: String? = nil, topic: String? = nil) -> EventLoopFuture<Void> {
+        let data: Data = try! encoder.encode(notification)        
+        var buffer = ByteBufferAllocator().buffer(capacity: data.count)
+        buffer.writeBytes(data)
+        return send(rawBytes: buffer, pushType: pushType, to: deviceToken)
+    }
+    
+    /// This is to be used with caution. APNSwift cannot gurantee delivery if you do not have the correct payload.
+    /// For more information see: [Creating APN Payload](https://developer.apple.com/library/archive/documentation/NetworkingInternet/Conceptual/RemoteNotificationsPG/CreatingtheNotificationPayload.html)
+    public func send(rawBytes payload: ByteBuffer, pushType: APNSwiftConnection.PushType, to deviceToken: String, expiration: Date? = nil, priority: Int? = nil, collapseIdentifier: String? = nil, topic: String? = nil) -> EventLoopFuture<Void> {
             let streamPromise = channel.eventLoop.makePromise(of: Channel.self)
             multiplexer.createStreamChannel(promise: streamPromise) { channel, streamID in
                 let handlers: [ChannelHandler] = [
@@ -166,12 +175,8 @@ public final class APNSwiftConnection {
             }
             
             let responsePromise = channel.eventLoop.makePromise(of: Void.self)
-            let data: Data = try! encoder.encode(notification)
-            
-            var buffer = ByteBufferAllocator().buffer(capacity: data.count)
-            buffer.writeBytes(data)
             let context = APNSwiftRequestContext(
-                request: buffer,
+                request: payload,
                 responsePromise: responsePromise
             )
             

which adds a public func. Any additions to the API are SemVer minor, not patch. The correct version for 1.2.1 would've been 1.3.0.

The recommended way in SemVer to fix this is to push a new commit which reverts back to what 1.2.0 was and then to release that as 1.2.2. Following that a new version 1.3.0 should be released that is equivalent to what 1.2.1 is now.

Given that the chance of breakage is quite small here, I think we might also leave 1.2.1 as is (despite it violating SemVer) and releasing a 1.3.0 which is equivalent to 1.2.1 so that at least the latest available version is correctly versioned.

Supprt FCM

Is your feature request related to a problem? Please describe.
When sending push message you often need to support both iOS and Android devices, it would be very helpfull if one library supported both platforms

Describe the solution you'd like
Sending push messages to Android devices

Describe alternatives you've considered
Using Firebase push

[BUG] TooManyProviderTokenUpdates

@kylebrowning Thanks for putting so much work in on this tool! I've been attempting to implement it in a project I'm working on and I noticed the following:

When sending an APNS message to multiple tokens, each time APNSwiftRequestEncoder.write() is called the jwt is regenerated. This causes Apple's servers to respond with TooManyProviderTokenUpdates

To Reproduce
Configure a connection to Apple's APNS service.
Send more than 5 messages to different tokens.
The service will start to reply with TooManyProviderTokenUpdates

After dumping the object to the terminal I noticed that the bearer tokens were different for each requested message. They bearer token should have been the same for each message.

HeaderTableEntry(name: "authorization", value: "bearer **eyJ[redatcted]ifQ.eyJpc[redatcted]cxfQ.[redacted]490i**") HeaderTableEntry(name: ":path", value: "/3/device/_redacted_________________________1325e345a0daef141dec8c0bd78d") 

HeaderTableEntry(name: "authorization", value: "bearer **eyJ[redatcted]ifQ.eyJpc[redatcted]cwfQ.[redacted]RjTg**") HeaderTableEntry(name: ":path", value: "/3/device/________________________redacted_________________________005e320") 

HeaderTableEntry(name: "authorization", value: "bearer **eyJ[redatcted]ifQ.eyJpc[redatcted]cwfQ.[redacted]od1k**") HeaderTableEntry(name: ":path", value: "/3/device/27a18________________________redacted_________________________9cc1b") 

Expected behavior
jwt's should only be generated at most once every 20 minutes. There should be some sort of state/expiration on JWT generation so that the target does not throw TooManyProviderTokenUpdates

Platform:
Ubuntu 18.04
Linux swiftynix 4.15.0-51-generic #55-Ubuntu SMP Wed May 15 14:27:21 UTC 2019 x86_64 x86_64 x86_64 GNU/Linux

Add overloads

Seems like quite a bit of boilerplate to generate the configuration. Would be easier if the initializer, instead of taking a signer parameter, had one method where you passed the path to the p8 file, and a second convenience initializer that instead took the path to the PEM and key files.

[BUG] 2.2.0 Infinite Recursion

Describe the bug
send class it's self to maximum stack size in xcode

To Reproduce
included via
.package(url: "https://github.com/vapor/apns.git", from: "1.0.0")

app.get("test") { req -> String in
        try app.apns.send(
            .init(title: "Hello", subtitle: "This is a test from vapor/apns"),
            to: "6a9201adcaa835-------------3"
        ).wait()
        return "Hello, world!"
}

This function seems to call it's self forever

public func send(rawBytes payload: ByteBuffer,
                     pushType: APNSwiftConnection.PushType = .alert,
                     to deviceToken: String,
                     expiration: Date? = nil,
                     priority: Int? = nil,
                     collapseIdentifier: String? = nil,
                     topic: String? = nil,
                     logger: Logger? = nil,
                     apnsID: UUID? = nil) -> EventLoopFuture<Void> {
        return self.send(
            rawBytes: payload,
            pushType: pushType,
            to: deviceToken,
            expiration: expiration,
            priority: priority,
            collapseIdentifier: collapseIdentifier,
            topic: topic,
            logger: logger ?? self.logger,
            apnsID: apnsID)
    }

Expected behavior
Hope to see a sent notification

Screenshots
Screen Shot 2021-01-08 at 11 07 45 AM

Platform:

  • OS: mac os x 11.1 (20C69)
  • Version [e.g. 16.04]
    Ran from xcode 12.3

Additional context
Add any other context about the problem here.

CNIOBoringSSL build errors on Xcode 12.5 beta 2

Describe the bug
Building with Xcode 12.5b2 results in two build errors:

  • 'OPENSSL_ia32cap_get' has different definitions in different modules; definition in module 'CNIOBoringSSL' first difference is function body
  • 'X509V3_CONF_METHOD_st::get_string' from module 'CNIOBoringSSL' is not present in definition of 'struct X509V3_CONF_METHOD_st' in module 'CJWTKitBoringSSL'

Looks like a dependency conflict between swift-nio-ssl and jwt-kit?

To Reproduce
Steps to reproduce the behavior:

  1. Download Xcode 12.5 beta 2.
  2. Try to build.
  3. Note build errors.

Expected behavior
No build error.

Screenshots
image

Platform:

  • OS: MacOS 11.2
  • Version: 3.0.0

Using wrong logger

Lines 185 and 204 of APNSwiftConnection.swift are both calling configuration.logger? instead of using the passed in logger parameter. Was that intentional?

Support multiple configurations

Please provide a way that a single server app can support both the normal app's push notification (i.e. via the p8) and also passkit notifications (i.e. via the PEM files).

Right now we can't swap between them as needed.

[BUG] Signer doesn't work

Describe the bug

Providing signer with a file or ByteBuffer always failed with the following message badRequest(NIOAPNS.APNSError.ResponseErrorMessage.invalidProviderToken)

Platform:

  • OS: Ubuntu & macOS

APNSwiftConnection has no possibility to configure proxy-server

I just ported my backend from macOS to Ubuntu and since then APNSwiftConnection does not connect anymore. The only thing I see in log file is

"Connection - starting"

All works fine on macOS so I guess sit might be an issue with a proxy or so. So, how can I configure a proxy here? It seems like the EventLoopFuture is not returned from ClientBoostrap.connect.

Sending local curl-command to api.push.apple.com:443 works.

flaky test

Describe the bug
there's a flaky test:

Test Case '-[APNSwiftJWTTests.JWTTests testJWTSigning]' started.
/private/tmp/.nio-release-tools_nHItWh/APNSwift/Tests/APNSwiftJWTTests/JWTTests.swift:77: error: -[APNSwiftJWTTests.JWTTests testJWTSigning] : XCTAssertEqual failed: ("63") is not equal to ("64")
Test Case '-[APNSwiftJWTTests.JWTTests testJWTSigning]' failed (0.288 seconds).

log_swift_wmu81k.log

To Reproduce

run swift test --sanitize=address -c release -Xswiftc -enable-testing --disable-index-store many times

Expected behavior

tests pass

Platform:
macOS 10.15 beta 6ish

memory unsafety -- address sanitizer failure

Describe the bug
This looks like quite a serious bug, the test suite is failing address sanitizer:

Test Suite 'All tests' started at 2019-07-22 11:43:35.772 am
Test Suite 'apnswiftPackageTests.xctest' started at 2019-07-22 11:43:35.773 am
Test Suite 'APNSwiftConfigurationTests' started at 2019-07-22 11:43:35.773 am
Test Case '-[APNSwiftTests.APNSwiftConfigurationTests testProductionConfiguration]' started.
Test Case '-[APNSwiftTests.APNSwiftConfigurationTests testProductionConfiguration]' passed (0.135 seconds).
Test Case '-[APNSwiftTests.APNSwiftConfigurationTests testSandboxConfiguration]' started.
Test Case '-[APNSwiftTests.APNSwiftConfigurationTests testSandboxConfiguration]' passed (0.001 seconds).
Test Case '-[APNSwiftTests.APNSwiftConfigurationTests testSignature]' started.
=================================================================
==41340==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x615000013880 at pc 0x0001053595ee bp 0x7ffeea8c8660 sp 0x7ffeea8c7e08
READ of size 513 at 0x615000013880 thread T0
    #0 0x1053595ed in wrap_strlen (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x175ed)
    #1 0x10a9d6ed8 in mem_puts (libcrypto.1.0.0.dylib:x86_64+0xa8ed8)
    #2 0x10a9d638a in BIO_puts (libcrypto.1.0.0.dylib:x86_64+0xa838a)
    #3 0x10d402450 in closure #1 in APNSwiftSigner.sign(digest:) APNSwiftSigner.swift:39
    #4 0x10d4025f2 in thunk for @callee_guaranteed (@unowned UnsafeRawBufferPointer) -> (@unowned Int, @error @owned Error) <compiler-generated>
    #5 0x10d402693 in partial apply for thunk for @callee_guaranteed (@unowned UnsafeRawBufferPointer) -> (@unowned Int, @error @owned Error) <compiler-generated>
    #6 0x10d98c8af in ByteBuffer.withUnsafeReadableBytes<A>(_:) ByteBuffer-core.swift:530
    #7 0x10d3ffc3b in APNSwiftSigner.sign(digest:) APNSwiftSigner.swift:38
    #8 0x10d41abe3 in APNSwiftConfigurationTests.testSignature() APNSwiftConfigurationTests.swift:57
    #9 0x10d41b53d in @objc APNSwiftConfigurationTests.testSignature() <compiler-generated>
    #10 0x7fff2f2225eb in __invoking___ (CoreFoundation:x86_64h+0x4a5eb)
    #11 0x7fff2f2224a3 in -[NSInvocation invoke] (CoreFoundation:x86_64h+0x4a4a3)
    #12 0x1060f4c6d in __24-[XCTestCase invokeTest]_block_invoke_2.214 (XCTest:x86_64+0x2dc6d)
    #13 0x10618113a in -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] (XCTest:x86_64+0xba13a)
    #14 0x1060ff8da in -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] (XCTest:x86_64+0x388da)
    #15 0x1060f4bfd in __24-[XCTestCase invokeTest]_block_invoke.208 (XCTest:x86_64+0x2dbfd)
    #16 0x10616858f in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] (XCTest:x86_64+0xa158f)
    #17 0x1061684ac in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] (XCTest:x86_64+0xa14ac)
    #18 0x1060f46ae in __24-[XCTestCase invokeTest]_block_invoke (XCTest:x86_64+0x2d6ae)
    #19 0x1060f41a7 in -[XCTestCase testContextPerformInScope:] (XCTest:x86_64+0x2d1a7)
    #20 0x1060f4241 in -[XCTestCase invokeTest] (XCTest:x86_64+0x2d241)
    #21 0x1060f6020 in __26-[XCTestCase performTest:]_block_invoke_2 (XCTest:x86_64+0x2f020)
    #22 0x10616858f in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] (XCTest:x86_64+0xa158f)
    #23 0x1061684ac in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] (XCTest:x86_64+0xa14ac)
    #24 0x1060f5f37 in __26-[XCTestCase performTest:]_block_invoke.342 (XCTest:x86_64+0x2ef37)
    #25 0x10617880b in +[XCTContext runInContextForTestCase:block:] (XCTest:x86_64+0xb180b)
    #26 0x1060f56aa in -[XCTestCase performTest:] (XCTest:x86_64+0x2e6aa)
    #27 0x106147163 in -[XCTest runTest] (XCTest:x86_64+0x80163)
    #28 0x1060efd4a in __27-[XCTestSuite performTest:]_block_invoke (XCTest:x86_64+0x28d4a)
    #29 0x1060ef474 in -[XCTestSuite _performProtectedSectionForTest:testSection:] (XCTest:x86_64+0x28474)
    #30 0x1060ef771 in -[XCTestSuite performTest:] (XCTest:x86_64+0x28771)
    #31 0x106147163 in -[XCTest runTest] (XCTest:x86_64+0x80163)
    #32 0x1060efd4a in __27-[XCTestSuite performTest:]_block_invoke (XCTest:x86_64+0x28d4a)
    #33 0x1060ef474 in -[XCTestSuite _performProtectedSectionForTest:testSection:] (XCTest:x86_64+0x28474)
    #34 0x1060ef771 in -[XCTestSuite performTest:] (XCTest:x86_64+0x28771)
    #35 0x106147163 in -[XCTest runTest] (XCTest:x86_64+0x80163)
    #36 0x1060efd4a in __27-[XCTestSuite performTest:]_block_invoke (XCTest:x86_64+0x28d4a)
    #37 0x1060ef474 in -[XCTestSuite _performProtectedSectionForTest:testSection:] (XCTest:x86_64+0x28474)
    #38 0x1060ef771 in -[XCTestSuite performTest:] (XCTest:x86_64+0x28771)
    #39 0x106147163 in -[XCTest runTest] (XCTest:x86_64+0x80163)
    #40 0x106192ab5 in __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke (XCTest:x86_64+0xcbab5)
    #41 0x106192bb1 in __44-[XCTTestRunSession runTestsAndReturnError:]_block_invoke.84 (XCTest:x86_64+0xcbbb1)
    #42 0x1061162e8 in -[XCTestObservationCenter _observeTestExecutionForBlock:] (XCTest:x86_64+0x4f2e8)
    #43 0x106192873 in -[XCTTestRunSession runTestsAndReturnError:] (XCTest:x86_64+0xcb873)
    #44 0x1060d2a9f in -[XCTestDriver runTestsAndReturnError:] (XCTest:x86_64+0xba9f)
    #45 0x106174b53 in _XCTestMain (XCTest:x86_64+0xadb53)
    #46 0x1053350f9 in main (xctest:x86_64+0x1000020f9)
    #47 0x7fff6693bc48 in start (libdyld.dylib:x86_64+0x11c48)

0x615000013880 is located 0 bytes to the right of 512-byte region [0x615000013680,0x615000013880)
allocated by thread T0 here:
    #0 0x1053a27d3 in wrap_malloc (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x607d3)
    #1 0x10d96fc06 in closure #1 in ByteBufferAllocator.init() ByteBuffer-core.swift:69
    #2 0x10d96fc68 in @objc closure #1 in ByteBufferAllocator.init() <compiler-generated>
    #3 0x10d975195 in static ByteBuffer._Storage.allocateAndPrepareRawMemory(bytes:allocator:) ByteBuffer-core.swift:226
    #4 0x10d977360 in static ByteBuffer._Storage.reallocated(minimumCapacity:allocator:) ByteBuffer-core.swift:266
    #5 0x10d971480 in ByteBuffer.init(allocator:startingCapacity:) ByteBuffer-core.swift:407
    #6 0x10d9709ba in ByteBufferAllocator.buffer(capacity:) ByteBuffer-core.swift:90
    #7 0x10d418aa9 in APNSwiftConfigurationTests.testSignature() APNSwiftConfigurationTests.swift:49
    #8 0x10d41b53d in @objc APNSwiftConfigurationTests.testSignature() <compiler-generated>
    #9 0x7fff2f2225eb in __invoking___ (CoreFoundation:x86_64h+0x4a5eb)
    #10 0x7fff2f2224a3 in -[NSInvocation invoke] (CoreFoundation:x86_64h+0x4a4a3)
    #11 0x1060f4c6d in __24-[XCTestCase invokeTest]_block_invoke_2.214 (XCTest:x86_64+0x2dc6d)
    #12 0x10618113a in -[XCTMemoryChecker _assertInvalidObjectsDeallocatedAfterScope:] (XCTest:x86_64+0xba13a)
    #13 0x1060ff8da in -[XCTestCase assertInvalidObjectsDeallocatedAfterScope:] (XCTest:x86_64+0x388da)
    #14 0x1060f4bfd in __24-[XCTestCase invokeTest]_block_invoke.208 (XCTest:x86_64+0x2dbfd)
    #15 0x10616858f in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] (XCTest:x86_64+0xa158f)
    #16 0x1061684ac in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] (XCTest:x86_64+0xa14ac)
    #17 0x1060f46ae in __24-[XCTestCase invokeTest]_block_invoke (XCTest:x86_64+0x2d6ae)
    #18 0x1060f41a7 in -[XCTestCase testContextPerformInScope:] (XCTest:x86_64+0x2d1a7)
    #19 0x1060f4241 in -[XCTestCase invokeTest] (XCTest:x86_64+0x2d241)
    #20 0x1060f6020 in __26-[XCTestCase performTest:]_block_invoke_2 (XCTest:x86_64+0x2f020)
    #21 0x10616858f in -[XCTestCase(Failures) performFailableBlock:testCaseRun:shouldInterruptTest:] (XCTest:x86_64+0xa158f)
    #22 0x1061684ac in -[XCTestCase(Failures) _performTurningExceptionsIntoFailuresInterruptAfterHandling:block:] (XCTest:x86_64+0xa14ac)
    #23 0x1060f5f37 in __26-[XCTestCase performTest:]_block_invoke.342 (XCTest:x86_64+0x2ef37)
    #24 0x10617880b in +[XCTContext runInContextForTestCase:block:] (XCTest:x86_64+0xb180b)
    #25 0x1060f56aa in -[XCTestCase performTest:] (XCTest:x86_64+0x2e6aa)
    #26 0x106147163 in -[XCTest runTest] (XCTest:x86_64+0x80163)
    #27 0x1060efd4a in __27-[XCTestSuite performTest:]_block_invoke (XCTest:x86_64+0x28d4a)
    #28 0x1060ef474 in -[XCTestSuite _performProtectedSectionForTest:testSection:] (XCTest:x86_64+0x28474)
    #29 0x1060ef771 in -[XCTestSuite performTest:] (XCTest:x86_64+0x28771)

SUMMARY: AddressSanitizer: heap-buffer-overflow (libclang_rt.asan_osx_dynamic.dylib:x86_64h+0x175ed) in wrap_strlen
Shadow bytes around the buggy address:
  0x1c2a000026c0: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a000026d0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c2a000026e0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c2a000026f0: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
  0x1c2a00002700: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
=>0x1c2a00002710:[fa]fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a00002720: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a00002730: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a00002740: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a00002750: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
  0x1c2a00002760: fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa fa
Shadow byte legend (one shadow byte represents 8 application bytes):
  Addressable:           00
  Partially addressable: 01 02 03 04 05 06 07 
  Heap left redzone:       fa
  Freed heap region:       fd
  Stack left redzone:      f1
  Stack mid redzone:       f2
  Stack right redzone:     f3
  Stack after return:      f5
  Stack use after scope:   f8
  Global redzone:          f9
  Global init order:       f6
  Poisoned by user:        f7
  Container overflow:      fc
  Array cookie:            ac
  Intra object redzone:    bb
  ASan internal:           fe
  Left alloca redzone:     ca
  Right alloca redzone:    cb
  Shadow gap:              cc
==41340==ABORTING

To Reproduce
Steps to reproduce the behavior:

  1. run tests with swift test --sanitize=address --disable-index-store

Expected behavior
passes

  • OS: macOS Catalina

log_swift_2OMC7b.log

[BUG] TooManyProviderTokenUpdates

I am getting a lot (hundreds per day) of TooManyProviderTokenUpdates failures when sending APNS.

My set up is a little strange. I'm not using the Vapor APNS package, but I copied those files into my own project so I could make some tweaks:

  1. I have two connection pools, one for sandbox tokens and one for production tokens. (I thought this could be the cause of too many provider updates, but I disabled the sandbox pool entirely, and am still seeing the issue.)
  2. When errors like Unregistered or BadDeviceToken occur in the prod pool, I try them on sandbox, and if that fails I mark the token as "failed".
  3. When any other error occur, I record them in the database and post a message to our slack. This is how I found out about the TooManyProviderTokenUpdates.

Since I'm not responsible for refreshing the token and that's handled internally by the library, is there anything I can do to stop getting this error? Is there something about my set up that's causing this error to be triggered?

How to reuse connections?

It looks like the connection get's closed by apple after a few hours. How can we reconnect? Shouldn't this be handled by the send() method?

Something like

func send() {
    if apn.isConnected {
        // send...
        return
    }

    // Not connected anymore
    // Connect again and then send..
}

[BUG] expiration, priority, collapseIdentifier and topic parameters ignored in send(...) method

Ignored Parameters in send(...)
In APNSwiftConnection.send(_ notification: Notification, ...) the parameters expiration, priority, collapseIdentifier and topic are ignored and not passed to send(rawBytes payload: ByteBuffer, ...).

To Reproduce
See Line 169 in APNSwiftConnection.swift

Expected behavior
All function parameters should be passed to send(rawBytes payload: ByteBuffer, ...).

Additional context
The function documentation is also not up to date and mentions bearerToken.

[BUG] Package resolution never ends if used together with Vapor default template.

Describe the bug
Package resolution never ends if used together with Vapor default template.

To Reproduce
Steps to reproduce the behavior:

  1. vapor new project
  2. Add .package(url: "https://github.com/kylebrowning/APNSwift.git", .upToNextMinor(from: "1.3.0")) to the dependencies.
  3. swift package resolve
  4. The resolution stops at Fetching https://github.com/apple/swift-nio-http2.git

Platform:
Tested both on macOS 10.15.1 and Ubuntu 18.04

Swift Version:
macOS:
Apple Swift version 5.1.2 (swiftlang-1100.0.278 clang-1100.0.33.9)
Target: x86_64-apple-darwin19.0.0
Ubuntu:
Swift version 5.1 (swift-5.1.2-RELEASE)
Target: x86_64-unknown-linux-gnu

Vapor toolbox version:
3.1.10

Running swift build will output the following error:

error: the package dependency graph could not be resolved; possibly because of these requirements: ###

where ### can be both APNSwift or Vapor depending on the order in which you put them in your dependencies.

[BUG]

I can't figure out what I'm doing wrong to add this into a non-vapor project.

% swift build --enable-test-discovery -c release
'push' /Users/scott/push: error: product dependency 'APNSwift' in package 'APNSwift' not found
% swift --version
Apple Swift version 5.3.1 (swiftlang-1200.0.39 clang-1200.0.32.6)
Target: x86_64-apple-darwin19.6.0

// swift-tools-version:5.2
// The swift-tools-version declares the minimum version of Swift required to build this package.

import PackageDescription

let package = Package(
    name: "push",
    platforms: [
       .macOS(.v10_15)
    ],
    dependencies: [
        .package(url: "https://github.com/vapor/postgres-kit.git", from: "2.0.0"),
	.package(url: "https://github.com/kylebrowning/APNSwift.git", from: "2.1.0")
    ],
    targets: [
        .target(
            name: "push", dependencies: [
                .product(name: "PostgresKit", package: "postgres-kit"),
                .product(name: "APNSwift", package: "APNSwift")
        ]),
        .testTarget( name: "pushTests", dependencies: ["push"]),
    ]
)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.