[
https://issues.apache.org/jira/browse/ARROW-2963?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Rok Mihevc updated ARROW-2963:
------------------------------
External issue URL: https://github.com/apache/arrow/issues/19326
> [Python] Deadlock during fork-join and use_threads=True
> -------------------------------------------------------
>
> Key: ARROW-2963
> URL: https://issues.apache.org/jira/browse/ARROW-2963
> Project: Apache Arrow
> Issue Type: Bug
> Components: Python
> Affects Versions: 0.10.0
> Environment: pandas==0.23.3
> pyarrow==0.10.0rc0
> Reporter: Marco Neumann
> Assignee: Antoine Pitrou
> Priority: Major
> Labels: pull-request-available
> Fix For: 0.10.0
>
> Time Spent: 1h 40m
> Remaining Estimate: 0h
>
> The following code passes:
> {noformat}
> import os
> import pandas as pd
> import pyarrow as pa
> df = pd.DataFrame({'x': [1]})
> table = pa.Table.from_pandas(df)
> df = table.to_pandas(use_threads=False)
> pid = os.fork()
> if pid != 0:
> os.waitpid(pid, 0)
> {noformat}
> but the following code will never finish (the {{waitpid}} calls blocks
> forever, seems that the child process is frozen):
> {noformat}
> import os
> import pandas as pd
> import pyarrow as pa
> df = pd.DataFrame({'x': [1]})
> table = pa.Table.from_pandas(df)
> df = table.to_pandas(use_threads=True)
> pid = os.fork()
> if pid != 0:
> os.waitpid(pid, 0)
> {noformat}
> (the only difference is {{use_threads=True}})
--
This message was sent by Atlassian Jira
(v8.20.10#820010)