You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@arrow.apache.org by "Antoine Pitrou (JIRA)" <ji...@apache.org> on 2018/08/02 15:24:00 UTC

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

    [ https://issues.apache.org/jira/browse/ARROW-2963?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16566940#comment-16566940 ] 

Antoine Pitrou commented on ARROW-2963:
---------------------------------------

Oh, right, I don't think our thread-pool is fork-safe.

> [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
>            Priority: Major
>
> 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)