You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Bug: prepare() deadlocks while another thread scans a DataFrame on the same connection #85
This work was produced with the help of language models.
On the pybind backend (the default), Connection.prepare() hangs forever if another thread is running a query over a pandas DataFrame on the same connection. All Python threads stop, and the process has to be killed. create_arrow_table(), create_arrow_rel_table() and drop_arrow_table() hang the same way, and so do get_num_nodes(), get_num_rels() and get_all_edges_for_torch_geometric(), the native connection methods the torch-geometric store uses.
Expected: done after 5 seconds.
Actual: the process hangs and never prints done.
The script hangs on 0.21.2, 0.22.3 and 0.23.0; on 0.23.0 each of the other calls hangs in the same loop. With LBUG_PYTHON_BACKEND=capi the script finishes.
Cause: these bindings call into the connection while holding the GIL. The connection runs one statement at a time, so the call waits for the running scan, and the scan waits for the GIL to read the DataFrame. execute() and query() release the GIL before they call the engine; set_query_timeout() had the same problem in #63.
Activity