Uploaded image for project: 'Apache Arrow'
  1. Apache Arrow
  2. ARROW-2963

[Python] Deadlock during fork-join and use_threads=True

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 0.10.0
    • 0.10.0
    • Python
    • pandas==0.23.3
      pyarrow==0.10.0rc0

    Description

      The following code passes:

      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)
      

      but the following code will never finish (the waitpid calls blocks forever, seems that the child process is frozen):

      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)
      

      (the only difference is use_threads=True)

      Attachments

        Issue Links

          Activity

            People

              apitrou Antoine Pitrou
              marco.neumann.by Marco Neumann
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 1h 40m
                  1h 40m