prisma: Segmentation fault on ARM64 Linux

Bug description

I’m using prisma in arm64 linux with openssl3 get Segmentation fault (core dumped) error.

% npx prisma version
prisma                  : 4.10.1
@prisma/client          : 4.10.1
Current platform        : linux-arm64-openssl-3.0.x
Query Engine (Node-API) : libquery-engine aead147aa326ccb985dcfed5b065b4fdabd44b19 (at node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-3.0.x.so.node)
Migration Engine        : migration-engine-cli aead147aa326ccb985dcfed5b065b4fdabd44b19 (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-3.0.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.10.1-1.80b351cc7c06d352abe81be19b8a89e9c6b7c110
Default Engines Hash    : aead147aa326ccb985dcfed5b065b4fdabd44b19
Studio                  : 0.481.0
Preview Features        : orderByNulls, filteredRelationCount
% uname -a
Linux ubuntu 5.19.0-1019-oracle #22-Ubuntu SMP Thu Mar 9 02:32:24 UTC 2023 aarch64 aarch64 aarch64 GNU/Linux
% lsb_release -a
Distributor ID: Ubuntu
Description:    Ubuntu 22.10
Release:        22.10
Codename:       kinetic

I can’t create a reproducible case, the problem I encountered when running the https://github.com/civitai/civitai project, here’s the full log for reference:

npm run dev
> model-share@0.1.0 dev
> next dev

ready - started server on 0.0.0.0:3000, url: http://localhost:3000
info  - Loaded env from /home/ubuntu/Projects/GitHub/Civitai/civitai/.env
warn  - You have enabled experimental features (largePageDataBytes, modularizeImports) in next.config.mjs.
warn  - Experimental features are not covered by semver, and may cause unexpected or broken application behavior. Use at your own risk.

event - compiled client and server successfully in 7.8s (4341 modules)
wait  - compiling / (client and server)...
event - compiled client and server successfully in 2.9s (4582 modules)
wait  - compiling /src/middleware (client and server)...
event - compiled successfully in 72 ms (41 modules)
wait  - compiling /api/auth/[...nextauth] (client and server)...
event - compiled successfully in 306 ms (562 modules)
prisma:query SELECT "public"."Tag"."id", "public"."Tag"."name", "public"."Tag"."isCategory" FROM "public"."Tag" LEFT JOIN "public"."TagRank" AS "orderby_1_TagRank" ON ("public"."Tag"."id" = "orderby_1_TagRank"."tagId") WHERE ("public"."Tag"."target" && $1 AND "public"."Tag"."id" NOT IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71) AND ("public"."Tag"."id") NOT IN (SELECT "t0"."id" FROM "public"."Tag" AS "t0" INNER JOIN "public"."TagsOnTags" AS "j0" ON ("j0"."toTagId") = ("t0"."id") WHERE ("j0"."fromTagId" IN ($72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138,$139,$140,$141) AND "t0"."id" IS NOT NULL)) AND "public"."Tag"."unlisted" = $142) ORDER BY "orderby_1_TagRank"."modelCountAllTimeRank" ASC LIMIT $143 OFFSET $144
prisma:query SELECT COUNT(*) FROM (SELECT "public"."Tag"."id" FROM "public"."Tag" WHERE ("public"."Tag"."target" && $1 AND "public"."Tag"."id" NOT IN ($2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22,$23,$24,$25,$26,$27,$28,$29,$30,$31,$32,$33,$34,$35,$36,$37,$38,$39,$40,$41,$42,$43,$44,$45,$46,$47,$48,$49,$50,$51,$52,$53,$54,$55,$56,$57,$58,$59,$60,$61,$62,$63,$64,$65,$66,$67,$68,$69,$70,$71) AND ("public"."Tag"."id") NOT IN (SELECT "t0"."id" FROM "public"."Tag" AS "t0" INNER JOIN "public"."TagsOnTags" AS "j0" ON ("j0"."toTagId") = ("t0"."id") WHERE ("j0"."fromTagId" IN ($72,$73,$74,$75,$76,$77,$78,$79,$80,$81,$82,$83,$84,$85,$86,$87,$88,$89,$90,$91,$92,$93,$94,$95,$96,$97,$98,$99,$100,$101,$102,$103,$104,$105,$106,$107,$108,$109,$110,$111,$112,$113,$114,$115,$116,$117,$118,$119,$120,$121,$122,$123,$124,$125,$126,$127,$128,$129,$130,$131,$132,$133,$134,$135,$136,$137,$138,$139,$140,$141) AND "t0"."id" IS NOT NULL)) AND "public"."Tag"."unlisted" = $142) OFFSET $143) AS "sub"
wait  - compiling /api/trpc/[trpc] (client and server)...
event - compiled successfully in 822 ms (562 modules)
prisma:query SELECT 1
prisma:query SELECT "public"."Announcement"."id", "public"."Announcement"."title", "public"."Announcement"."content", "public"."Announcement"."color", "public"."Announcement"."emoji" FROM "public"."Announcement" WHERE ("public"."Announcement"."id" NOT IN ($1) AND ("public"."Announcement"."startsAt" <= $2 OR "public"."Announcement"."startsAt" IS NULL) AND ("public"."Announcement"."endsAt" >= $3 OR "public"."Announcement"."endsAt" IS NULL)) ORDER BY "public"."Announcement"."id" DESC LIMIT $4 OFFSET $5
Segmentation fault (core dumped)

and version 4.12.0-integration-rtld-deepbind.3 can’t fix my issue.

% npx prisma version 
prisma                  : 4.12.0-integration-rtld-deepbind.3
@prisma/client          : 4.12.0-integration-rtld-deepbind.3
Current platform        : linux-arm64-openssl-3.0.x
Query Engine (Node-API) : libquery-engine 3b9f029aeb9a91829e6648c61146b02f3646d1e7 (at node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-3.0.x.so.node)
Migration Engine        : migration-engine-cli 3b9f029aeb9a91829e6648c61146b02f3646d1e7 (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-3.0.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.12.0-22.3b9f029aeb9a91829e6648c61146b02f3646d1e7
Default Engines Hash    : 3b9f029aeb9a91829e6648c61146b02f3646d1e7
Studio                  : 0.483.0
Preview Features        : orderByNulls, filteredRelationCount

How to reproduce

I can’t create a reproducible case, the problem I encountered when running the https://github.com/civitai/civitai project.

Expected behavior

No response

Prisma information

schema.prisma

ref to: https://github.com/civitai/civitai/blob/main/prisma/schema.prisma

client.ts

ref to: https://github.com/civitai/civitai/blob/main/src/server/db/client.ts

Environment & setup

  • OS: Ubuntu 22.10
  • Database: PostgreSQL
  • Node.js version: v18.15.0

Prisma Version

v4.10.1 and v4.12.0-integration-rtld-deepbind.3

prisma                  : 4.10.1
@prisma/client          : 4.10.1
Current platform        : linux-arm64-openssl-3.0.x
Query Engine (Node-API) : libquery-engine aead147aa326ccb985dcfed5b065b4fdabd44b19 (at node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-3.0.x.so.node)
Migration Engine        : migration-engine-cli aead147aa326ccb985dcfed5b065b4fdabd44b19 (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-3.0.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.10.1-1.80b351cc7c06d352abe81be19b8a89e9c6b7c110
Default Engines Hash    : aead147aa326ccb985dcfed5b065b4fdabd44b19
Studio                  : 0.481.0
Preview Features        : orderByNulls, filteredRelationCount
prisma                  : 4.12.0-integration-rtld-deepbind.3
@prisma/client          : 4.12.0-integration-rtld-deepbind.3
Current platform        : linux-arm64-openssl-3.0.x
Query Engine (Node-API) : libquery-engine 3b9f029aeb9a91829e6648c61146b02f3646d1e7 (at node_modules/@prisma/engines/libquery_engine-linux-arm64-openssl-3.0.x.so.node)
Migration Engine        : migration-engine-cli 3b9f029aeb9a91829e6648c61146b02f3646d1e7 (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-3.0.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.12.0-22.3b9f029aeb9a91829e6648c61146b02f3646d1e7
Default Engines Hash    : 3b9f029aeb9a91829e6648c61146b02f3646d1e7
Studio                  : 0.483.0
Preview Features        : orderByNulls, filteredRelationCount

About this issue

  • Original URL
  • State: closed
  • Created a year ago
  • Reactions: 32
  • Comments: 79 (16 by maintainers)

Most upvoted comments

I’ve identified the problem and currently working on fixing it. The root cause was related to how we build and link OpenSSL in our cross-compilation images, leading to glibc accidentally being statically linked and causing problems. As other people noted in the comments, the newer the OS (and thus system libc version), the higher probability of problems there is, and it also just so happens to be easier to run into problems with binaries compiled for OpenSSL 3 rather than OpenSSL 1.1, but it affects all our ARM64 binaries except (theoretically) those for glibc-based systems with OpenSSL 1.0.

The fix for glibc distros was fairly simple (I’ll do the CI tricks across the repos to release a dev/integration build based on 5.2.0 so you could test and provide feedback). Alpine requires a bit more work, but you can expect news soon.

Adding to my previous comment, this appears to be caused by a double-free bug that occurs in openssl, in the quaint package’s postgres connector, in the prisma query engine. Not sure which part is to blame:

  • openssl 3.0.8
  • openssl crate
  • native_tls crate
  • quaint crate
  • tokio-runtime
  • tokio_postgres crate
  • tokio crate
  • query-engine-node-api crate
  • rust
  • gcc

I compiled the prisma/prisma-engine’s branch 4.16.x (commit 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81) with the AddressSanitizer enabled, which caught the bug.

There is of course the possibility that removing RTLD_DEEPBIND as part of my compiling&running steps produced some issue with openssl which caused this as a different segfault, I don’t really know what that flag does. Or this could be a false positive, but rust book says:

AddressSanitizer works with non-instrumented code although it will impede its ability to detect some bugs. It is not expected to produce false positive reports.

I compiled and ran the custom query-engine .so.node library with the sanitizer like this: https://gist.github.com/cxcorp/4a2b4184b9a51b54dd49ed692e6f05bd

I reproduced it like this:

  1. Open connection and make some prisma.xxx.findUnique() invocations to a Postgres 15 instance
  2. Connect to the PG instance and terminate prisma’s connections
    SELECT pg_terminate_backend(pid) FROM pg_stat_activity WHERE pid <> pg_backend_pid() AND datname = 'name of your pg database, e.g. postgres';
    
  3. Make query again, you’ll get PrismaClientKnownRequestError: \nInvalid prisma.xxx.findUnique() invocation:\n\n\nServer has closed the connection.
  4. Make query once more and you trigger the error and see this long address sanitizer dump, with a summary of SUMMARY: AddressSanitizer: double-free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52 in __interceptor_free

This is it in a nutshell, but really I used this project: https://github.com/cxcorp/saituri-9000, opened the webpage, killed connections from pg, then reloaded the webpage twice.

Here is the dump caught by AddressSanitizer:

=================================================================
==300==ERROR: AddressSanitizer: attempting double-free on 0x007e814d34e0 in thread T13:
    #0 0x7faebca5a0 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7e86153a1c in ERR_new (/custom-prisma-engines/libquery_engine.so.node+0x33a3a1c)
    #2 0x7e861081f4 in ASN1_get_object (/custom-prisma-engines/libquery_engine.so.node+0x33581f4)
    #3 0x7e862461c0 in asn1_d2i_read_bio (/custom-prisma-engines/libquery_engine.so.node+0x34961c0)
    #4 0x7e8620b660 in ossl_read_der (/custom-prisma-engines/libquery_engine.so.node+0x345b660)
    #5 0x7e861f7fe8 in der2key_decode (/custom-prisma-engines/libquery_engine.so.node+0x3447fe8)
    #6 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #7 0x7e861faa94 in spki2typespki_decode (/custom-prisma-engines/libquery_engine.so.node+0x344aa94)
    #8 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #9 0x7e86149f78 in OSSL_DECODER_from_bio (/custom-prisma-engines/libquery_engine.so.node+0x3399f78)
    #10 0x7e8614a274 in OSSL_DECODER_from_data (/custom-prisma-engines/libquery_engine.so.node+0x339a274)
    #11 0x7e861e03c0 in x509_pubkey_ex_d2i_ex (/custom-prisma-engines/libquery_engine.so.node+0x34303c0)
    #12 0x7e8610f788 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f788)
    #13 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #14 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #15 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #16 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #17 0x7e8611091c in ASN1_item_d2i (/custom-prisma-engines/libquery_engine.so.node+0x336091c)
    #18 0x7e862def88 in PEM_X509_INFO_read_bio_ex (/custom-prisma-engines/libquery_engine.so.node+0x352ef88)
    #19 0x7e861bf310 in X509_load_cert_crl_file_ex.part.0 (/custom-prisma-engines/libquery_engine.so.node+0x340f310)
    #20 0x7e861bf748 in by_file_ctrl_ex (/custom-prisma-engines/libquery_engine.so.node+0x340f748)
    #21 0x7e861d0708 in X509_STORE_set_default_paths_ex (/custom-prisma-engines/libquery_engine.so.node+0x3420708)
    #22 0x7e849b054c in openssl::ssl::SslContextBuilder::set_default_verify_paths::hc3e46f9347ca679c src/ssl/mod.rs:895
    #23 0x7e849afe70 in openssl::ssl::connector::SslConnector::builder::h6d8ef71feb39cbf8 src/ssl/connector.rs:75
    #24 0x7e8496cb98 in native_tls::imp::TlsConnector::new::h5ccb1a7a05ea2cb9 src/imp/openssl.rs:280
    #25 0x7e8496cb98 in native_tls::TlsConnectorBuilder::build::h50e69f1566447ee7 src/lib.rs:446
    #26 0x7e84c40170 in quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hf2fa4a3924dd93b1 quaint/src/connector/postgres.rs:613
    #27 0x7e84c40170 in _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h61621ea22b8716a1 quaint/src/pooled/manager.rs:118
    #28 0x7e85a05d98 in _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h170a91d08feff3c9 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125
    #29 0x7e85a05d98 in mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::haeb0e4bc41109efe /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:541
    #30 0x7e85a05d98 in mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h10bde0b063c101a1 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:529
    #31 0x7e85a05d98 in mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h42455cf966cd87a4 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:448
    #32 0x7e85a02c8c in mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::hef107974fe9f0bf9 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:434
    #33 0x7e85a66434 in _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h6d3c5601d83ddeaf /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/fuse.rs:86
    #34 0x7e85a660b0 in _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::hd9c8c8b9e7edceda /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125
    #35 0x7e85a660b0 in futures_util::future::future::FutureExt::poll_unpin::hf756f51698cd9198 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/mod.rs:562
    #36 0x7e85a660b0 in mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hda55af7963ab163a /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/async_await/select_mod.rs:321
    #37 0x7e85a0a8ac in core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h65ad03bcb148ea0f /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:294
    #38 0x7e85a0a8ac in mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h181255aa80edd571 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/async_await/select_mod.rs:321
    #39 0x7e85a0a8ac in _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h287c8a251829da0d /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/poll_fn.rs:56
    #40 0x7e85a01e80 in mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h8b4ef37944c47448 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/time.rs:11
    #41 0x7e85a01e80 in mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hde1a8e04d8102d45 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:426
    #42 0x7e859f6e40 in quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::hbb5e1b6d94cc7d2b quaint/src/connector/metrics.rs:66
    #43 0x7e859f6e40 in quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h3d56ab108e661e25 quaint/src/pooled.rs:481
    #44 0x7e85a0e5dc in _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h73e03032a9f20288 query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71
    #45 0x7e85a0e5dc in sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h6f535dddff1fb805 query-engine/connectors/sql-query-connector/src/database/mod.rs:47
    #46 0x7e85a0e5dc in _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcf8fc2f443f65fa4 query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75
    #47 0x7e83690894 in _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::hca55fcdde1f18b02 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125
    #48 0x7e83690894 in _$LT$tracing..instrument..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h8fb14aaab10aab9e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.36/src/instrument.rs:272
    #49 0x7e83574ac8 in query_core::executor::execute_operation::execute_single_self_contained::_$u7b$$u7b$closure$u7d$$u7d$::h4c7e49e7af8924ee query-engine/core/src/executor/execute_operation.rs:76
    #50 0x7e83574ac8 in _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hbf413748e5f768f0 query-engine/core/src/executor/interpreting_executor.rs:65
    #51 0x7e8356a198 in _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::hd2b9740aea0f315d /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/task/task_local.rs:348
    #52 0x7e8356a198 in tokio::task::task_local::LocalKey$LT$T$GT$::scope_inner::h3ff5674732a0c5d2 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/task/task_local.rs:233
    #53 0x7e8356a198 in _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h32738925497e6eeb /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/task/task_local.rs:345
    #54 0x7e8356a198 in query_core::executor::request_context::with_request_context::_$u7b$$u7b$closure$u7d$$u7d$::h977d6354a6d71a4f query-engine/core/src/executor/request_context.rs:64
    #55 0x7e8356a198 in _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::h374e53de943a8a7d query-engine/core/src/executor/interpreting_executor.rs:67
    #56 0x7e835dbd18 in _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::hae5c491175738983 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125
    #57 0x7e835dbd18 in request_handlers::handler::RequestHandler::handle_request::_$u7b$$u7b$closure$u7d$$u7d$::h39a4d5c23d8dc785 query-engine/request-handlers/src/handler.rs:212
    #58 0x7e835dbd18 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h874691e86eabe3c9 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:296
    #59 0x7e835dbd18 in _$LT$futures_util..future..future..catch_unwind..CatchUnwind$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::hb23d1554578c0599 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/catch_unwind.rs:36
    #60 0x7e835dbd18 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h7e2a94ca73beeaa8 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271
    #61 0x7e835dbd18 in std::panicking::try::do_call::hf749b870d6f7b283 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:500
    #62 0x7e836d43c8 in __rust_try (/custom-prisma-engines/libquery_engine.so.node+0x9243c8)
    #63 0x7e835344cc in std::panicking::try::h852bd82e6f2de8af /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:464
    #64 0x7e835344cc in std::panic::catch_unwind::h6352c4f79fb095b3 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:142
    #65 0x7e835344cc in _$LT$futures_util..future..future..catch_unwind..CatchUnwind$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h3243f75372c7bf0d /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/catch_unwind.rs:36
    #66 0x7e8369cd90 in request_handlers::handler::RequestHandler::handle_single::_$u7b$$u7b$closure$u7d$$u7d$::h7e83cd6a70b359dd query-engine/request-handlers/src/handler.rs:62
    #67 0x7e8369cd90 in request_handlers::handler::RequestHandler::handle::_$u7b$$u7b$closure$u7d$$u7d$::hdc2c2d0f49061c48 query-engine/request-handlers/src/handler.rs:47
    #68 0x7e8369cd90 in _$LT$tracing..instrument..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h082f48c3750280cb /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.36/src/instrument.rs:272
    #69 0x7e8369cd90 in query_engine::engine::QueryEngine::query::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h3fa3b2b1f87dae67 query-engine/query-engine-node-api/src/engine.rs:375
    #70 0x7e835d6fd8 in _$LT$tracing..instrument..WithDispatch$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h921b6d1ac760be46 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tracing-0.1.36/src/instrument.rs:329
    #71 0x7e835d6fd8 in query_engine::engine::QueryEngine::query::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::haed7527ad803862a query-engine/query-engine-node-api/src/engine.rs:380
    #72 0x7e835d6fd8 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h3cd4cef5c799ad10 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:296
    #73 0x7e835d6fd8 in _$LT$futures_util..future..future..catch_unwind..CatchUnwind$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::h302aab484edab7df /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/catch_unwind.rs:36
    #74 0x7e835d6fd8 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h9f9be64409e88d24 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271
    #75 0x7e835d6fd8 in std::panicking::try::do_call::hd53051d21399f999 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:500
    #76 0x7e836d43c8 in __rust_try (/custom-prisma-engines/libquery_engine.so.node+0x9243c8)
    #77 0x7e836108d8 in std::panicking::try::h10bc2ad4927fa443 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:464
    #78 0x7e836108d8 in std::panic::catch_unwind::hdd32363ac0e0d64f /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:142
    #79 0x7e836108d8 in _$LT$futures_util..future..future..catch_unwind..CatchUnwind$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::hc4978595d14418ba /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/futures-util-0.3.24/src/future/future/catch_unwind.rs:36
    #80 0x7e836108d8 in query_engine::engine::async_panic_to_js_error::_$u7b$$u7b$closure$u7d$$u7d$::h34e94a510446441c query-engine/query-engine-node-api/src/engine.rs:562
    #81 0x7e836108d8 in query_engine::engine::QueryEngine::query::_$u7b$$u7b$closure$u7d$$u7d$::h2db83406061f8955 query-engine/query-engine-node-api/src/engine.rs:382
    #82 0x7e836108d8 in query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__query::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h3291812f3c275bca query-engine/query-engine-node-api/src/engine.rs:138
    #83 0x7e836108d8 in napi::tokio_runtime::execute_tokio_future::_$u7b$$u7b$closure$u7d$$u7d$::hcad234e5f4842122 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.12.4/src/tokio_runtime.rs:99
    #84 0x7e835c6f24 in tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::h50fa0bb685d52a2b /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/core.rs:223
    #85 0x7e835c6f24 in tokio::loom::std::unsafe_cell::UnsafeCell$LT$T$GT$::with_mut::hd40d8d7858958ec3 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/loom/std/unsafe_cell.rs:14
    #86 0x7e835c6f24 in tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::h1a9c508a5fdbdfe9 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/core.rs:212
    #87 0x7e835c6f24 in tokio::runtime::task::harness::poll_future::_$u7b$$u7b$closure$u7d$$u7d$::h2475cb4a1c0135ec /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/harness.rs:476
    #88 0x7e835c6f24 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h8726903be0855395 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271
    #89 0x7e835c6f24 in std::panicking::try::do_call::h65f262dd2465525c /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:500
    #90 0x7e836d43c8 in __rust_try (/custom-prisma-engines/libquery_engine.so.node+0x9243c8)
    #91 0x7e8362f6fc in std::panicking::try::h658b9c5269a0dc00 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:464
    #92 0x7e8362f6fc in std::panic::catch_unwind::hb9ec142ead165f1b /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:142
    #93 0x7e8362f6fc in tokio::runtime::task::harness::poll_future::h12b3aa06ebe48d39 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/harness.rs:464
    #94 0x7e8362f6fc in tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll_inner::h0a5321c7a807da0d /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/harness.rs:198
    #95 0x7e8362f6fc in tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h7a32b9ebb9d5d753 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/harness.rs:152
    #96 0x7e8362f6fc in tokio::runtime::task::raw::poll::h42d33f42f81d8814 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/tokio-1.25.0/src/runtime/task/raw.rs:255
    #97 0x7e85bef6bc in tokio::runtime::task::raw::RawTask::poll::h18a8b4a364064cb2 src/runtime/task/raw.rs:200
    #98 0x7e85bef6bc in tokio::runtime::task::LocalNotified$LT$S$GT$::run::haed07049b5913583 src/runtime/task/mod.rs:394
    #99 0x7e85bef6bc in tokio::runtime::scheduler::multi_thread::worker::Context::run_task::_$u7b$$u7b$closure$u7d$$u7d$::h8a6e82ae04a25165 src/runtime/scheduler/multi_thread/worker.rs:464
    #100 0x7e85bef6bc in tokio::runtime::coop::with_budget::h432cfc77b1846dd6 src/runtime/coop.rs:102
    #101 0x7e85bef6bc in tokio::runtime::coop::budget::hcfcaa1c0981b0d47 src/runtime/coop.rs:68
    #102 0x7e85bef6bc in tokio::runtime::scheduler::multi_thread::worker::Context::run_task::h8e507ae5d893e7d1 src/runtime/scheduler/multi_thread/worker.rs:463
    #103 0x7e85bea2f0 in tokio::runtime::scheduler::multi_thread::worker::Context::run::h5a1ed2b3637f0370 src/runtime/scheduler/multi_thread/worker.rs:426
    #104 0x7e85bea2f0 in tokio::runtime::scheduler::multi_thread::worker::run::_$u7b$$u7b$closure$u7d$$u7d$::h221e37b11ae8de2b src/runtime/scheduler/multi_thread/worker.rs:406
    #105 0x7e85bea2f0 in tokio::macros::scoped_tls::ScopedKey$LT$T$GT$::set::h3a69d8304296c9f3 src/macros/scoped_tls.rs:61
    #106 0x7e85be98e8 in tokio::runtime::scheduler::multi_thread::worker::run::h73f83b945b886231 src/runtime/scheduler/multi_thread/worker.rs:403
    #107 0x7e85c38384 in tokio::runtime::scheduler::multi_thread::worker::Launch::launch::_$u7b$$u7b$closure$u7d$$u7d$::hd6c0d9b22cf3bd49 src/runtime/scheduler/multi_thread/worker.rs:365
    #108 0x7e85c38384 in _$LT$tokio..runtime..blocking..task..BlockingTask$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h945309a54a95c0bc src/runtime/blocking/task.rs:42
    #109 0x7e85c38048 in tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::hed934878358eb9b6 src/runtime/task/core.rs:223
    #110 0x7e85c38048 in tokio::loom::std::unsafe_cell::UnsafeCell$LT$T$GT$::with_mut::h16a6323988268f62 src/loom/std/unsafe_cell.rs:14
    #111 0x7e85c37da8 in tokio::runtime::task::core::Core$LT$T$C$S$GT$::poll::h2190b97c5e6de490 src/runtime/task/core.rs:212
    #112 0x7e85c37da8 in tokio::runtime::task::harness::poll_future::_$u7b$$u7b$closure$u7d$$u7d$::h32d719e5ce0898ae src/runtime/task/harness.rs:476
    #113 0x7e85c37da8 in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h216b1dd796d53f5d /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271
    #114 0x7e85c37954 in std::panicking::try::do_call::h98698abd6c2493ef /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:500
    #115 0x7e8591ce14 in __rust_try.117668 (/custom-prisma-engines/libquery_engine.so.node+0x2b6ce14)
    #116 0x7e85c3768c in std::panicking::try::h52954af6790c8ade /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:464
    #117 0x7e85c3768c in std::panic::catch_unwind::ha4e96885098b14ea /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:142
    #118 0x7e85c3768c in tokio::runtime::task::harness::poll_future::he97b2d79e04a4667 src/runtime/task/harness.rs:464
    #119 0x7e85c37460 in tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll_inner::h25db479707967b61 src/runtime/task/harness.rs:198
    #120 0x7e85c37268 in tokio::runtime::task::harness::Harness$LT$T$C$S$GT$::poll::h9455d45450f72e62 src/runtime/task/harness.rs:152
    #121 0x7e85c53ed0 in tokio::runtime::task::raw::RawTask::poll::h18a8b4a364064cb2 src/runtime/task/raw.rs:200
    #122 0x7e85c53ed0 in tokio::runtime::task::UnownedTask$LT$S$GT$::run::h1e8312c2e42259b6 src/runtime/task/mod.rs:431
    #123 0x7e85c53118 in tokio::runtime::blocking::pool::Task::run::h896d0d295dfd465c src/runtime/blocking/pool.rs:159
    #124 0x7e85c53118 in tokio::runtime::blocking::pool::Inner::run::hcd48a31efabc221b src/runtime/blocking/pool.rs:511
    #125 0x7e85c53118 in tokio::runtime::blocking::pool::Spawner::spawn_thread::_$u7b$$u7b$closure$u7d$$u7d$::h3b6816bcb8ea8949 src/runtime/blocking/pool.rs:469
    #126 0x7e85c53118 in std::sys_common::backtrace::__rust_begin_short_backtrace::hbe6afefe001118a2 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:135
    #127 0x7e85c52b0c in std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h20c871d94663030d /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:529
    #128 0x7e85c52b0c in _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h2e7e14c0091eeedd /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271
    #129 0x7e85c52b0c in std::panicking::try::do_call::he7f2d219f77525f7 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:500
    #130 0x7e8591ce14 in __rust_try.117668 (/custom-prisma-engines/libquery_engine.so.node+0x2b6ce14)
    #131 0x7e85c52890 in std::panicking::try::hfd6e3fb2c03b95cf /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:464
    #132 0x7e85c52458 in std::panic::catch_unwind::h7036baacde1efdc2 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:142
    #133 0x7e85c52458 in std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h98df41645ae18307 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:528
    #134 0x7e85c52458 in core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::hdcafb49f7d71f5e1 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
    #135 0x7e85b3af48 in _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h4c013fa37f4cf5cd /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1985
    #136 0x7e85b60598 in _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3d568319c716539d /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1985
    #137 0x7e85b60598 in std::sys::unix::thread::Thread::new::thread_start::h6ea603a1058c650c src/sys/unix/thread.rs:108
    #138 0x7fae68edd4  (/lib/aarch64-linux-gnu/libc.so.6+0x7edd4)
    #139 0x7fae6f7e58  (/lib/aarch64-linux-gnu/libc.so.6+0xe7e58)

0x007e814d34e0 is located 0 bytes inside of 19-byte region [0x007e814d34e0,0x007e814d34f3)
freed by thread T12 here:
    #0 0x7faebca5a0 in __interceptor_free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52
    #1 0x7e861536b0 in ERR_pop_to_mark (/custom-prisma-engines/libquery_engine.so.node+0x33a36b0)
    #2 0x7e8617d118 in ossl_namemap_doall_names (/custom-prisma-engines/libquery_engine.so.node+0x33cd118)
    #3 0x7e8616c928 in EVP_PKEY_set_type_by_keymgmt (/custom-prisma-engines/libquery_engine.so.node+0x33bc928)
    #4 0x7e861648a4 in evp_keymgmt_util_make_pkey (/custom-prisma-engines/libquery_engine.so.node+0x33b48a4)
    #5 0x7e8614c6a8 in decoder_construct_pkey (/custom-prisma-engines/libquery_engine.so.node+0x339c6a8)
    #6 0x7e86149ab0 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399ab0)
    #7 0x7e861f80c8 in der2key_decode (/custom-prisma-engines/libquery_engine.so.node+0x34480c8)
    #8 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #9 0x7e861faa94 in spki2typespki_decode (/custom-prisma-engines/libquery_engine.so.node+0x344aa94)
    #10 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #11 0x7e86149f78 in OSSL_DECODER_from_bio (/custom-prisma-engines/libquery_engine.so.node+0x3399f78)
    #12 0x7e8614a274 in OSSL_DECODER_from_data (/custom-prisma-engines/libquery_engine.so.node+0x339a274)
    #13 0x7e861e03c0 in x509_pubkey_ex_d2i_ex (/custom-prisma-engines/libquery_engine.so.node+0x34303c0)
    #14 0x7e8610f788 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f788)
    #15 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #16 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #17 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #18 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #19 0x7e8611091c in ASN1_item_d2i (/custom-prisma-engines/libquery_engine.so.node+0x336091c)
    #20 0x7e862def88 in PEM_X509_INFO_read_bio_ex (/custom-prisma-engines/libquery_engine.so.node+0x352ef88)
    #21 0x7e861bf310 in X509_load_cert_crl_file_ex.part.0 (/custom-prisma-engines/libquery_engine.so.node+0x340f310)
    #22 0x7e861bf748 in by_file_ctrl_ex (/custom-prisma-engines/libquery_engine.so.node+0x340f748)
    #23 0x7e861d0708 in X509_STORE_set_default_paths_ex (/custom-prisma-engines/libquery_engine.so.node+0x3420708)
    #24 0x7e849b054c in openssl::ssl::SslContextBuilder::set_default_verify_paths::hc3e46f9347ca679c src/ssl/mod.rs:895
    #25 0x7e849afe70 in openssl::ssl::connector::SslConnector::builder::h6d8ef71feb39cbf8 src/ssl/connector.rs:75
    #26 0x7e8496cb98 in native_tls::imp::TlsConnector::new::h5ccb1a7a05ea2cb9 src/imp/openssl.rs:280
    #27 0x7e8496cb98 in native_tls::TlsConnectorBuilder::build::h50e69f1566447ee7 src/lib.rs:446
    #28 0x7e84c40170 in quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hf2fa4a3924dd93b1 quaint/src/connector/postgres.rs:613
    #29 0x7e84c40170 in _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h61621ea22b8716a1 quaint/src/pooled/manager.rs:118
    #30 0x7e85a05d98 in _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h170a91d08feff3c9 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125
    #31 0x7e85a05d98 in mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::haeb0e4bc41109efe /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:541
    #32 0x7e85a05d98 in mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h10bde0b063c101a1 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:529
    #33 0x7e85a05d98 in mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h42455cf966cd87a4 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:448
    #34 0x7e85a02c8c in mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::hef107974fe9f0bf9 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/mobc-0.8.1/src/lib.rs:434

previously allocated by thread T12 here:
    #0 0x7faebcb734 in __interceptor_malloc ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:69
    #1 0x7e86182390 in CRYPTO_strdup (/custom-prisma-engines/libquery_engine.so.node+0x33d2390)
    #2 0x7e86153b24 in ERR_set_debug (/custom-prisma-engines/libquery_engine.so.node+0x33a3b24)
    #3 0x7e86169e44 in find_ameth (/custom-prisma-engines/libquery_engine.so.node+0x33b9e44)
    #4 0x7e8617d118 in ossl_namemap_doall_names (/custom-prisma-engines/libquery_engine.so.node+0x33cd118)
    #5 0x7e8616c928 in EVP_PKEY_set_type_by_keymgmt (/custom-prisma-engines/libquery_engine.so.node+0x33bc928)
    #6 0x7e861648a4 in evp_keymgmt_util_make_pkey (/custom-prisma-engines/libquery_engine.so.node+0x33b48a4)
    #7 0x7e8614c6a8 in decoder_construct_pkey (/custom-prisma-engines/libquery_engine.so.node+0x339c6a8)
    #8 0x7e86149ab0 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399ab0)
    #9 0x7e861f80c8 in der2key_decode (/custom-prisma-engines/libquery_engine.so.node+0x34480c8)
    #10 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #11 0x7e861faa94 in spki2typespki_decode (/custom-prisma-engines/libquery_engine.so.node+0x344aa94)
    #12 0x7e86149cb4 in decoder_process (/custom-prisma-engines/libquery_engine.so.node+0x3399cb4)
    #13 0x7e86149f78 in OSSL_DECODER_from_bio (/custom-prisma-engines/libquery_engine.so.node+0x3399f78)
    #14 0x7e8614a274 in OSSL_DECODER_from_data (/custom-prisma-engines/libquery_engine.so.node+0x339a274)
    #15 0x7e861e03c0 in x509_pubkey_ex_d2i_ex (/custom-prisma-engines/libquery_engine.so.node+0x34303c0)
    #16 0x7e8610f788 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f788)
    #17 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #18 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #19 0x7e861100fc in asn1_template_noexp_d2i (/custom-prisma-engines/libquery_engine.so.node+0x33600fc)
    #20 0x7e8610f978 in asn1_item_embed_d2i (/custom-prisma-engines/libquery_engine.so.node+0x335f978)
    #21 0x7e8611091c in ASN1_item_d2i (/custom-prisma-engines/libquery_engine.so.node+0x336091c)
    #22 0x7e862def88 in PEM_X509_INFO_read_bio_ex (/custom-prisma-engines/libquery_engine.so.node+0x352ef88)
    #23 0x7e861bf310 in X509_load_cert_crl_file_ex.part.0 (/custom-prisma-engines/libquery_engine.so.node+0x340f310)
    #24 0x7e861bf748 in by_file_ctrl_ex (/custom-prisma-engines/libquery_engine.so.node+0x340f748)
    #25 0x7e861d0708 in X509_STORE_set_default_paths_ex (/custom-prisma-engines/libquery_engine.so.node+0x3420708)
    #26 0x7e849b054c in openssl::ssl::SslContextBuilder::set_default_verify_paths::hc3e46f9347ca679c src/ssl/mod.rs:895
    #27 0x7e849afe70 in openssl::ssl::connector::SslConnector::builder::h6d8ef71feb39cbf8 src/ssl/connector.rs:75
    #28 0x7e8496cb98 in native_tls::imp::TlsConnector::new::h5ccb1a7a05ea2cb9 src/imp/openssl.rs:280
    #29 0x7e8496cb98 in native_tls::TlsConnectorBuilder::build::h50e69f1566447ee7 src/lib.rs:446
    #30 0x7e84c40170 in quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hf2fa4a3924dd93b1 quaint/src/connector/postgres.rs:613
    #31 0x7e84c40170 in _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h61621ea22b8716a1 quaint/src/pooled/manager.rs:118

Thread T13 created by T0 here:
    #0 0x7faeb6a234 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
    #1 0x7e85b60170 in std::sys::unix::thread::Thread::new::h7b6b195a22438c26 src/sys/unix/thread.rs:87
    #2 0x7e85c59e84 in std::thread::Builder::spawn_unchecked_::h064b944aaad881f8 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:563
    #3 0x7e85c69bf4 in std::thread::Builder::spawn_unchecked::h716c7a78227ab81d /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:457
    #4 0x7e85c69bf4 in std::thread::Builder::spawn::h031e76ee6e13e9ad /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:389
    #5 0x7e85c69bf4 in tokio::runtime::blocking::pool::Spawner::spawn_thread::hbe50e88614973ccb src/runtime/blocking/pool.rs:466
    #6 0x7e85c69bf4 in tokio::runtime::blocking::pool::Spawner::spawn_task::h32b533721c8cbafa src/runtime/blocking/pool.rs:416
    #7 0x7e85c80924 in tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::h6774c65da129e6c5 src/runtime/blocking/pool.rs:384
    #8 0x7e85c80538 in tokio::runtime::blocking::pool::Spawner::spawn_blocking::h67bab4f2c1c101d9 src/runtime/blocking/pool.rs:301
    #9 0x7e85c802e4 in tokio::runtime::handle::Handle::spawn_blocking::h2a8ee987dc7f67d3 src/runtime/handle.rs:180
    #10 0x7e85c802e4 in tokio::runtime::blocking::pool::spawn_blocking::hf89a265ffdc0097c src/runtime/blocking/pool.rs:183
    #11 0x7e85c85704 in tokio::runtime::scheduler::multi_thread::worker::Launch::launch::hf0c282ed4b02452e src/runtime/scheduler/multi_thread/worker.rs:365
    #12 0x7e85c85704 in tokio::runtime::builder::Builder::build_threaded_runtime::h5fe864477c76fb8a src/runtime/builder.rs:1060
    #13 0x7e85c85704 in tokio::runtime::builder::Builder::build::h5a3026c5e976483e src/runtime/builder.rs:642
    #14 0x7e85c8b09c in tokio::runtime::runtime::Runtime::new::hceb222bd7e9a3db6 src/runtime/runtime.rs:132
    #15 0x7e8492cdc0 in napi::tokio_runtime::create_runtime::h4301b5f1f73d78a4 src/tokio_runtime.rs:11
    #16 0x7e8492cdc0 in napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h09601398bb35ccdc src/tokio_runtime.rs:24
    #17 0x7e8492cdc0 in core::ops::function::FnOnce::call_once::h0b7b67596a3fa3fa /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
    #18 0x7e83693b4c in core::ops::function::FnOnce::call_once::h44970dd661893fee /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
    #19 0x7e83693b4c in once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::h4b7e5fdad11a7f3e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1275
    #20 0x7e83693b4c in once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hadb3508775e3b66e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1085
    #21 0x7e83693b4c in once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hee3505d3bad7b19e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/imp_std.rs:82
    #22 0x7e849a5b10 in core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::hff802b12bd032ed1 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:294
    #23 0x7e849a5b10 in once_cell::imp::initialize_or_wait::hb24ccc233369111e src/imp_std.rs:206
    #24 0x7e8340003c in once_cell::imp::OnceCell$LT$T$GT$::initialize::he4488d9d0c98e857 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/imp_std.rs:78
    #25 0x7e836a57b8 in once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h3908b540eac7491c /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1126
    #26 0x7e836a57b8 in once_cell::sync::OnceCell$LT$T$GT$::get_or_init::he2ae16d6275bf896 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1085
    #27 0x7e836a57b8 in once_cell::sync::Lazy$LT$T$C$F$GT$::force::h917dd1fa2aaad3ec /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1274
    #28 0x7e836a57b8 in _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h1161c151f6bbd4f3 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1335
    #29 0x7e836a57b8 in napi::tokio_runtime::within_runtime_if_available::h2a18ee72606824bb /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.12.4/src/tokio_runtime.rs:82
    #30 0x7e836a57b8 in query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4bc8bed5dff0a019 query-engine/query-engine-node-api/src/engine.rs:138
    #31 0x7e836a57b8 in core::result::Result$LT$T$C$E$GT$::and_then::he0d6c5fd7311c3af /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1319
    #32 0x7e836a57b8 in query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h5c64a1024156dabc query-engine/query-engine-node-api/src/engine.rs:138
    #33 0xb15824 in v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) (/usr/local/bin/node+0xb15824)
    #34 0xd9bd44 in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) (/usr/local/bin/node+0xd9bd44)
    #35 0xd9c24c in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) (/usr/local/bin/node+0xd9c24c)
    #36 0x166fee8 in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit (/usr/local/bin/node+0x166fee8)
    #37 0x15f7b10 in Builtins_JSBuiltinsConstructStub (/usr/local/bin/node+0x15f7b10)
    #38 0x1705fb4 in Builtins_ConstructHandler (/usr/local/bin/node+0x1705fb4)
    #39 0x15fa394 in Builtins_InterpreterEntryTrampoline (/usr/local/bin/node+0x15fa394)
    #40 0x162c4f0 in Builtins_AsyncFunctionAwaitResolveClosure (/usr/local/bin/node+0x162c4f0)
    #41 0x16bb794 in Builtins_PromiseFulfillReactionJob (/usr/local/bin/node+0x16bb794)
    #42 0x161e248 in Builtins_RunMicrotasks (/usr/local/bin/node+0x161e248)
    #43 0x15f85a0 in Builtins_JSRunMicrotasksEntry (/usr/local/bin/node+0x15f85a0)
    #44 0xe7b210 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) (/usr/local/bin/node+0xe7b210)
    #45 0xe7bb5c in v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [clone .constprop.85] (/usr/local/bin/node+0xe7bb5c)
    #46 0xe7c228 in v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) (/usr/local/bin/node+0xe7c228)
    #47 0xea7e44 in v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [clone .part.51] (/usr/local/bin/node+0xea7e44)
    #48 0xea8234 in v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) (/usr/local/bin/node+0xea8234)
    #49 0xd9b0cc in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) (/usr/local/bin/node+0xd9b0cc)
    #50 0xd9c1f4 in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) (/usr/local/bin/node+0xd9c1f4)
    #51 0x166fee8 in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit (/usr/local/bin/node+0x166fee8)
    #52 0x7f9ccdc760  (<unknown module>)
    #53 0x15f86cc in Builtins_JSEntryTrampoline (/usr/local/bin/node+0x15f86cc)
    #54 0x15f8360 in Builtins_JSEntry (/usr/local/bin/node+0x15f8360)
    #55 0xe7ad44 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) (/usr/local/bin/node+0xe7ad44)
    #56 0xe7bc74 in v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) (/usr/local/bin/node+0xe7bc74)
    #57 0xd52d0c in v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) (/usr/local/bin/node+0xd52d0c)
    #58 0xabad78 in node::InternalCallbackScope::Close() (/usr/local/bin/node+0xabad78)
    #59 0xabb0a4 in node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) (/usr/local/bin/node+0xabb0a4)
    #60 0xacb74c in node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) (/usr/local/bin/node+0xacb74c)
    #61 0xc32560 in node::(anonymous namespace)::ProcessWrap::OnExit(uv_process_s*, long, int) (/usr/local/bin/node+0xc32560)
    #62 0x15e2760 in uv__wait_children ../deps/uv/src/unix/process.c:156
    #63 0x15e3ef0 in uv__signal_event ../deps/uv/src/unix/signal.c:461
    #64 0x15eb8d8 in uv__io_poll ../deps/uv/src/unix/epoll.c:388
    #65 0x15da080 in uv_run ../deps/uv/src/unix/core.c:406
    #66 0xabba44 in node::SpinEventLoop(node::Environment*) (/usr/local/bin/node+0xabba44)
    #67 0xba99e4 in node::NodeMainInstance::Run() (/usr/local/bin/node+0xba99e4)
    #68 0xb29b48 in node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) (/usr/local/bin/node+0xb29b48)
    #69 0xb2d2b0 in node::Start(int, char**) (/usr/local/bin/node+0xb2d2b0)
    #70 0x7fae63777c  (/lib/aarch64-linux-gnu/libc.so.6+0x2777c)
    #71 0x7fae637854 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x27854)
    #72 0xab9f74  (/usr/local/bin/node+0xab9f74)

Thread T12 created by T0 here:
    #0 0x7faeb6a234 in __interceptor_pthread_create ../../../../src/libsanitizer/asan/asan_interceptors.cpp:207
    #1 0x7e85b60170 in std::sys::unix::thread::Thread::new::h7b6b195a22438c26 src/sys/unix/thread.rs:87
    #2 0x7e85c59e84 in std::thread::Builder::spawn_unchecked_::h064b944aaad881f8 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:563
    #3 0x7e85c69bf4 in std::thread::Builder::spawn_unchecked::h716c7a78227ab81d /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:457
    #4 0x7e85c69bf4 in std::thread::Builder::spawn::h031e76ee6e13e9ad /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:389
    #5 0x7e85c69bf4 in tokio::runtime::blocking::pool::Spawner::spawn_thread::hbe50e88614973ccb src/runtime/blocking/pool.rs:466
    #6 0x7e85c69bf4 in tokio::runtime::blocking::pool::Spawner::spawn_task::h32b533721c8cbafa src/runtime/blocking/pool.rs:416
    #7 0x7e85c80924 in tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::h6774c65da129e6c5 src/runtime/blocking/pool.rs:384
    #8 0x7e85c80538 in tokio::runtime::blocking::pool::Spawner::spawn_blocking::h67bab4f2c1c101d9 src/runtime/blocking/pool.rs:301
    #9 0x7e85c802e4 in tokio::runtime::handle::Handle::spawn_blocking::h2a8ee987dc7f67d3 src/runtime/handle.rs:180
    #10 0x7e85c802e4 in tokio::runtime::blocking::pool::spawn_blocking::hf89a265ffdc0097c src/runtime/blocking/pool.rs:183
    #11 0x7e85c85704 in tokio::runtime::scheduler::multi_thread::worker::Launch::launch::hf0c282ed4b02452e src/runtime/scheduler/multi_thread/worker.rs:365
    #12 0x7e85c85704 in tokio::runtime::builder::Builder::build_threaded_runtime::h5fe864477c76fb8a src/runtime/builder.rs:1060
    #13 0x7e85c85704 in tokio::runtime::builder::Builder::build::h5a3026c5e976483e src/runtime/builder.rs:642
    #14 0x7e85c8b09c in tokio::runtime::runtime::Runtime::new::hceb222bd7e9a3db6 src/runtime/runtime.rs:132
    #15 0x7e8492cdc0 in napi::tokio_runtime::create_runtime::h4301b5f1f73d78a4 src/tokio_runtime.rs:11
    #16 0x7e8492cdc0 in napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h09601398bb35ccdc src/tokio_runtime.rs:24
    #17 0x7e8492cdc0 in core::ops::function::FnOnce::call_once::h0b7b67596a3fa3fa /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
    #18 0x7e83693b4c in core::ops::function::FnOnce::call_once::h44970dd661893fee /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250
    #19 0x7e83693b4c in once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::h4b7e5fdad11a7f3e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1275
    #20 0x7e83693b4c in once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hadb3508775e3b66e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1085
    #21 0x7e83693b4c in once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hee3505d3bad7b19e /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/imp_std.rs:82
    #22 0x7e849a5b10 in core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::hff802b12bd032ed1 /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:294
    #23 0x7e849a5b10 in once_cell::imp::initialize_or_wait::hb24ccc233369111e src/imp_std.rs:206
    #24 0x7e8340003c in once_cell::imp::OnceCell$LT$T$GT$::initialize::he4488d9d0c98e857 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/imp_std.rs:78
    #25 0x7e836a57b8 in once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h3908b540eac7491c /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1126
    #26 0x7e836a57b8 in once_cell::sync::OnceCell$LT$T$GT$::get_or_init::he2ae16d6275bf896 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1085
    #27 0x7e836a57b8 in once_cell::sync::Lazy$LT$T$C$F$GT$::force::h917dd1fa2aaad3ec /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1274
    #28 0x7e836a57b8 in _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h1161c151f6bbd4f3 /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/once_cell-1.17.0/src/lib.rs:1335
    #29 0x7e836a57b8 in napi::tokio_runtime::within_runtime_if_available::h2a18ee72606824bb /root/.cargo/registry/src/index.crates.io-6f17d22bba15001f/napi-2.12.4/src/tokio_runtime.rs:82
    #30 0x7e836a57b8 in query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4bc8bed5dff0a019 query-engine/query-engine-node-api/src/engine.rs:138
    #31 0x7e836a57b8 in core::result::Result$LT$T$C$E$GT$::and_then::he0d6c5fd7311c3af /root/.rustup/toolchains/nightly-2023-06-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1319
    #32 0x7e836a57b8 in query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h5c64a1024156dabc query-engine/query-engine-node-api/src/engine.rs:138
    #33 0xb15824 in v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) (/usr/local/bin/node+0xb15824)
    #34 0xd9bd44 in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<true>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) (/usr/local/bin/node+0xd9bd44)
    #35 0xd9c24c in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) (/usr/local/bin/node+0xd9c24c)
    #36 0x166fee8 in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit (/usr/local/bin/node+0x166fee8)
    #37 0x15f7b10 in Builtins_JSBuiltinsConstructStub (/usr/local/bin/node+0x15f7b10)
    #38 0x1705fb4 in Builtins_ConstructHandler (/usr/local/bin/node+0x1705fb4)
    #39 0x15fa394 in Builtins_InterpreterEntryTrampoline (/usr/local/bin/node+0x15fa394)
    #40 0x162c4f0 in Builtins_AsyncFunctionAwaitResolveClosure (/usr/local/bin/node+0x162c4f0)
    #41 0x16bb794 in Builtins_PromiseFulfillReactionJob (/usr/local/bin/node+0x16bb794)
    #42 0x161e248 in Builtins_RunMicrotasks (/usr/local/bin/node+0x161e248)
    #43 0x15f85a0 in Builtins_JSRunMicrotasksEntry (/usr/local/bin/node+0x15f85a0)
    #44 0xe7b210 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) (/usr/local/bin/node+0xe7b210)
    #45 0xe7bb5c in v8::internal::(anonymous namespace)::InvokeWithTryCatch(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) [clone .constprop.85] (/usr/local/bin/node+0xe7bb5c)
    #46 0xe7c228 in v8::internal::Execution::TryRunMicrotasks(v8::internal::Isolate*, v8::internal::MicrotaskQueue*, v8::internal::MaybeHandle<v8::internal::Object>*) (/usr/local/bin/node+0xe7c228)
    #47 0xea7e44 in v8::internal::MicrotaskQueue::RunMicrotasks(v8::internal::Isolate*) [clone .part.51] (/usr/local/bin/node+0xea7e44)
    #48 0xea8234 in v8::internal::MicrotaskQueue::PerformCheckpoint(v8::Isolate*) (/usr/local/bin/node+0xea8234)
    #49 0xd9b0cc in v8::internal::MaybeHandle<v8::internal::Object> v8::internal::(anonymous namespace)::HandleApiCallHelper<false>(v8::internal::Isolate*, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::HeapObject>, v8::internal::Handle<v8::internal::FunctionTemplateInfo>, v8::internal::Handle<v8::internal::Object>, v8::internal::BuiltinArguments) (/usr/local/bin/node+0xd9b0cc)
    #50 0xd9c1f4 in v8::internal::Builtin_HandleApiCall(int, unsigned long*, v8::internal::Isolate*) (/usr/local/bin/node+0xd9c1f4)
    #51 0x166fee8 in Builtins_CEntry_Return1_DontSaveFPRegs_ArgvOnStack_BuiltinExit (/usr/local/bin/node+0x166fee8)
    #52 0x7f9ccdc760  (<unknown module>)
    #53 0x15f86cc in Builtins_JSEntryTrampoline (/usr/local/bin/node+0x15f86cc)
    #54 0x15f8360 in Builtins_JSEntry (/usr/local/bin/node+0x15f8360)
    #55 0xe7ad44 in v8::internal::(anonymous namespace)::Invoke(v8::internal::Isolate*, v8::internal::(anonymous namespace)::InvokeParams const&) (/usr/local/bin/node+0xe7ad44)
    #56 0xe7bc74 in v8::internal::Execution::Call(v8::internal::Isolate*, v8::internal::Handle<v8::internal::Object>, v8::internal::Handle<v8::internal::Object>, int, v8::internal::Handle<v8::internal::Object>*) (/usr/local/bin/node+0xe7bc74)
    #57 0xd52d0c in v8::Function::Call(v8::Local<v8::Context>, v8::Local<v8::Value>, int, v8::Local<v8::Value>*) (/usr/local/bin/node+0xd52d0c)
    #58 0xabad78 in node::InternalCallbackScope::Close() (/usr/local/bin/node+0xabad78)
    #59 0xabb0a4 in node::InternalMakeCallback(node::Environment*, v8::Local<v8::Object>, v8::Local<v8::Object>, v8::Local<v8::Function>, int, v8::Local<v8::Value>*, node::async_context) (/usr/local/bin/node+0xabb0a4)
    #60 0xacb74c in node::AsyncWrap::MakeCallback(v8::Local<v8::Function>, int, v8::Local<v8::Value>*) (/usr/local/bin/node+0xacb74c)
    #61 0xc32560 in node::(anonymous namespace)::ProcessWrap::OnExit(uv_process_s*, long, int) (/usr/local/bin/node+0xc32560)
    #62 0x15e2760 in uv__wait_children ../deps/uv/src/unix/process.c:156
    #63 0x15e3ef0 in uv__signal_event ../deps/uv/src/unix/signal.c:461
    #64 0x15eb8d8 in uv__io_poll ../deps/uv/src/unix/epoll.c:388
    #65 0x15da080 in uv_run ../deps/uv/src/unix/core.c:406
    #66 0xabba44 in node::SpinEventLoop(node::Environment*) (/usr/local/bin/node+0xabba44)
    #67 0xba99e4 in node::NodeMainInstance::Run() (/usr/local/bin/node+0xba99e4)
    #68 0xb29b48 in node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) (/usr/local/bin/node+0xb29b48)
    #69 0xb2d2b0 in node::Start(int, char**) (/usr/local/bin/node+0xb2d2b0)
    #70 0x7fae63777c  (/lib/aarch64-linux-gnu/libc.so.6+0x2777c)
    #71 0x7fae637854 in __libc_start_main (/lib/aarch64-linux-gnu/libc.so.6+0x27854)
    #72 0xab9f74  (/usr/local/bin/node+0xab9f74)

SUMMARY: AddressSanitizer: double-free ../../../../src/libsanitizer/asan/asan_malloc_linux.cpp:52 in __interceptor_free
==300==ABORTING

prisma -v:

prisma                  : 4.16.0
@prisma/client          : ^4.15.0
Current platform        : linux-arm64-openssl-3.0.x
Query Engine (Node-API) : libquery-engine 4bc8b6e1b66cb932731fb1bdbbc550d1e010de81 (at ../custom-prisma-engines/libquery_engine.so.node, resolved by PRISMA_QUERY_ENGINE_LIBRARY)
Migration Engine        : migration-engine-cli b20ead4d3ab9e78ac112966e242ded703f4a052c (at node_modules/@prisma/engines/migration-engine-linux-arm64-openssl-3.0.x)
Format Wasm             : @prisma/prisma-fmt-wasm 4.16.0-66.b20ead4d3ab9e78ac112966e242ded703f4a052c
Default Engines Hash    : b20ead4d3ab9e78ac112966e242ded703f4a052c
Studio                  : 0.484.0

I was finally able to reproduce the issue (I got an abort rather than a segfault but it’s likely caused by the same problem, given the free(): unaligned chunk detected in tcache 2 message that I got), so I should be able to continue the investigation further now.

I ran into this and after a bunch of debugging, can only replicate using Node 18. Downgrading to 16, or upgrading to 19 (can’t test 20 right now for other reasons), causes the issue not to happen anymore.

Hey everyone! Could you test and confirm if updating prisma and @prisma/client to version 5.3.0-24.integration-arm-openssl-main-92c9273a161ecfa87c1e2b27abd570c922b184a6 fixes the issues for you?

Important: install it as an exact dependency, i.e., you must not have a caret (^) in your package.json before the package version. If you update it from CLI rather than editing the package.json manually, use the -E flag:

npm i -D -E prisma@5.3.0-24.integration-arm-openssl-main-92c9273a161ecfa87c1e2b27abd570c922b184a6
npm i -E @prisma@client@5.3.0-24.integration-arm-openssl-main-92c9273a161ecfa87c1e2b27abd570c922b184a6

FWIW, this is branched off main and not 5.2.0 as I suggested above — doing the latter as an integration release turned out to be a bit messy.

@aqrln

apple m1/node:18 - wooooork

So far I have not yet seen a reliable workaround that works with a current version of Node (v20) and an up-to-date (= without known vulnerabilities) version of OpenSSL. Therefore I would kindly ask whether someone at Prisma (perhaps @aqrln) is currently working on this bug? I also remember that @cxcorp did a great job pinpointing the crashes and identifying dependencies upstream to be a possible root cause for this – has there been any progress on this investigation in the meantime?

I compiled the library with ThreadSanitizer this time. From what I’ve understood, ThreadSanitizer may produce more false-positives, especially as you cannot compile openssl statically and include -fsanitize=thread, but the prisma-query-engine-napi library at least should be instrumented in this stack trace.

Just before the crash, ThreadSanitizer spits out reports about 12 data races of two tokio task executor threads trying to use openssl::ssl::connector::SslConnector::builder() at the same time, followed by a double free and a segfault after yet another data race. This would correspond with what AddressSanitizer reported. Maybe X509_STORE_set_default_paths_ex or the other openssl initialization functions are not thread safe? Or maybe it’s linking to the wrong openssl lock callbacks, if provided? Or could just be a false positive.

Here is a sample of what it reported (a lot of info), please find the rest of the traces in chronological order before crash here: https://gist.github.com/cxcorp/7515158f2b8bb764bd8bc80ccfdd98d3

==================
WARNING: ThreadSanitizer: data race (pid=531)
  Write of size 1 at 0x007ff1313114 by thread T14:
    #0 memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 (libtsan.so+0x62abc)
    #1 memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:819 (libtsan.so+0x62abc)
    #2 ossl_cipher_generic_initiv at /build/openssl-3.0.8/providers/implementations/ciphers/ciphercommon.c:655:5 (libquery_engine.so.node+0xf88868)
    #3 openssl::ssl::connector::ctx::h26b643340a824e83 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:28:19 (libquery_engine.so.node+0x6695f0)
     (inlined by) openssl::ssl::connector::SslConnector::builder::hafade6d3b15bdc78 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:74:23
     (inlined by) native_tls::imp::TlsConnector::new::hdb7f289bc7d30946 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/openssl.rs:280:29
     (inlined by) native_tls::TlsConnectorBuilder::build::h75b6e87a5e146df0 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/lib.rs:446:25
    #4 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #5 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #6 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #7 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h895f460eccbe61c4 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xaef7f4)
     (inlined by) mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::hd19543d1a933f3b2 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:541:39
     (inlined by) mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h8d3fe06a13f1ff0c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:529:50
     (inlined by) mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h922f8657d0535ea8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:448:46
    #8 mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::h534afac8d8c86bb8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:434:40 (libquery_engine.so.node+0xae972c)
    #9 _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h450ec10fa6614307 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/fuse.rs:86:37 (libquery_engine.so.node+0xae9544)
    #10 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha0c2cb1a00972d7c at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xb2d0b4)
     (inlined by) futures_util::future::future::FutureExt::poll_unpin::h59d3de23abac0ab3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/mod.rs:562:9
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h190a2783b924fa10 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h8d006bad7f3d7bd1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0xb2ce70)
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hba1d4e4627fe10a9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
     (inlined by) _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h527d03269d0bd718 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/poll_fn.rs:56:9
    #12 mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h71104d8f216b4760 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/time.rs:11:5 (libquery_engine.so.node+0xb702b8)
     (inlined by) mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hc8743c63d3dfe7ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:426:63
    #13 quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h8c8b84c6d15b4226 at /prisma-engines/quaint/src/connector/metrics.rs:66:16 (libquery_engine.so.node+0xb6e3a0)
     (inlined by) quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h1391ba58aede19d3 at /prisma-engines/quaint/src/pooled.rs:481:101
    #14 _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb8977bf2b7529b10 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71:45 (libquery_engine.so.node+0xb72298)
     (inlined by) sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h5a9fdaa671a0f10f at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/mod.rs:47:14
     (inlined by) _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcded7da1cb965b25 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75:9
    #15 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7f568c670197c4a6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0x1efad4)
     (inlined by) _$LT$tracing_futures..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4ef5b9c40bdbe20d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-futures-0.2.5/src/lib.rs:283:9
    #16 query_core::executor::execute_operation::execute_single_self_contained::_$u7b$$u7b$closure$u7d$$u7d$::hbeed4fdc32b2bc5f at /prisma-engines/query-engine/core/src/executor/execute_operation.rs:76:64 (libquery_engine.so.node+0x197a18)
    ...
    #43 __rust_try.10584 at query_engine.7996f994-cgu.0:0:0 (libquery_engine.so.node+0xc57c4c)
    #44 std::panicking::try::h4a53fdf008eead00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:451:19 (libquery_engine.so.node+0xbe74fc)
    #45 std::panic::catch_unwind::he461b82453b28de1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:140:14 (libquery_engine.so.node+0xbe7cac)
     (inlined by) std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h10420d3f05d88e10 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
     (inlined by) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h55d6b921f4a96028 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #46 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h04b5432a19a802fd at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xb99864)
    #47 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3a4bcd6ac3a1558b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xbbaab0)
     (inlined by) std::sys::unix::thread::Thread::new::thread_start::ha4a81db5a681fa15 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
    #48 __tsan_thread_start_func ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:991 (libtsan.so+0x3c510)

  Previous write of size 1 at 0x007ff1313114 by thread T12:
    #0 memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:827 (libtsan.so+0x62abc)
    #1 memcpy ../../../../src/libsanitizer/sanitizer_common/sanitizer_common_interceptors.inc:819 (libtsan.so+0x62abc)
    #2 ossl_cipher_generic_initiv at /build/openssl-3.0.8/providers/implementations/ciphers/ciphercommon.c:655:5 (libquery_engine.so.node+0xf88868)
    #3 openssl::ssl::connector::ctx::h26b643340a824e83 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:28:19 (libquery_engine.so.node+0x6695f0)
     (inlined by) openssl::ssl::connector::SslConnector::builder::hafade6d3b15bdc78 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:74:23
     (inlined by) native_tls::imp::TlsConnector::new::hdb7f289bc7d30946 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/openssl.rs:280:29
     (inlined by) native_tls::TlsConnectorBuilder::build::h75b6e87a5e146df0 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/lib.rs:446:25
    #4 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #5 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #6 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #7 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h895f460eccbe61c4 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xaef7f4)
     (inlined by) mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::hd19543d1a933f3b2 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:541:39
     (inlined by) mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h8d3fe06a13f1ff0c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:529:50
     (inlined by) mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h922f8657d0535ea8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:448:46
    #8 mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::h534afac8d8c86bb8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:434:40 (libquery_engine.so.node+0xae972c)
    #9 _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h450ec10fa6614307 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/fuse.rs:86:37 (libquery_engine.so.node+0xae9544)
    #10 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha0c2cb1a00972d7c at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xb2d0b4)
     (inlined by) futures_util::future::future::FutureExt::poll_unpin::h59d3de23abac0ab3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/mod.rs:562:9
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h190a2783b924fa10 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h8d006bad7f3d7bd1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0xb2ce70)
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hba1d4e4627fe10a9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
     (inlined by) _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h527d03269d0bd718 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/poll_fn.rs:56:9
    #12 mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h71104d8f216b4760 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/time.rs:11:5 (libquery_engine.so.node+0xb702b8)
     (inlined by) mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hc8743c63d3dfe7ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:426:63
    #13 quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h8c8b84c6d15b4226 at /prisma-engines/quaint/src/connector/metrics.rs:66:16 (libquery_engine.so.node+0xb6e3a0)
     (inlined by) quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h1391ba58aede19d3 at /prisma-engines/quaint/src/pooled.rs:481:101
    #14 _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb8977bf2b7529b10 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71:45 (libquery_engine.so.node+0xb72298)
     (inlined by) sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h5a9fdaa671a0f10f at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/mod.rs:47:14
     (inlined by) _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcded7da1cb965b25 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75:9
    #15 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7f568c670197c4a6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0x1efad4)
     (inlined by) _$LT$tracing_futures..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4ef5b9c40bdbe20d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-futures-0.2.5/src/lib.rs:283:9
    #16 query_core::executor::execute_operation::execute_single_self_contained::_$u7b$$u7b$closure$u7d$$u7d$::hbeed4fdc32b2bc5f at /prisma-engines/query-engine/core/src/executor/execute_operation.rs:76:64 (libquery_engine.so.node+0x197a18)
    ...
    #41 tokio::runtime::blocking::pool::Task::run::he55d66a7fb465067 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:159:9 (libquery_engine.so.node+0xbde580)
     (inlined by) tokio::runtime::blocking::pool::Inner::run::h0d5a4464f007e679 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:511:17
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::_$u7b$$u7b$closure$u7d$$u7d$::hd6c0918e9cf857d9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:469:13
     (inlined by) std::sys_common::backtrace::__rust_begin_short_backtrace::h2cf67cb06c7f3fdf at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:121:18
    #42 std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h6356100a21547803 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:560:17 (libquery_engine.so.node+0xbe756c)
     (inlined by) _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h189386dd089ae72b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271:9
     (inlined by) std::panicking::try::do_call::h63cc2b352b436e73 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:487:40
    #43 __rust_try.10584 at query_engine.7996f994-cgu.0:0:0 (libquery_engine.so.node+0xc57c4c)
    #44 std::panicking::try::h4a53fdf008eead00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:451:19 (libquery_engine.so.node+0xbe74fc)
    #45 std::panic::catch_unwind::he461b82453b28de1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:140:14 (libquery_engine.so.node+0xbe7cac)
     (inlined by) std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h10420d3f05d88e10 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
     (inlined by) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h55d6b921f4a96028 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #46 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h04b5432a19a802fd at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xb99864)
    #47 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3a4bcd6ac3a1558b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xbbaab0)
     (inlined by) std::sys::unix::thread::Thread::new::thread_start::ha4a81db5a681fa15 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
    #48 __tsan_thread_start_func ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:991 (libtsan.so+0x3c510)

  Location is heap block of size 448 at 0x007ff1313080 allocated by thread T14:
    #0 malloc ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:647 (libtsan.so+0x42b6c)
    #1 CRYPTO_malloc at /build/openssl-3.0.8/crypto/mem.c:190:12 (libquery_engine.so.node+0xea5770)
    #2 openssl::ssl::connector::ctx::h26b643340a824e83 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:28:19 (libquery_engine.so.node+0x6695f0)
     (inlined by) openssl::ssl::connector::SslConnector::builder::hafade6d3b15bdc78 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:74:23
     (inlined by) native_tls::imp::TlsConnector::new::hdb7f289bc7d30946 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/openssl.rs:280:29
     (inlined by) native_tls::TlsConnectorBuilder::build::h75b6e87a5e146df0 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/lib.rs:446:25
    #3 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #4 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #5 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #6 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h895f460eccbe61c4 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xaef7f4)
     (inlined by) mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::hd19543d1a933f3b2 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:541:39
     (inlined by) mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h8d3fe06a13f1ff0c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:529:50
     (inlined by) mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h922f8657d0535ea8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:448:46
    #7 mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::h534afac8d8c86bb8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:434:40 (libquery_engine.so.node+0xae972c)
    #8 _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h450ec10fa6614307 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/fuse.rs:86:37 (libquery_engine.so.node+0xae9544)
    #9 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha0c2cb1a00972d7c at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xb2d0b4)
     (inlined by) futures_util::future::future::FutureExt::poll_unpin::h59d3de23abac0ab3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/mod.rs:562:9
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h190a2783b924fa10 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
    #10 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h8d006bad7f3d7bd1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0xb2ce70)
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hba1d4e4627fe10a9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
     (inlined by) _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h527d03269d0bd718 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/poll_fn.rs:56:9
    #11 mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h71104d8f216b4760 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/time.rs:11:5 (libquery_engine.so.node+0xb702b8)
     (inlined by) mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hc8743c63d3dfe7ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:426:63
    #12 quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h8c8b84c6d15b4226 at /prisma-engines/quaint/src/connector/metrics.rs:66:16 (libquery_engine.so.node+0xb6e3a0)
     (inlined by) quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h1391ba58aede19d3 at /prisma-engines/quaint/src/pooled.rs:481:101
    #13 _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb8977bf2b7529b10 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71:45 (libquery_engine.so.node+0xb72298)
     (inlined by) sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h5a9fdaa671a0f10f at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/mod.rs:47:14
     (inlined by) _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcded7da1cb965b25 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75:9
    #14 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7f568c670197c4a6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0x1efad4)
     (inlined by) _$LT$tracing_futures..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4ef5b9c40bdbe20d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-futures-0.2.5/src/lib.rs:283:9
    #15 query_engine::engine::QueryEngine::connect::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::he4f2f42baf7bc1ed at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:280:69 (libquery_engine.so.node+0x1f619c)
     (inlined by) _$LT$tokio..future..maybe_done..MaybeDone$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4b7a27d9115b912d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/future/maybe_done.rs:68:48
     (inlined by) query_engine::engine::QueryEngine::connect::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha14d8c7e1e859bd1 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/macros/join.rs:126:24
     (inlined by) _$LT$tokio..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::hbea1725b7ab2466f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/future/poll_fn.rs:58:9
     (inlined by) query_engine::engine::QueryEngine::connect::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha2206701144d402f at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:293:48
     (inlined by) _$LT$tracing..instrument..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h62c3c71b8cd339c7 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-0.1.36/src/instrument.rs:272:9
     (inlined by) query_engine::engine::QueryEngine::connect::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::ha13747d49b1e0f3d at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:306:13
    ...
    #37 __rust_try.10584 at query_engine.7996f994-cgu.0:0:0 (libquery_engine.so.node+0xc57c4c)
    #38 std::panicking::try::h4a53fdf008eead00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:451:19 (libquery_engine.so.node+0xbe74fc)
    #39 std::panic::catch_unwind::he461b82453b28de1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:140:14 (libquery_engine.so.node+0xbe7cac)
     (inlined by) std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h10420d3f05d88e10 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
     (inlined by) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h55d6b921f4a96028 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #40 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h04b5432a19a802fd at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xb99864)
    #41 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3a4bcd6ac3a1558b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xbbaab0)
     (inlined by) std::sys::unix::thread::Thread::new::thread_start::ha4a81db5a681fa15 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
    #42 __tsan_thread_start_func ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:991 (libtsan.so+0x3c510)

  Thread T14 'tokio-runtime-w' (tid=548, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1001 (libtsan.so+0x632a8)
    #1 std::sys::unix::thread::Thread::new::hbf41949fb76ddc00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:87:19 (libquery_engine.so.node+0xbba83c)
    #2 std::thread::Builder::spawn_unchecked_::hf1288c382e821452 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:594:17 (libquery_engine.so.node+0xbec7f4)
     (inlined by) std::thread::Builder::spawn_unchecked::h3e5c50718fd964f6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:488:32
     (inlined by) std::thread::Builder::spawn::h07fd7990ae79339f at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:420:18
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::hd41594398dfa0b0f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:466:9
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_task::h15f51b87b3a33077 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:416:27
    #3 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #4 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #5 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #6 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #7 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #8 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #9 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #10 core::ops::function::FnOnce::call_once::hcdcd49af01481cf3 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5 (libquery_engine.so.node+0x1f0e20)
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::hfcb10f9a1a796f17 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1275:28
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hff4cdb0d9556eca1 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:57
     (inlined by) once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hb37e8e57468afc4d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:82:23
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h542986d46413c8ef at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0x677284)
     (inlined by) once_cell::imp::initialize_or_wait::h702fcc40af4d1f96 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:206:20
    #12 once_cell::imp::OnceCell$LT$T$GT$::initialize::ha94fbd40ec8c2172 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:78:9 (libquery_engine.so.node+0x1211a0)
    #13 once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h07bffd592dcedca3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1126:13 (libquery_engine.so.node+0x1fcd5c)
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::h77277fc1c2e1d519 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:19
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::h1807bf17f39e7781 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1274:13
     (inlined by) _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h101c4d4aa9dda332 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1335:13
     (inlined by) napi::tokio_runtime::within_runtime_if_available::h4f995327397f17ec at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:82:19
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4dd6f2dc9d3ad84e at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
     (inlined by) core::result::Result$LT$T$C$E$GT$::and_then::h2a11a553da21ba24 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1341:22
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h6129db2ceee5d556 at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
    #14 v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) <null> (node+0xb15824)

  Thread T12 'tokio-runtime-w' (tid=546, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1001 (libtsan.so+0x632a8)
    #1 std::sys::unix::thread::Thread::new::hbf41949fb76ddc00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:87:19 (libquery_engine.so.node+0xbba83c)
    #2 std::thread::Builder::spawn_unchecked_::hf1288c382e821452 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:594:17 (libquery_engine.so.node+0xbec7f4)
     (inlined by) std::thread::Builder::spawn_unchecked::h3e5c50718fd964f6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:488:32
     (inlined by) std::thread::Builder::spawn::h07fd7990ae79339f at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:420:18
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::hd41594398dfa0b0f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:466:9
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_task::h15f51b87b3a33077 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:416:27
    #3 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #4 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #5 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #6 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #7 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #8 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #9 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #10 core::ops::function::FnOnce::call_once::hcdcd49af01481cf3 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5 (libquery_engine.so.node+0x1f0e20)
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::hfcb10f9a1a796f17 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1275:28
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hff4cdb0d9556eca1 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:57
     (inlined by) once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hb37e8e57468afc4d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:82:23
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h542986d46413c8ef at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0x677284)
     (inlined by) once_cell::imp::initialize_or_wait::h702fcc40af4d1f96 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:206:20
    #12 once_cell::imp::OnceCell$LT$T$GT$::initialize::ha94fbd40ec8c2172 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:78:9 (libquery_engine.so.node+0x1211a0)
    #13 once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h07bffd592dcedca3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1126:13 (libquery_engine.so.node+0x1fcd5c)
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::h77277fc1c2e1d519 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:19
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::h1807bf17f39e7781 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1274:13
     (inlined by) _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h101c4d4aa9dda332 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1335:13
     (inlined by) napi::tokio_runtime::within_runtime_if_available::h4f995327397f17ec at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:82:19
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4dd6f2dc9d3ad84e at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
     (inlined by) core::result::Result$LT$T$C$E$GT$::and_then::h2a11a553da21ba24 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1341:22
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h6129db2ceee5d556 at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
    #14 v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) <null> (node+0xb15824)

SUMMARY: ThreadSanitizer: data race (/custom-prisma-engines/libquery_engine.so.node+0xf88868) 
==================

WARNING: ThreadSanitizer: heap-use-after-free (pid=531)
  Write of size 8 at 0x007ff327a288 by thread T14:
    #0 free ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:706 (libtsan.so+0x4bc3c)
    #1 CRYPTO_free at /build/openssl-3.0.8/crypto/mem.c:258:5 (libquery_engine.so.node+0xea59c4)
    #2 openssl::ssl::connector::SslConnector::builder::hafade6d3b15bdc78 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:75:9 (libquery_engine.so.node+0x6696c8)
     (inlined by) native_tls::imp::TlsConnector::new::hdb7f289bc7d30946 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/openssl.rs:280:29
     (inlined by) native_tls::TlsConnectorBuilder::build::h75b6e87a5e146df0 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/lib.rs:446:25
    #3 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #4 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #5 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h895f460eccbe61c4 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xaef7f4)
     (inlined by) mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::hd19543d1a933f3b2 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:541:39
     (inlined by) mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h8d3fe06a13f1ff0c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:529:50
     (inlined by) mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h922f8657d0535ea8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:448:46
    #6 mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::h534afac8d8c86bb8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:434:40 (libquery_engine.so.node+0xae972c)
    #7 _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h450ec10fa6614307 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/fuse.rs:86:37 (libquery_engine.so.node+0xae9544)
    #8 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha0c2cb1a00972d7c at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xb2d0b4)
     (inlined by) futures_util::future::future::FutureExt::poll_unpin::h59d3de23abac0ab3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/mod.rs:562:9
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h190a2783b924fa10 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
    #9 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h8d006bad7f3d7bd1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0xb2ce70)
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hba1d4e4627fe10a9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
     (inlined by) _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h527d03269d0bd718 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/poll_fn.rs:56:9
    #10 mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h71104d8f216b4760 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/time.rs:11:5 (libquery_engine.so.node+0xb702b8)
     (inlined by) mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hc8743c63d3dfe7ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:426:63
    #11 quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h8c8b84c6d15b4226 at /prisma-engines/quaint/src/connector/metrics.rs:66:16 (libquery_engine.so.node+0xb6e3a0)
     (inlined by) quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h1391ba58aede19d3 at /prisma-engines/quaint/src/pooled.rs:481:101
    #12 _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb8977bf2b7529b10 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71:45 (libquery_engine.so.node+0xb72298)
     (inlined by) sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h5a9fdaa671a0f10f at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/mod.rs:47:14
     (inlined by) _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcded7da1cb965b25 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75:9
    #13 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7f568c670197c4a6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0x1efad4)
     (inlined by) _$LT$tracing_futures..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4ef5b9c40bdbe20d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-futures-0.2.5/src/lib.rs:283:9
    #14 query_core::executor::execute_operation::execute_single_self_contained::_$u7b$$u7b$closure$u7d$$u7d$::hbeed4fdc32b2bc5f at /prisma-engines/query-engine/core/src/executor/execute_operation.rs:76:64 (libquery_engine.so.node+0x197a18)
     (inlined by) _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h0c3c9cb58e797767 at /prisma-engines/query-engine/core/src/executor/interpreting_executor.rs:65:17
    #15 _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::hf043b8b9a77e8e4e at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:348:35 (libquery_engine.so.node+0x194990)
     (inlined by) tokio::task::task_local::LocalKey$LT$T$GT$::scope_inner::he2766ecbaf275749 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:233:19
     (inlined by) _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7122453103e2bb74 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:345:13
     (inlined by) query_core::executor::request_context::with_request_context::_$u7b$$u7b$closure$u7d$$u7d$::ha061573bdf5be9c0 at /prisma-engines/query-engine/core/src/executor/request_context.rs:64:40
     (inlined by) _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::h6da47dac43e14e17 at /prisma-engines/query-engine/core/src/executor/interpreting_executor.rs:67:13
    ...
    #39 tokio::runtime::blocking::pool::Task::run::he55d66a7fb465067 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:159:9 (libquery_engine.so.node+0xbde580)
     (inlined by) tokio::runtime::blocking::pool::Inner::run::h0d5a4464f007e679 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:511:17
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::_$u7b$$u7b$closure$u7d$$u7d$::hd6c0918e9cf857d9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:469:13
     (inlined by) std::sys_common::backtrace::__rust_begin_short_backtrace::h2cf67cb06c7f3fdf at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys_common/backtrace.rs:121:18
    #40 std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h6356100a21547803 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:560:17 (libquery_engine.so.node+0xbe756c)
     (inlined by) _$LT$core..panic..unwind_safe..AssertUnwindSafe$LT$F$GT$$u20$as$u20$core..ops..function..FnOnce$LT$$LP$$RP$$GT$$GT$::call_once::h189386dd089ae72b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/panic/unwind_safe.rs:271:9
     (inlined by) std::panicking::try::do_call::h63cc2b352b436e73 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:487:40
    #41 __rust_try.10584 at query_engine.7996f994-cgu.0:0:0 (libquery_engine.so.node+0xc57c4c)
    #42 std::panicking::try::h4a53fdf008eead00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:451:19 (libquery_engine.so.node+0xbe74fc)
    #43 std::panic::catch_unwind::he461b82453b28de1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:140:14 (libquery_engine.so.node+0xbe7cac)
     (inlined by) std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h10420d3f05d88e10 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
     (inlined by) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h55d6b921f4a96028 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #44 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h04b5432a19a802fd at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xb99864)
    #45 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3a4bcd6ac3a1558b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xbbaab0)
     (inlined by) std::sys::unix::thread::Thread::new::thread_start::ha4a81db5a681fa15 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
    #46 __tsan_thread_start_func ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:991 (libtsan.so+0x3c510)

  Previous write of size 8 at 0x007ff327a288 by thread T12:
    #0 free ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:706 (libtsan.so+0x4bc3c)
    #1 CRYPTO_free at /build/openssl-3.0.8/crypto/mem.c:258:5 (libquery_engine.so.node+0xea59c4)
    #2 openssl::ssl::connector::SslConnector::builder::hafade6d3b15bdc78 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/openssl-0.10.48/src/ssl/connector.rs:75:9 (libquery_engine.so.node+0x6696c8)
     (inlined by) native_tls::imp::TlsConnector::new::hdb7f289bc7d30946 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/imp/openssl.rs:280:29
     (inlined by) native_tls::TlsConnectorBuilder::build::h75b6e87a5e146df0 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/native-tls-0.2.10/src/lib.rs:446:25
    #3 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #4 quaint::connector::postgres::PostgreSql::new::_$u7b$$u7b$closure$u7d$$u7d$::hd6f407fba4ed8c41 at /prisma-engines/quaint/src/connector/postgres.rs:613:41 (libquery_engine.so.node+0x86dfac)
     (inlined by) _$LT$quaint..pooled..manager..QuaintManager$u20$as$u20$mobc..Manager$GT$::connect::_$u7b$$u7b$closure$u7d$$u7d$::h2898b4e64bcefa27 at /prisma-engines/quaint/src/pooled/manager.rs:118:57
    #5 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h895f460eccbe61c4 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xaef7f4)
     (inlined by) mobc::Pool$LT$M$GT$::open_new_connection::_$u7b$$u7b$closure$u7d$$u7d$::hd19543d1a933f3b2 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:541:39
     (inlined by) mobc::Pool$LT$M$GT$::get_or_create_conn::_$u7b$$u7b$closure$u7d$$u7d$::h8d3fe06a13f1ff0c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:529:50
     (inlined by) mobc::Pool$LT$M$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::h922f8657d0535ea8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:448:46
    #6 mobc::Pool$LT$M$GT$::inner_get_with_retries::_$u7b$$u7b$closure$u7d$$u7d$::h534afac8d8c86bb8 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:434:40 (libquery_engine.so.node+0xae972c)
    #7 _$LT$futures_util..future..future..fuse..Fuse$LT$Fut$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h450ec10fa6614307 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/fuse.rs:86:37 (libquery_engine.so.node+0xae9544)
    #8 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::ha0c2cb1a00972d7c at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0xb2d0b4)
     (inlined by) futures_util::future::future::FutureExt::poll_unpin::h59d3de23abac0ab3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/future/mod.rs:562:9
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h190a2783b924fa10 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
    #9 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h8d006bad7f3d7bd1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0xb2ce70)
     (inlined by) mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hba1d4e4627fe10a9 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/async_await/select_mod.rs:321:13
     (inlined by) _$LT$futures_util..future..poll_fn..PollFn$LT$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h527d03269d0bd718 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-util-0.3.24/src/future/poll_fn.rs:56:9
    #10 mobc::time::timeout::_$u7b$$u7b$closure$u7d$$u7d$::h71104d8f216b4760 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/time.rs:11:5 (libquery_engine.so.node+0xb702b8)
     (inlined by) mobc::Pool$LT$M$GT$::get_timeout::_$u7b$$u7b$closure$u7d$$u7d$::hc8743c63d3dfe7ae at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/mobc-0.8.1/src/lib.rs:426:63
    #11 quaint::connector::metrics::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h8c8b84c6d15b4226 at /prisma-engines/quaint/src/connector/metrics.rs:66:16 (libquery_engine.so.node+0xb6e3a0)
     (inlined by) quaint::pooled::Quaint::check_out::_$u7b$$u7b$closure$u7d$$u7d$::h1391ba58aede19d3 at /prisma-engines/quaint/src/pooled.rs:481:101
    #12 _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::hb8977bf2b7529b10 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:71:45 (libquery_engine.so.node+0xb72298)
     (inlined by) sql_query_connector::database::catch::_$u7b$$u7b$closure$u7d$$u7d$::h5a9fdaa671a0f10f at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/mod.rs:47:14
     (inlined by) _$LT$sql_query_connector..database..postgresql..PostgreSql$u20$as$u20$query_connector..interface..Connector$GT$::get_connection::_$u7b$$u7b$closure$u7d$$u7d$::hcded7da1cb965b25 at /prisma-engines/query-engine/connectors/sql-query-connector/src/database/postgresql.rs:75:9
    #13 _$LT$core..pin..Pin$LT$P$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7f568c670197c4a6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/future/future.rs:125:9 (libquery_engine.so.node+0x1efad4)
     (inlined by) _$LT$tracing_futures..Instrumented$LT$T$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h4ef5b9c40bdbe20d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tracing-futures-0.2.5/src/lib.rs:283:9
    #14 query_core::executor::execute_operation::execute_single_self_contained::_$u7b$$u7b$closure$u7d$$u7d$::hbeed4fdc32b2bc5f at /prisma-engines/query-engine/core/src/executor/execute_operation.rs:76:64 (libquery_engine.so.node+0x197a18)
     (inlined by) _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::_$u7b$$u7b$closure$u7d$$u7d$::h0c3c9cb58e797767 at /prisma-engines/query-engine/core/src/executor/interpreting_executor.rs:65:17
    #15 _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::_$u7b$$u7b$closure$u7d$$u7d$::hf043b8b9a77e8e4e at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:348:35 (libquery_engine.so.node+0x194990)
     (inlined by) tokio::task::task_local::LocalKey$LT$T$GT$::scope_inner::he2766ecbaf275749 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:233:19
     (inlined by) _$LT$tokio..task..task_local..TaskLocalFuture$LT$T$C$F$GT$$u20$as$u20$core..future..future..Future$GT$::poll::h7122453103e2bb74 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/task/task_local.rs:345:13
     (inlined by) query_core::executor::request_context::with_request_context::_$u7b$$u7b$closure$u7d$$u7d$::ha061573bdf5be9c0 at /prisma-engines/query-engine/core/src/executor/request_context.rs:64:40
     (inlined by) _$LT$query_core..executor..interpreting_executor..InterpretingExecutor$LT$C$GT$$u20$as$u20$query_core..executor..QueryExecutor$GT$::execute::_$u7b$$u7b$closure$u7d$$u7d$::h6da47dac43e14e17 at /prisma-engines/query-engine/core/src/executor/interpreting_executor.rs:67:13
    ...
    #41 __rust_try.10584 at query_engine.7996f994-cgu.0:0:0 (libquery_engine.so.node+0xc57c4c)
    #42 std::panicking::try::h4a53fdf008eead00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panicking.rs:451:19 (libquery_engine.so.node+0xbe74fc)
    #43 std::panic::catch_unwind::he461b82453b28de1 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/panic.rs:140:14 (libquery_engine.so.node+0xbe7cac)
     (inlined by) std::thread::Builder::spawn_unchecked_::_$u7b$$u7b$closure$u7d$$u7d$::h10420d3f05d88e10 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:559:30
     (inlined by) core::ops::function::FnOnce::call_once$u7b$$u7b$vtable.shim$u7d$$u7d$::h55d6b921f4a96028 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #44 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h04b5432a19a802fd at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xb99864)
    #45 _$LT$alloc..boxed..Box$LT$F$C$A$GT$$u20$as$u20$core..ops..function..FnOnce$LT$Args$GT$$GT$::call_once::h3a4bcd6ac3a1558b at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/alloc/src/boxed.rs:1988:9 (libquery_engine.so.node+0xbbaab0)
     (inlined by) std::sys::unix::thread::Thread::new::thread_start::ha4a81db5a681fa15 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:108:17
    #46 __tsan_thread_start_func ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:991 (libtsan.so+0x3c510)

  Thread T14 'tokio-runtime-w' (tid=548, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1001 (libtsan.so+0x632a8)
    #1 std::sys::unix::thread::Thread::new::hbf41949fb76ddc00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:87:19 (libquery_engine.so.node+0xbba83c)
    #2 std::thread::Builder::spawn_unchecked_::hf1288c382e821452 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:594:17 (libquery_engine.so.node+0xbec7f4)
     (inlined by) std::thread::Builder::spawn_unchecked::h3e5c50718fd964f6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:488:32
     (inlined by) std::thread::Builder::spawn::h07fd7990ae79339f at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:420:18
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::hd41594398dfa0b0f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:466:9
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_task::h15f51b87b3a33077 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:416:27
    #3 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #4 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #5 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #6 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #7 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #8 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #9 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #10 core::ops::function::FnOnce::call_once::hcdcd49af01481cf3 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5 (libquery_engine.so.node+0x1f0e20)
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::hfcb10f9a1a796f17 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1275:28
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hff4cdb0d9556eca1 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:57
     (inlined by) once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hb37e8e57468afc4d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:82:23
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h542986d46413c8ef at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0x677284)
     (inlined by) once_cell::imp::initialize_or_wait::h702fcc40af4d1f96 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:206:20
    #12 once_cell::imp::OnceCell$LT$T$GT$::initialize::ha94fbd40ec8c2172 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:78:9 (libquery_engine.so.node+0x1211a0)
    #13 once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h07bffd592dcedca3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1126:13 (libquery_engine.so.node+0x1fcd5c)
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::h77277fc1c2e1d519 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:19
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::h1807bf17f39e7781 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1274:13
     (inlined by) _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h101c4d4aa9dda332 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1335:13
     (inlined by) napi::tokio_runtime::within_runtime_if_available::h4f995327397f17ec at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:82:19
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4dd6f2dc9d3ad84e at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
     (inlined by) core::result::Result$LT$T$C$E$GT$::and_then::h2a11a553da21ba24 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1341:22
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h6129db2ceee5d556 at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
    #14 v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) <null> (node+0xb15824)

  Thread T12 'tokio-runtime-w' (tid=546, running) created by main thread at:
    #0 pthread_create ../../../../src/libsanitizer/tsan/tsan_interceptors_posix.cpp:1001 (libtsan.so+0x632a8)
    #1 std::sys::unix::thread::Thread::new::hbf41949fb76ddc00 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/sys/unix/thread.rs:87:19 (libquery_engine.so.node+0xbba83c)
    #2 std::thread::Builder::spawn_unchecked_::hf1288c382e821452 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:594:17 (libquery_engine.so.node+0xbec7f4)
     (inlined by) std::thread::Builder::spawn_unchecked::h3e5c50718fd964f6 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:488:32
     (inlined by) std::thread::Builder::spawn::h07fd7990ae79339f at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/std/src/thread/mod.rs:420:18
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_thread::hd41594398dfa0b0f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:466:9
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_task::h15f51b87b3a33077 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:416:27
    #3 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #4 tokio::runtime::blocking::pool::Spawner::spawn_blocking_inner::he99f7b71ab156126 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:384:23 (libquery_engine.so.node+0xbf9344)
     (inlined by) tokio::runtime::blocking::pool::Spawner::spawn_blocking::hccf09f98cc816865 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:301:17
     (inlined by) tokio::runtime::handle::Handle::spawn_blocking::h90d70dff07867465 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/handle.rs:180:9
     (inlined by) tokio::runtime::blocking::pool::spawn_blocking::hd022d188700f7d62 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/blocking/pool.rs:183:5
     (inlined by) tokio::runtime::scheduler::multi_thread::worker::Launch::launch::h45ebcbda30541a52 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/scheduler/multi_thread/worker.rs:365:13
     (inlined by) tokio::runtime::builder::Builder::build_threaded_runtime::h2808334257bacb7c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:1060:13
     (inlined by) tokio::runtime::builder::Builder::build::hcd96619867cdfb7f at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/builder.rs:642:34
     (inlined by) tokio::runtime::runtime::Runtime::new::h571d4669edccc2fb at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.25.0/src/runtime/runtime.rs:132:13
    #5 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #6 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #7 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #8 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #9 napi::tokio_runtime::create_runtime::hc78d47c6d3008e89 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:11:19 (libquery_engine.so.node+0x658050)
     (inlined by) napi::tokio_runtime::RT::_$u7b$$u7b$closure$u7d$$u7d$::h6e61f00f5e2e240c at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:24:80
     (inlined by) core::ops::function::FnOnce::call_once::h7e8c4155a99ffcbb at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5
    #10 core::ops::function::FnOnce::call_once::hcdcd49af01481cf3 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:250:5 (libquery_engine.so.node+0x1f0e20)
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::_$u7b$$u7b$closure$u7d$$u7d$::hfcb10f9a1a796f17 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1275:28
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::_$u7b$$u7b$closure$u7d$$u7d$::hff4cdb0d9556eca1 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:57
     (inlined by) once_cell::imp::OnceCell$LT$T$GT$::initialize::_$u7b$$u7b$closure$u7d$$u7d$::hb37e8e57468afc4d at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:82:23
    #11 core::ops::function::impls::_$LT$impl$u20$core..ops..function..FnMut$LT$A$GT$$u20$for$u20$$RF$mut$u20$F$GT$::call_mut::h542986d46413c8ef at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/ops/function.rs:298:13 (libquery_engine.so.node+0x677284)
     (inlined by) once_cell::imp::initialize_or_wait::h702fcc40af4d1f96 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:206:20
    #12 once_cell::imp::OnceCell$LT$T$GT$::initialize::ha94fbd40ec8c2172 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/imp_std.rs:78:9 (libquery_engine.so.node+0x1211a0)
    #13 once_cell::sync::OnceCell$LT$T$GT$::get_or_try_init::h07bffd592dcedca3 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1126:13 (libquery_engine.so.node+0x1fcd5c)
     (inlined by) once_cell::sync::OnceCell$LT$T$GT$::get_or_init::h77277fc1c2e1d519 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1085:19
     (inlined by) once_cell::sync::Lazy$LT$T$C$F$GT$::force::h1807bf17f39e7781 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1274:13
     (inlined by) _$LT$once_cell..sync..Lazy$LT$T$C$F$GT$$u20$as$u20$core..ops..deref..Deref$GT$::deref::h101c4d4aa9dda332 at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/once_cell-1.17.0/src/lib.rs:1335:13
     (inlined by) napi::tokio_runtime::within_runtime_if_available::h4f995327397f17ec at /root/.cargo/registry/src/github.com-1ecc6299db9ec823/napi-2.12.4/src/tokio_runtime.rs:82:19
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::_$u7b$$u7b$closure$u7d$$u7d$::h4dd6f2dc9d3ad84e at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
     (inlined by) core::result::Result$LT$T$C$E$GT$::and_then::h2a11a553da21ba24 at /root/.rustup/toolchains/nightly-2023-03-01-x86_64-unknown-linux-gnu/lib/rustlib/src/rust/library/core/src/result.rs:1341:22
     (inlined by) query_engine::engine::__napi_impl_helper__QueryEngine__0::__napi__new::h6129db2ceee5d556 at /prisma-engines/query-engine/query-engine-node-api/src/engine.rs:138:1
    #14 v8impl::(anonymous namespace)::FunctionCallbackWrapper::Invoke(v8::FunctionCallbackInfo<v8::Value> const&) <null> (node+0xb15824)

SUMMARY: ThreadSanitizer: heap-use-after-free (/custom-prisma-engines/libquery_engine.so.node+0xea59c4) 

Also with @Jolg42’s help I’ve now released 5.3.0-integration-arm-openssl-5-2-0.1 which is equivalent to 5.2.0 but is built with the fix — feel free to test that instead if you’d prefer (again, make sure you install it as an exact version).

I can reproduce it as well on ARM64(Ampere) Hetzner machine.

I am experiencing this issue as well on Hetzner arm64 Ampere.

@aqrln

arm64v8/node:18 - also works

Hey guys 👋 . We were seeing the same thing with Prisma version 5.1.1 (with Postgres version 15.3) when running the node:latest-alpine image with docker compose. We are using M1 Macbooks (arm64). Our application uses nodemon for development and we were seeing random, intermittent crashes like so: image

Running the application without nodemon gave us _a little bit _ of more info…(exit code 139) image

After looking around google, it seems like exit code 139 is related to a segmentation fault.

Thinking it may be an alpine issue, I decided to just the regular node:latest image (without the -alpine suffix). That resulted in the following error code: image

These errors would happen for us every so often, whenever the our frontend would make queries to the backend which called the Prisma functionfindUniqueOrThrow(). Because it’s not consistent, it’s extremely difficult to reproduce, but I’ve found that waiting 10 minutes between requests somehow consistently reproduced the crash.

Our solution was indeed to match up the openssl binaryTarget with what’s provided in the image. So for example, the node:18.7-alpine image has the following openssl package: image

So we have the following in generator client when using the node:18.7-alpine image:

generator client {
  provider = "prisma-client-js"
  engineType = "binary"
  binaryTargets = ["native", "linux-musl-arm64-openssl-1.1.x"]
}

Here is my prisma --version, in case anyone is interested:

prisma                  : 5.1.1
@prisma/client          : 5.1.1
Current platform        : linux-musl-arm64-openssl-1.1.x
Query Engine (Node-API) : libquery-engine 6a3747c37ff169c90047725a05a6ef02e32
ac97e (at ../node_modules/@prisma/engines/libquery_engine-linux-musl-arm64-op
enssl-1.1.x.so.node)
Schema Engine           : schema-engine-cli 6a3747c37ff169c90047725a05a6ef02e
32ac97e (at ../node_modules/@prisma/engines/schema-engine-linux-musl-arm64-op
enssl-1.1.x)
Schema Wasm             : @prisma/prisma-schema-wasm 5.1.1-1.6a3747c37ff169c9
0047725a05a6ef02e32ac97e
Default Engines Hash    : 6a3747c37ff169c90047725a05a6ef02e32ac97e
Studio                  : 0.492.0

TL;DR - switching to the node:18.7-alpine image and modifying our binaryTargets to the above fixed our crashes.

Hi! I originally posted in https://github.com/prisma/prisma/issues/10649#issuecomment-1656941029 but was asked to move it here, so here goes:

I’ve spent many hours trying to figure out why Prisma is segfaulting in the query engine, have tried changing the engine format to “engine” but without any promising result unfortunately.

Prisma 5.0.0
Platform Dockerized through MacOS M1 (ARM)
NodeJS 18.17.0

I tried playing around with different versions and found that node 18.16 and above has this problem, from what I can tell node version 18.15 is the latest version that runs without encountering any segfault. Worth noting is that the faulty versions did still work for smaller queries but they broke when GraphQL concatenated larger queries which I had a test case for.

So basically this was the workaround I came up with:

# Dockerfile
FROM node:18 -> FROM node:18.15

Bumped into this when trying to use Prisma with Postgres 15 on a Raspberry Pi 4 64-bit (arm64) running in musl-based Docker container (node:18-alpine). It’s using the prebuilt libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node library.

The issue occurs for me whenever the postgres connection times out. I can reproduce it by terminating the connection from postgres’ end with pg_terminate_backend, e.g. select pg_terminate_backend(pid) from pg_stat_activity where pid <> pg_backend_pid();.

The stack trace points to tokio-runtime, so might be something upstream. Or maybe the stack trace is just being exceptionally unhelpful and it just happens to blow up inside an async section.

lldb/llnode dumps:

Process 103 stopped
* thread #13, name = 'tokio-runtime-w', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
    frame #0: 0x0000007ff7f77d3c ld-musl-aarch64.so.1
->  0x7ff7f77d3c: ldr    x1, [x0, #0x10]
    0x7ff7f77d40: cmp    x1, x4
    0x7ff7f77d44: b.ne   0x7ff7f77cec
    0x7ff7f77d48: ldr    x1, [x0, #0x20]

Unhelpfully empty stack trace:

(llnode) thread backtrace
* thread #13, name = 'tokio-runtime-w', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x0000007ff7f77d3c ld-musl-aarch64.so.1

Threads:

(llnode) thread backtrace all
  thread #1, name = 'node'
    frame #0: 0x0000007ff7faaccc ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7f712ac ld-musl-aarch64.so.1`epoll_pwait + 40
    frame #2: 0x00000055569b5b38 node`uv__io_poll(loop=<unavailable>, timeout=<unavailable>) at epoll.c:236:14
    frame #3: 0x00000055569a3fcc node`uv_run(loop=0x000000555a2643c0, mode=UV_RUN_DEFAULT) at core.c:406:5
    frame #4: 0x0000005555da0664 node`node::SpinEventLoop(node::Environment*) + 356
    frame #5: 0x0000005555eaaa7c node`node::NodeMainInstance::Run() + 284
    frame #6: 0x0000005555e21644 node`node::LoadSnapshotDataAndRun(node::SnapshotData const**, node::InitializationResult const*) + 212
    frame #7: 0x0000005555e247b0 node`node::Start(int, char**) + 1120
    frame #8: 0x0000007ff7f6d6a4 ld-musl-aarch64.so.1
  thread #2, name = 'node'
    frame #0: 0x0000007ff7faaccc ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7f712ac ld-musl-aarch64.so.1`epoll_pwait + 40
    frame #2: 0x00000055569b5b38 node`uv__io_poll(loop=<unavailable>, timeout=<unavailable>) at epoll.c:236:14
    frame #3: 0x00000055569a3fcc node`uv_run(loop=0x0000007ff7c5d118, mode=UV_RUN_DEFAULT) at core.c:406:5
    frame #4: 0x0000005555ed78f4 node`node::WorkerThreadsTaskRunner::DelayedTaskScheduler::Start()::'lambda'(void*)::_FUN(void*) + 148
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #3, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:800:7
    frame #4: 0x0000005555ed2db8 node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 312
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #4, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:800:7
    frame #4: 0x0000005555ed2db8 node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 312
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #5, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:800:7
    frame #4: 0x0000005555ed2db8 node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 312
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #6, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=<unavailable>, mutex=<unavailable>) at thread.c:800:7
    frame #4: 0x0000005555ed2db8 node`node::(anonymous namespace)::PlatformWorkerThread(void*) + 312
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #7, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fae894 ld-musl-aarch64.so.1`sem_timedwait + 216
    frame #3: 0x00000055569b1edc node`uv_sem_wait at thread.c:646:9
    frame #4: 0x00000055569b1ec0 node`uv_sem_wait(sem=0x000000555a25b540) at thread.c:702:5
    frame #5: 0x0000005555f6f300 node`node::inspector::(anonymous namespace)::StartIoThreadMain(void*) + 64
    frame #6: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #7: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #8, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=0x000000555a264310, mutex=0x000000555a264340) at thread.c:800:7
    frame #4: 0x000000555699f35c node`worker(arg=0x0000000000000000) at threadpool.c:76:7
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #9, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=0x000000555a264310, mutex=0x000000555a264340) at thread.c:800:7
    frame #4: 0x000000555699f35c node`worker(arg=0x0000000000000000) at threadpool.c:76:7
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #10, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=0x000000555a264310, mutex=0x000000555a264340) at thread.c:800:7
    frame #4: 0x000000555699f35c node`worker(arg=0x0000000000000000) at threadpool.c:76:7
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #11, name = 'node'
    frame #0: 0x0000007ff7faacc8 ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7faaaac ld-musl-aarch64.so.1
    frame #2: 0x0000007ff7fabca0 ld-musl-aarch64.so.1`pthread_cond_timedwait + 224
    frame #3: 0x00000055569b208c node`uv_cond_wait(cond=0x000000555a264310, mutex=0x000000555a264340) at thread.c:800:7
    frame #4: 0x000000555699f35c node`worker(arg=0x0000000000000000) at threadpool.c:76:7
    frame #5: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #6: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #12, name = 'tokio-runtime-w'
    frame #0: 0x0000007ff7f782f0 ld-musl-aarch64.so.1
* thread #13, name = 'tokio-runtime-w', stop reason = signal SIGSEGV: invalid address (fault address: 0x10)
  * frame #0: 0x0000007ff7f77d3c ld-musl-aarch64.so.1
  thread #14, name = 'tokio-runtime-w'
    frame #0: 0x0000007ff7faaccc ld-musl-aarch64.so.1
    frame #1: 0x0000007ff7f712ac ld-musl-aarch64.so.1`epoll_pwait + 40
    frame #2: 0x0000007ee8ea56b4 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15842 + 184
    frame #3: 0x0000007ee8ea5304 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15840 + 360
    frame #4: 0x0000007ee8ea324c libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15803 + 812
    frame #5: 0x0000007ee8eada4c libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15995 + 1940
    frame #6: 0x0000007ee8ea6720 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15854 + 28
    frame #7: 0x0000007ee8ea60f0 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15849 + 380
    frame #8: 0x0000007ee8ea6d98 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15867 + 144
    frame #9: 0x0000007ee8e8f928 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15449 + 28
    frame #10: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #11: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #15, name = 'tokio-runtime-w'
    frame #0: 0x0000007ff7f8ac88 ld-musl-aarch64.so.1`syscall + 172
    frame #1: 0x0000007ee8b27600 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol8014 + 592
    frame #2: 0x0000007ee8ea31d8 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15803 + 696
    frame #3: 0x0000007ee8eada4c libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15995 + 1940
    frame #4: 0x0000007ee8ea6720 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15854 + 28
    frame #5: 0x0000007ee8ea60f0 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15849 + 380
    frame #6: 0x0000007ee8ea6d98 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15867 + 144
    frame #7: 0x0000007ee8e8f928 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15449 + 28
    frame #8: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #9: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #16, name = 'opentelemetry-e'
    frame #0: 0x0000007ff7f8ac88 ld-musl-aarch64.so.1`syscall + 172
    frame #1: 0x0000007ee8e6bb98 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15127 + 120
    frame #2: 0x0000007ee8b17420 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol7789 + 164
    frame #3: 0x0000007ee8b19a80 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol7809 + 156
    frame #4: 0x0000007ee8b15674 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol7777 + 1620
    frame #5: 0x0000007ee8b1b988 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol7873 + 152
    frame #6: 0x0000007ee8e8f928 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15449 + 28
    frame #7: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #8: 0x0000007ff7faac9c ld-musl-aarch64.so.1
  thread #17, name = 'futures-timer'
    frame #0: 0x0000007ff7f8ac88 ld-musl-aarch64.so.1`syscall + 172
    frame #1: 0x0000007ee8e6be28 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15130 + 208
    frame #2: 0x0000007ee8e6bcd4 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15129 + 76
    frame #3: 0x0000007ee88da93c libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol3690 + 1676
    frame #4: 0x0000007ee88db5b8 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol3718 + 172
    frame #5: 0x0000007ee8e8f928 libquery_engine-linux-musl-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol15449 + 28
    frame #6: 0x0000007ff7fac494 ld-musl-aarch64.so.1
    frame #7: 0x0000007ff7faac9c ld-musl-aarch64.so.1

When using a glibc-based container (node:18), the error is: malloc(): unaligned tcache chunk detected, again in tokio-runtime:

(llnode) f
frame #0: 0x0000007ff7b30990 libc.so.6`___lldb_unnamed_symbol3312 + 304
libc.so.6`___lldb_unnamed_symbol3312:
->  0x7ff7b30990 <+304>: cmn    w0, #0x1, lsl #12         ; =0x1000
    0x7ff7b30994 <+308>: csneg  w0, wzr, w0, ls
    0x7ff7b30998 <+312>: b      0x7ff7b30918              ; <+184>
    0x7ff7b3099c <+316>: mov    x0, x22
(llnode) v8 bt
 * thread #13: tid = 125, 0x0000007ff7b30990 libc.so.6`___lldb_unnamed_symbol3312 + 304, name = 'tokio-runtime-w', stop reason = signal SIGABRT
  * frame #0: 0x0000007ff7b30990 libc.so.6`___lldb_unnamed_symbol3312 + 304
    frame #1: 0x0000007ff7aea76c libc.so.6`raise + 28
    frame #2: 0x0000007ff7ad74bc libc.so.6`abort + 240
    frame #3: 0x0000007ff7b24a6c libc.so.6`___lldb_unnamed_symbol3220 + 492
    frame #4: 0x0000007ff7b3adec libc.so.6`___lldb_unnamed_symbol3381 + 28
    frame #5: 0x0000007ff7b3f244 libc.so.6`malloc + 1012
    frame #6: 0x0000007fe51e73e4 libquery_engine-linux-arm64-openssl-3.0.x.so.node`___lldb_unnamed_symbol17172 + 1632800

Turn SSL mode off by using sslmode=disable

export DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}?pool_timeout=20&sslmode=disable"

* This is perfectly fine if your RDS instance is not publicly accessible

Facing the same issue in an ARM64-based EC2 instance connected to PostgreSQL managed by RDS.

It’s really a critical error and needs to be investigated. For now, I have 2 solutions: To migrate the small amount of data currently stored in Postgres to another MySQL instance. (Not a straightforward solution as it will require tweaking the codebase as MySQL doesn’t support scalar lists.) The second is to deploy the whole application again in a new x86-64 EC2 instance as the web application is still in the early stages of production.

@edelbalso yes, you need to update to at 5.3.0 or higher, preferably latest 5.7.1.

Since you’re on a fairly old version, you might unfortunately have to do some work to migrate from Prisma 4.x to Prisma 5.x. Please take a look at the upgrade guide to see if there’s anything that would affect your application, and how to handle that: https://www.prisma.io/docs/orm/more/upgrade-guides/upgrading-versions/upgrading-to-prisma-5

@cxcorp thanks again for your investigation and for steps for reproduction, I finally had some time to take a closer look last week. I couldn’t reproduce the segfault and the double-free with asan (I only got a bunch of leaks in napi-rs glue code and in node/v8 reported) with locally built engines on ARM64 Linux (NixOS). This hints that the issue might be either with the OpenSSL version (I was building locally with 3.0.9) or with cross-compilation. I’ll try reproducing with our stock cross-compiled engines in another VM or in a docker container as I can’t easily use them on NixOS and see what happens.

UPD: actually I just realised I might have built it in debug and not in release profile, so I’ll have to double check that as well

I had the same problem and tried a lot. The only thing that helped was the following configuration in the schema for client:


generator client {

  provider = "prisma-client-js"

  engineType = "binary"

}

Setting engineType = "binary" reduced the number of failures for me (and a single segfault did no longer kill the entire test run), but some are still present. Especially tests working with lots of database rows and sorting/filtering are the ones that still fail. Simple findFirst() or findUnique() appear to be unaffected.

I had the same problem and tried a lot. The only thing that helped was the following configuration in the schema for client:

generator client {
  provider = "prisma-client-js"
  engineType = "binary"
}

easy way to reproduce is to use a domain that can’t be resolved, like postgres://user:pass@local.domain:5432/postgres with node:18.16-alpine image and the binaryTargets = ["native"] on ARM64. Works fine in any x64 environment

@aqrln Just tested 5.3.0-integration-arm-openssl-5-2-0.1 on Alpine (image node:20.5.1-alpine) – works without problems in a setup which consistently broke with Prisma 5.2.0. Thank you so much for your effort!

@aqrln

Amazon Linux 2023 - it works

It may also work on alpine?

Some context I find suspiciously correlating:

AWS EC2 with Amazon Linux 2023 (arm64) - it crushes.

comes with openssl 1:3.0.8-1.amzn2023.0.3

AWS EC2 with Amazon Linux 2 (arm64) - it works.

comes with openssl 1:1.0.2k-24.amzn2.0.7

AWS ECS Fargate with “arm64v8/node:18” image - it crushes.

comes with openssl 3.0.9-1

AWS ECS Fargate with “arm64v8/node:18.7-alpine” image - it works.

comes with openssl 1.1.1q-r0

AWS Lambda with “lambda/nodejs:18-arm64” image - it works.

comes with openssl 1:1.0.2k-24.amzn2.0.7

While looking through similar aarch64-related Prisma issues I found that some may be related to https://github.com/openssl/openssl/issues/21541 – can this be the case here as well? A fix for that (https://github.com/openssl/openssl/commit/e7bb35e0c3dbd7ba5e6e4885d893191a3bf70356) is not included in any openssl release yet, but maybe someone can compile and test it locally?

@xlmnxp @ryanccn @marvinruder

I have the solution. At least for me. IF you use the version with the binary type and also get a connection error with the “findMany”, it is because there are problems with the openssl version of your linux distribution. In my case I use a Ubuntu Verson 22. If I explicitly go to a lower version (not this one which is given for the respective operating system… but a lower one), it works fine. Which version you have to use can be found here. https://www.prisma.io/docs/reference/api-reference/prisma-schema-reference#binarytargets-options

I don’t think it makes sense not to use ssl.

I also added my config for the ARM64 server:

generator client { provider = “prisma-client-js” binaryTargets = [“native”, “debian-openssl-1.1.x”] engineType = “binary” }

Turn SSL mode off by using sslmode=disable


export DATABASE_URL="postgresql://${DB_USER}:${DB_PASS}@${DB_HOST}:${DB_PORT}/${DB_NAME}?pool_timeout=20&sslmode=disable"

Interestingly that did not work for me, I still get Segfaults even without using SSL.

I can reproduce it as well on ARM64(Ampere) Hetzner machine.

Can also reproduce on AWS EC2 aarch64 instance, currently using emulated x86_64, which works but is very slow (to the point of timing out).

This seems to be a very serious bug.

@aqrln any progress on this?

Is there any progress with this issue?

I also see this behaviour in my project, but it’s very strange: Prisma version 5.2.0

AWS EC2 with Amazon Linux 2023 (arm64) - it crushes. AWS EC2 with Amazon Linux 2 (arm64) - it works.

AWS ECS Fargate with “arm64v8/node:18” image - it crushes. AWS ECS Fargate with “arm64v8/node:18.7-alpine” image - it works.

AWS Lambda with “lambda/nodejs:18-arm64” image - it works.

It seems like it’s a problem with new OS versions…

sorry @marvinruder, I have not continued my own investigation as I grew tired of aarch64 issues and bought an x86_64 machine

While looking through similar aarch64-related Prisma issues I found that some may be related to openssl/openssl#21541 – can this be the case here as well? A fix for that (openssl/openssl@e7bb35e) is not included in any openssl release yet, but maybe someone can compile and test it locally?

It’s not related to OpenSSL because it happen even when you disable TLS/SSL

Even with node v19.9 and sslmode disabled, the issue still occurs for me on Linux ARM64. Also on docker, with the images node:16 through 19 on alpine and slim, have not tested other yet

@cxcorp thanks so much for the investigation!

There is of course the possibility that removing RTLD_DEEPBIND as part of my compiling&running steps produced some issue with openssl which caused this as a different segfault, I don’t really know what that flag does.

OpenSSL is at the moment statically linked in our cross-compiled ARM binaries (and looking at the diff in your dockerfile, that didn’t change), so no worries about it, it’s completely irrelevant here and removing the flag shouldn’t have affected anything 👍 And even if it was dynamically linked like in their x86_64 counterparts, the combination of Node.js 18 and linux-arm64-openssl-3.0.x would still be fine without this flag.

What this flag does is it ensures that the dynamic linker picks up OpenSSL symbols from libssl.so and not from the Node.js binary when loading the addon (otherwise things break when system OpenSSL and the one vendored with Node.js are not ABI-compatible).

I had the same problem and tried a lot. The only thing that helped was the following configuration in the schema for client:


generator client {

  provider = "prisma-client-js"

  engineType = "binary"

}

Setting engineType = "binary" reduced the number of failures for me (and a single segfault did no longer kill the entire test run), but some are still present. Especially tests working with lots of database rows and sorting/filtering are the ones that still fail. Simple findFirst() or findUnique() appear to be unaffected.

for me, when engineType = "binary" I get error message tell me there no findFirst or findUnique functions

connect ECONNREFUSED 127.0.0.1:33309
Error: 
Invalid `prisma.file.findUnique()` invocation

and sometimes:

other side closed
Error: 
Invalid `prisma.revision.create()` invocation:

I’m also having issues, because I use Docker I ended up changing the platform to amd64 and adding the engine to the schema, and it worked:

generator client {
  provider = "prisma-client-js"
  binaryTargets = ["native", "rhel-openssl-3.0.x"]
}

Not a real fix but at least a workaround for local development.

Can a prisma dev add segfault-handler to the codebase so we can know where in the code this segfault is coming from?

Experiencing the same, on Hetzner Cloud CAX21 instance (aarch64-based Ampere Altra CPU). I am getting several different errors every time. Some examples:

malloc(): unaligned fastbin chunk detected free(): double free detected in tcache 2 malloc_consolidate(): invalid chunk size malloc(): unaligned tcache chunk detected

Let me know if I need to provide more information on this.

Facing the same issue in an ARM64-based EC2 instance connected to PostgreSQL managed by RDS.

I’m also encountering this via Umami

I believe that this SIGSEGV is also happening in umami with the configuration below. Not sure if its useful, but the error is reproducible with the Docker images, containers and CPU architecture.

CPU: ARM Ampere A1 Compute (aarch64/arm64)
Shape: VM.Standard.A1.Flex
OCPU count: 4
Network bandwidth (Gbps): 4
Memory (GB): 24
Local disk: Block storage only
Image: Canonical-Ubuntu-22.04-Minimal-aarch64-2022.08.16-0

Node version: node:18-alpine
Prisma: 4.11.0

Reproducible using this Dockerfile and docker-compose.yml

Logs from the Docker container

yarn run v1.22.19
$ npm-run-all check-db update-tracker start-server
$ node scripts/check-db.js
✓ DATABASE_URL is defined.
✓ Database connection successful.
✓ Database tables found.
Prisma schema loaded from prisma/schema.prisma
Datasource "db": PostgreSQL database "umami", schema "public" at "db:5432"

4 migrations found in prisma/migrations


Database schema is up to date!

✓ Database is up to date.
$ node scripts/update-tracker.js
$ node server.js
Listening on port 3000
error Command failed with signal "SIGSEGV".
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.
ERROR: "start-server" exited with 1.
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Same issue on arm64, prisma 4.11, nodejs 16 on alpine. I am running keystonejs 6 project. Segmentation only occurred when the SQL result are large enough for once.

Running GraphQL: types { apps {id} } -> crash types(where: {"id": {"lt": 6}}) { apps {id} } -> crash types(where: {"id": {"lt": 3}}) { apps {id} } -> no crash types(where: {"id": {"lt": 4}}) { apps {id} } -> no crash And if I gradually lift the where limit, there’re still no crash. Maybe due to cache or memory allocation?