git.net

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[jira] [Created] (ARROW-2963) [Python] Deadlock during fork-join and use_threads=True


Marco Neumann created ARROW-2963:
------------------------------------

             Summary: [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


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
(v7.6.3#76005)