-
Notifications
You must be signed in to change notification settings - Fork 32
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!
ing twice crashes PG with "Illegal instruction"
#118
Comments
Error, fatal and panic all cause PG to abort the transaction, where panic will cause a full restart. The illegal obstruction is concerning though. Is this a double panic? Or is it a panic, and then a different transaction also panicking? |
Unless |
This is happening on Windows? I wonder if this behavior can be reproduced on a vanilla Linux box. |
I haven’t looked into this, yet, but what is the expected behavior of Postgres when it panics? It might do exactly this. It would be interesting if we had a test case that showed this with and without pg-extend. That would require a vanilla C extension I think. |
Yes. That’s what I was trying to explain. Error and higher log statements have the side effect of killing the transaction/process/server, depending on which you use. It’s really ugly imo, but that’s the way it works. |
OS
Ubuntu 18.04 (Windows Subsystem for Linux)
Code
panicking
example packageIssue
Rust
panic!()
is caught and handled properly on the first call, but if called again, the server crashes:Here's PG logs:
That little extra weird stuff
This also happens when using
error!()
macro, but it requires 3 executions:Here;s PG logs:
The text was updated successfully, but these errors were encountered: