-
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
python/adbc_driver_flightsql: crash in concurrent usage #729
Comments
I think I've observed a crash like this without concurrent usage. @zeroshade should we perhaps just enable
It sounds like the cost is fairly minimal (some arithmetic per pointer conversion) all things considered. The original PR ( |
It's also not the concurrency itself that's the issue here (i.e. putting a lock around getting a new cursor doesn't change anything). |
I added some instrumentation to print out pointers in various places but all seem to be in an entirely different space than what Go is reporting as the problematic pointer. So it doesn't seem to be in the FFI bindings or in Arrow-Go, at least so far. |
The next step will be to try building pyarrow 10.0.1 and replicating the issue, then cherry-picking the patch from 11.0.0 that we think is the fix, and confirming that it is indeed the fix. |
Hmm, my locally-built copy of pyarrow 10.0.1 doesn't have this issue... |
Non-concurrent reproducer: import adbc_driver_flightsql.dbapi
import pyarrow
with adbc_driver_flightsql.dbapi.connect("grpc://localhost:12345") as conn:
cursors = []
while True:
cur = conn.cursor()
cursors.append(cur)
cur.execute("SELECT 1")
table = cur.fetch_arrow_table()
del table |
Independent connections aren't safe, either:
|
But they're OK on a single thread. |
|
Depends on apache/arrow#36670. Fixes #729.
Separately:
Then run this script:
The Go runtime should immediately crash:
Technically, the concurrent
conn.cursor()
call here is not allowed. But the crash seems to be unrelated to that; the crash won't occur if you comment outfetch_arrow_table
or replace it withfetchone
.It also won't happen if you have PyArrow 11, so it may be a regression in PyArrow and not something we should be concerned about.
The text was updated successfully, but these errors were encountered: