Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
reword NEWS
  • Loading branch information
gpshead committed Nov 9, 2024
commit 3f486f8c2a949040c8944b9308d4a114d684181e
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
Fixed the :mod:`multiprocessing` ``"forkserver"`` start method forkserver
process was to correctly inherit the parent's :data:`sys.path` during the
importing of :func:`multiprocessing.set_forkserver_preload` modules in the
same manner as :data:`sys.path` is configured when executing work items in
the worker processes.

This bug could cause some forkserver module preloading to silently fail to
be preloaded, leading to a performance degration in child processes due to
additional repeated work. It could also have led to a side effect of ``""``
still being in :data:`sys.path` during forkserver preload imports instead of
the absolute path of the directory that workers see.
process to correctly inherit the parent's :data:`sys.path` during the importing
of :func:`multiprocessing.set_forkserver_preload` modules in the same manner as
:data:`sys.path` is configured in workers before executing work items.

This bug caused some forkserver module preloading to silently fail to preload.
This manifested as a performance degration in child processes when the
`sys.path` was required due to additional repeated work in every worker.

It could also have a side effect of ``""`` remaining in :data:`sys.path` during
forkserver preload imports instead of the absolute path from :func:`os.getcwd`
at multiprocessing import time used in the worker ``sys.path``.

Potentially leading to incorrect imports from the wrong location during
preload. We are unaware of that actually happening. The issue was discovered
by someone observing unexpected preload performance gains.