-
Notifications
You must be signed in to change notification settings - Fork 99
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
adbc_driver_postgresql.dbapi causes silent program exit on connection attempt to db #1531
Comments
Thanks for the report. Windows support is a bit difficult for me but I will spin up a VM to investigate when I get a chance. |
Hmm, I am unable to reproduce this on a Windows 11 developer VM
I tried the context manager as well in case that was the issue, but no dice.
|
I should have been more specific to simulate the error. The PostgreSQL database is hosted on AWS RDS and I'm running Windows 10 now. It's so strange that you don't replicate the error though either. I can't think of any AWS RDS db configurations that would allow connections with |
Do you know of a way to get a Windows 10 developer VM? |
Unfortunately I don't and based on my research Windows no longer supports them. I'm hoping someone else has the same issue and discovers this thread to contribute. The only other information I can give is when I attempt the connection I get the hourglass next to the mouse indicating some sort of processing is going on for a second before the python program dies. |
Ok. It turns out, I dug up an old laptop (that I was planning on donating/recycling) but it happens to still be on Windows 10. When I can find more time again I'll give it another shot. |
You're the man David! |
No dice, unfortunately:
|
Are you possibly able to load WinDbg (it's in the Windows Store) and get a backtrace?
should pop up the GUI and run the program |
Thanks for the suggestion. I ran the tool you suggested and indeed got a backtrace. It seems the error is related to the package itself and an integrity error on a single file.
|
Bleh. Any chance you have more of the traceback than that? That's quite odd since that function implicated just fills out a struct, basically. I'm not great at reading disassembly, but I think I found the instruction implicated; the disassembly is extremely oddly long (hundreds of thousands of instructions), too. |
Ok, the disassembly is a few hundred lines of what I would expect, a |
I hope this helps. I only didn't include it initially because it didn't appear to have any clues as to what might be causing the issue. |
Okay, this is a super-naive question but is a dynamic library generated by a toolchain producing an ".so" file even compatible with what the driver manager is expecting to load? EDIT to minimize spamming: I thought checksum failure might be indicative of something, but if this weren't a valid DLL then we presumably wouldn't be referencing a symbol inside of it. |
It's a DLL, just that I didn't bother to special case the extension in the build pipeline |
Hmm, that gives everything except for the rest of the traceback which is what I'm curious about: how/why are we jumping into what appears to not even be valid code? |
It does appear I should try with pyenv instead of Chocolatey python, though |
Or apparently pyenv-win? Is that what you're using? |
No dice, tried Python 3.11.7 via pyenv-win and it did not crash either. |
I have the same issue on windows 11.
When running dbapi.connect(uri) it crashes with: Process finished with exit code -1073740940 (0xC0000374) On ubuntu I haven't had this issue when connecting to the same database. |
Thanks, good to know. I'll try to find time to replicate this again but I've not been having any luck, or else I'll try to figure out the backtrace handler (#1583) and see if we can provide a nightly wheel to test with |
Oh, some more questions:
|
I'm not running it on a notebook but in pycharm. I ran faulthander before the crash:
|
Thanks. That gives the Python stack, but unfortunately not the C-level stack that could/might explain how we're getting so sidetracked... |
Does this give you more insights?
|
I can confirm this is also an issue on:
Also an AWS RDS database. Connecting using username+password. |
Hmm. Is everyone here trying RDS? Does it crash with a local or other non-AWS Postgres instance? |
I'm not using AWS |
I have the same issue, on an Azure hosted db. I'm running locally and it crashes the process/notebook when ran either in jupyter, IPython, or just Python. I was suspecting it'd be the antivirus blocking it - but no idea. On Windows 11, Python 3.10.9 |
I have built some wheels here with debug info (scroll all the way down): https://github.com/apache/arrow-adbc/actions/runs/8331028521?pr=1599 Would it be possible for anyone to give that a shot, preferably under windbgx, and see if they can get a full stack trace? |
I'm still unable to reproduce this. If anyone is able to produce a full stack trace (not just the last frame), and/or a reproducer, that would be much appreciated. As far as I can see, the original crash happens before any connection attempt is made (it happens when trying to load the client library), so it doesn't seem to be related to RDS/Azure/etc. |
Or even knowing how things were installed would help (e.g. I just saw Anaconda above, but we don't ship Conda packages on Windows!) |
Hmm, no dice either with Anaconda Python + ADBC from wheels |
Or actually, please use the updated wheels here (scroll down to "python3.12-windows" etc): https://github.com/apache/arrow-adbc/actions/runs/8347053159?pr=1599 Also, please extract "adbc_driver_postgresql.pdb" from the ZIP file and place it next to your script/in the PWD so that the backtrace handler can find it. If all goes well, a crash should print something like this, which will let us debug the issue:
|
Config:
python=3.11.7
pandas=2.2.0
adbc-driver-manager=0.9.0
adbc-driver-postgresql=0.9.0
pyarrow=15.0.0
Program exits silently (no exceptions raised) on
adbc_driver_postgresql.dbapi.connect(uri)
.Debugging
The text was updated successfully, but these errors were encountered: