This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author xxm
Recipients xxm
Date 2021-01-31.05:26:55
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
The following code recursively calls function test_forkserver(). However, the output is not expected RecursionError(recursively calling) or OSError(too many open files). An unexpected EOFError ( inside module multiprocessing, not this code itself) is reported. According to the error message, Python interpreter seems to behavior abnormal on line 1, "import multiprocessing". I try other cases in my machine, multiprocessing module can work well. Only this case will crash module multiprocessing.
import multiprocessing
import os

def do(i):
      print(test_forkserver(), os.getpid())

def test_forkserver():
      mp = multiprocessing.get_context('forkserver')
      mp.Pool(2).map(do(mp), range(3))
if __name__ == '__main__':

Attached output:
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/python3.10/lib/python3.10/multiprocessing/", line 258, in main
    fds = reduction.recvfds(s, MAXFDS_TO_SEND + 1)
  File "/usr/local/python3.10/lib/python3.10/multiprocessing/", line 159, in recvfds
    raise EOFError

System Info:
>>uname -a
Linux xxm 5.4.0-65-generic #73-Ubuntu SMP Mon Jan 18 17:25:17 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux

>>python -V
Python 3.10.0a4
Date User Action Args
2021-01-31 05:26:56xxmsetrecipients: + xxm
2021-01-31 05:26:56xxmsetmessageid: <>
2021-01-31 05:26:56xxmlinkissue43081 messages
2021-01-31 05:26:55xxmcreate