New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
PANIC: called Result::unwrap()
on an Err
value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" } in /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/blocking/pool.rs:247:14
#13585
Comments
Hey @russellpekala did you find a solution for this one? Got the same error on my side |
@adomkg @russellpekala @Epidimodev Any idea how we could reproduce this problem? Is it enough to take the schema above and somehow run the Prisma Client query that was provided in the initial message? What kind of data do we need in the database for this to be triggered? |
At first the only error I was able to get in Prisma 3.14 (after fixing the validation errors in the schema that prevented me from generating the client, and supposing that /Users/aqrln/prisma/prisma/reproductions/reproductions/gh-13585/node_modules/.prisma/client/runtime/index.js:45405
throw new PrismaClientKnownRequestError(message, e.code, this.client._clientVersion, e.meta);
^
PrismaClientKnownRequestError:
Invalid `prisma.user.findUnique()` invocation in
/Users/aqrln/prisma/prisma/reproductions/reproductions/gh-13585/index.ts:9:34
6 async function main() {
7 const prisma = new PrismaClient()
8
→ 9 const user = await prisma.user.findUnique(
Failed to convert napi `string` into rust type `String`
at Object.request (/Users/aqrln/prisma/prisma/reproductions/reproductions/gh-13585/node_modules/.prisma/client/runtime/index.js:45405:15)
at processTicksAndRejections (node:internal/process/task_queues:95:5)
at async PrismaClient._request (/Users/aqrln/prisma/prisma/reproductions/reproductions/gh-13585/node_modules/.prisma/client/runtime/index.js:46301:18)
at async main (/Users/aqrln/prisma/prisma/reproductions/reproductions/gh-13585/index.ts:9:16) {
code: 'StringExpected',
clientVersion: '3.14.0',
meta: undefined
} This is an error of completely different nature, so irrelevant to the original report, and it is not reproducible anymore with the latest Prisma. Also it was only reproducible on macOS but not on Linux. However, after looking at the exact location where the panic happened it wasn't hard to see what the issue was. This
Indeed, lowering the number of user processes from default on my Linux system 15334 down to 20, I got this panic in Prisma 3.14.0: [aqrln@sparkles gh-13585]$ ulimit -u 20
[aqrln@sparkles gh-13585]$ ts-node index.ts
thread '<unnamed>' panicked at 'called `Result::unwrap()` on an `Err` value: Os { code: 11, kind: WouldBlock, message: "Resource temporarily unavailable" }', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/tokio-1.15.0/src/runtime/blocking/pool.rs:247:14
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
fatal runtime error: failed to initiate panic, error 305979168
Aborted (core dumped) (Note: this is a very contrived way to trigger the issue, the real world conditions under which it happened for you were probably very different. Under these artificial conditions even When using the latest Prisma, this specific error doesn't happen anymore, because it is using Tokio 1.21.0. That said, there are all other kinds of things going wrong in different places when the limit is so small: [aqrln@sparkles gh-13585]$ ulimit -u 20
[aqrln@sparkles gh-13585]$ ts-node index.ts
Error: read ENOTCONN
at tryReadStart (node:net:659:20)
at Socket._read (node:net:670:5)
at Socket.Readable.read (node:internal/streams/readable:496:12)
at Socket.read (node:net:725:39)
at new Socket (node:net:446:12)
at Object.Socket (node:net:315:41)
at createSocket (node:internal/child_process:335:14)
at ChildProcess.spawn (node:internal/child_process:450:23)
at spawn (node:child_process:743:9)
at Object.execFile (node:child_process:341:17) {
errno: -107,
code: 'ENOTCONN',
syscall: 'read'
} [aqrln@sparkles gh-13585]$ ulimit -u 30
[aqrln@sparkles gh-13585]$ ts-node index.ts
thread 'tokio-runtime-worker' panicked at 'timer has gone away', /root/.cargo/registry/src/github.com-1ecc6299db9ec823/futures-timer-3.0.2/src/native/delay.rs:112:21
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace
/home/aqrln/gh-13585/node_modules/.prisma/client/runtime/index.js:30881
throw new PrismaClientRustPanicError(message, this.client._clientVersion);
^
PrismaClientRustPanicError:
Invalid `prisma.user.findUnique()` invocation in
/home/aqrln/gh-13585/index.ts:9:34
6 async function main() {
7 const prisma = new PrismaClient()
8
→ 9 const user = await prisma.user.findUnique(
PANIC: timer has gone away
This is a non-recoverable error which probably happens when the Prisma Query Engine has a panic. Please open an issue if you encounter any of these errors under real-world conditions after upgrading to the latest Prisma! As for the original issue, since it is already fixed, I will go ahead and close this issue. |
Hi Prisma Team! My Prisma Client just crashed. This is the report:
Versions
Logs
Client Snippet
// PLEASE FILL YOUR CODE SNIPPET HERE
Schema
Prisma Engine Query
The text was updated successfully, but these errors were encountered: