Closed grahamburgsma closed 1 year ago
What is the Vapor version that the build process of your app would pull? This is likely a vapor issue which we've had report of in the Server, after a new release for more Sendable-compatibility (https://github.com/vapor/vapor/releases/tag/4.80.0)
To be fair it looks more like a Swift issue than Vapor, but from a user standpoint those are pretty much the same i guess.
Anyway this issue should be moved to the Vapor repo, pretty sure it isn't related to PostgresNIO 🙂
@grahamburgsma Which Swift version do you use? Do you use static linking? Can you reduce your crasher?
@MahdiBM The original report was with 4.80. Just tried with 4.79 and the server started, but had this error log (below), but then a minute later crashed with the same error as before.
@fabianfett Swift version 5.8.1. I don't specify when running, so I'm guessing no static linking.
[ DEBUG ] Channel error caught. [database-id: psql, psql_connection_id: 2, psql_error: handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268435593 error:10000089:SSL routines:OPENSSL_internal:DECODE_ERROR at /build/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/ssl_x509.cc:303, Error: 268435593 error:10000089:SSL routines:OPENSSL_internal:DECODE_ERROR at /build/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/handshake_client.cc:949]))] (PostgresNIO/PostgresChannelHandler.swift:104)
[ DEBUG ] Cleaning up and closing connection. [database-id: psql, psql_connection_id: 2, psql_error: PSQLError – Generic description to prevent accidental leakage of sensitive data. For debugging details, use `String(reflecting: error)`.] (PostgresNIO/PostgresChannelHandler.swift:566)
[ ERROR ] Opening new connection for pool failed: PSQLError(code: connectionError, underlying: NIOSSL.NIOSSLError.handshakeFailed(NIOSSL.BoringSSLError.sslError([Error: 268435593 error:10000089:SSL routines:OPENSSL_internal:DECODE_ERROR at /build/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/ssl_x509.cc:303, Error: 268435593 error:10000089:SSL routines:OPENSSL_internal:DECODE_ERROR at /build/.build/checkouts/swift-nio-ssl/Sources/CNIOBoringSSL/ssl/handshake_client.cc:949]))) [database-id: psql] (AsyncKit/EventLoopConnectionPool.swift:228)
@grahamburgsma Which command do you use to compile?
Which command do you use to compile?
Build with Docker:
FROM swift:5.8-focal
RUN swift build -c release
Does it repro with 5.8.1
explicitly as well?
FROM swift:5.8.1-focal
RUN swift build -c release
Okay, I can repro a crash in 5.8.1
.
@grahamburgsma this should be fixed with 1.18.1
. Can you please validate the fix on your side for me?
Should be fixed with
1.18.1
. Can you please validate the fix on your side for me?
@fabianfett 1.18.1 does indeed fix it, thank you! 🙌
Describe the bug
Upgrading to 1.18 (and no other changes) crashes Vapor app when running on Linux server, works fine on Mac.
Crash logs aren't very helpful in diagnosing the issue, but maybe there's a clue you can see.
Environment
Docker image
swift:5.8-focal-slim
running on AWS ECS Fargate.