-
-
Notifications
You must be signed in to change notification settings - Fork 504
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
SegFault while trying to load binary into database #336
Comments
Please, try to avoid calling mogrify(), just do:
If this works then the error is in mogrify() and we can try to fix it there. |
I tried to insert using the method you suggested - unfortunately it still resulted in a segmentation fault. Python: Segmentation fault (core dumped) GDB: Program received signal SIGSEGV, Segmentation fault. Frame 78: #0 0x0000000000000000 in ?? () Backtrace is the same as above. If it's relevant - |
I think the file size is relevant yes. lo64 probably not, as you are not using large objects (for so big values maybe you should...) |
Think I'll try large objects then. Thank you for your time. |
I tried to reproduce the issue: I crashed my machine running out of memory but didn't get a segfault in psycopg. |
Python Version: 2.6.6
Postgresql Version: 9.4.4
Psycopg2 Version: 2.6.1
I've been working on a script that uses psycopg2's binary function to convert and store it in the database in a bytea field. When the script tries to insert it into the database via an 'execute' command it results in a segmentation fault. This happens whether the update string gets mogrified or not.
Here is what I have in the Python code for the conversion and database insert steps:
This is what Python prints as an error:
This is the output for the trace I got via gdb:
Looking at Frame 78:
This is the backtrace:
I think it's a similar issue to this issue - is this what is happening here?
Thanks.
The text was updated successfully, but these errors were encountered: