Open mxcl opened 5 years ago
@millenomi, who works on URLSession?
cc ianpartridge (JIRA User)
Comment by Ian Partridge (JIRA)
https://github.com/apple/swift-corelibs-foundation/pull/1625 was supposed to fix this... 🙁
@mxcl - let us know if you find a recreate...
I just hit this on Linux as well. Unfortunately I can't figure out how to put together a recreate so I know this isn't super helpful but I thought I'd post here anyway.
So, I just put this test together:
/// Register your application's routes here.
public func routes(_ router: Router) throws {
// Basic "It works" example
router.get { req throws -> Future<String> in
let client = try req.make(Client.self)
return client.post("https://httpbin.org/anything", headers: ["X-API-KEY": "Test"]) { req in
try req.content.encode(ContentTest(name: "Test"))
}.transform(to: "Hello, World")
}
struct ContentTest: Content {
let name: String
}
}
I wasn't able to get it to crash on Linux in Docker, even though it's essentially doing the exact same thing my server is with a different URL. I'm not sure what's going on but it brought my server down multiple times today so I'm gonna roll back to 4.x for now.
Environment
- Ubuntu 16.04 - Swift 5.0.0 - cURL 7.61.0 - AWS t3.nano instanceAdditional Detail from JIRA
| | | |------------------|-----------------| |Votes | 2 | |Component/s | Foundation | |Labels | Bug, 5.0Regression | |Assignee | None | |Priority | Medium | md5: 54801e544c0d154f93c41690a150a82eIssue Description:
Hey people, sorry to report I got this crasher in my server app with Swift 5.0.0:
I cannot offer more info right now, but will attempt to trace it better and supplement the report.
Never saw it with 4.x (was running with 4.x for \~5 months), and I did update to Swift 5 on Monday, so it seems Swift 5, but you will know better.