-
Notifications
You must be signed in to change notification settings - Fork 1.5k
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 Option::unwrap()
on a None
value in query-engine/core/src/interpreter/query_interpreters/nested_read.rs:231:50
#8691
Comments
Correction: The docker container was executing the |
Update: Tried pure 2.28 and ~24 hours later it crashed again. Will now try 2.29 and report back in a few days. |
Can you share (or reconstruct) the Prisma Client query this would send, with the relevant |
Hi Janpio, I will get that information asap. It seems to be affecting just one of many(5) PrismaClient instances we are storing in an array, the one that has a connection_limit=500 - maybe too high? In the meantime, I found a bit of extra info I should paste: Hi Prisma Team! My Prisma Client just crashed. This is the report: Versions
Query
Logs
|
The connection limit should not really be a problem. You are using the |
The error indicates that your schema and your database may be drifting. Can you: |
I wrote this healthcheck which correctly identifies when it has crashed:
And the model for this is:
The "implementation details" basically calls this:
and the model for user is
I could get the mysql schema too, but why would it work for many hours then die. I would expect a schema mis-match to not work straight away, and also be citing MySQL error codes Our complete schema is propreitary however we are willing to send this as a confidential email to you. Thank for your help with this. I will disable nApi now and report back in a day. |
From what I can tell, 2.29 running without nApi is running solidly so far. |
Although we can not reproduce this, we can not imagine how this could be connected to using the If you get any additional information on how to reliably reproduce this, or can indeed pinpoint this being connected to our Node-API engine exclusively, we are super happy to jump on this again. For now we do not really know how to proceed further here. |
Can I DM you on Slack with a private repo? Some extra weak information I have:
I also do not know how to proceed. My $0.02 for the Prisma team is: As the error I hit is the same file and line number each time, could you catch that particular error and output to console any extra information you guys need me to paste here? Like a core dump. Maybe only when I have a certain env var set (otherwise this might be adding an extra vector for attackers). |
Yes, I am @janpio on our public Slack as well - just ping me there.
We could make the crash disappear indeed - but are hesitant as it really might be a deeper problem that needs to be solved. |
Update - just had another PANIC of the exact same signature. So we can now rule out |
Also ran into this issue today. It happens randomly. Not sure how to reproduce. Possibly by making too many requests to Prisma at once. |
Update, I have got this crash again on 1 of my servers in a cluster. The rest of the cluster is fine, it's just 1 node that seems to crash with this anytime we call prisma:-
Notice how the line number has increased by 1 so I assume it's the same problem here that I've had for a year or so so far. |
I can confirm the PANIC error happens with nested operations. |
We are still experiencing this issue with the latest version 3.10.0 |
We are seeing this with query{me{id}} as well |
My hunches are:
|
I can reproduce this issue. Please see this repo for a small reproduction. It seems as though this Rust Panic occurs when a relationship is created using a non-unique constraint. Some connectors check for this (SQLite) but others don't and cause a runtime error (MySQL) Notes:
Error: P1012
error: Error validating: The argument `references` must refer to a unique criteria in the related model `A`. But it is referencing the following fields that are not a unique criteria: custom_id
--> schema.prisma:21
An error occured while running the seed command:
Error: Command was killed with SIGKILL (Forced termination): ts-node prisma/seed.ts |
I can reproduce the "called I can not reproduce the Considering the long history of this issue, I suggest I create a new one with a minimal reproduction and nothing else. |
New issue: #13340 I slightly simplified the reproduction from you @andrewicarlson. I also already added that this is probably a missing validation in the Please confirm that this actually covers your cases and let me know if not. |
Just checking, did you mean newer Prisma versions?
I think handling this via schema validation makes sense and would allow this issue to be caught and resolved pre-runtime more easily. |
Yes indeed, sorry. |
Bug description
Hi, I'm suddenly getting this on our Prisma server:
How to reproduce
Expected behavior
As Douglas Adams wrote, "Dont panic!"
Prisma information
Using paljs and nexus
Environment & setup
Prisma Version
The text was updated successfully, but these errors were encountered: