Description: adapt to new multiprocessing code Adapts the code to Python 3.14's change from fork to forkserver as the default multiprocessing start method, which causes ConnectionResetError when using multiprocessing.Manager() in certain environments (chroots, containers). Author: Sascha Steinbiss Last-Update: 2026-07-05 --- a/ariba/clusters.py +++ b/ariba/clusters.py @@ -462,14 +462,17 @@ # memory, and thus bypass the NFS issues. The counter is accesses infrequently # relative to computations, so the performance does not suffer. # default authkey in the manager will be some generated random-looking string - manager = multiprocessing.Manager() + # Use 'fork' context explicitly to avoid Python 3.14's default 'forkserver' which + # can cause ConnectionResetError in certain environments (e.g., chroot, containers) + ctx = multiprocessing.get_context('fork') + manager = ctx.Manager() remaining_clusters = manager.Value('l',len(cluster_list)) # manager.Value does not provide access to the internal RLock that we need for # implementing atomic -=, so we need to carry around a separate RLock object. remaining_clusters_lock = manager.RLock() try: if self.threads > 1: - self.pool = multiprocessing.Pool(self.threads) + self.pool = ctx.Pool(self.threads) cluster_list = self.pool.starmap(_run_cluster, zip(cluster_list, itertools.repeat(self.verbose), itertools.repeat(self.clean), itertools.repeat(self.fails_dir), itertools.repeat(remaining_clusters),itertools.repeat(remaining_clusters_lock))) # harvest the pool as soon as we no longer need it