Mark Ao <ilovecne...@gmail.com> added the comment:

I'm experiencing the same issue on Python 3.10.0 when I execute the code that 
uses concurrent.futures.ProcessPoolExecutor.

========
Exception in thread Thread-1:
Traceback (most recent call last):
  File "/usr/local/lib/python3.10/threading.py", line 1009, in _bootstrap_inner
    self.run()
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 317, in 
run
    result_item, is_broken, cause = self.wait_result_broken_or_wakeup()
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in 
wait_result_broken_or_wakeup
    worker_sentinels = [p.sentinel for p in self.processes.values()]
  File "/usr/local/lib/python3.10/concurrent/futures/process.py", line 376, in 
<listcomp>
PROCESSING DATAFRAME: AKAM
    worker_sentinels = [p.sentinel for p in self.processes.values()]
RuntimeError: dictionary changed size during iteration
========

I also tried to troubleshoot to find out the part that causes this exception, 
but the most difficult part is: it does not happen every time I execute my code 
that uses concurrent.futures.ProcessPoolExecutor. (Really like what Jakub 
mentioend earlier, it is like a coincidence.)

At the same time, I am also testing if the same thing happens on other versions 
like Python 3.8.8 (on Rocky Linux 8.5), but we would appreciate it if someone 
can tell if this is a bug or not? Or even anything we should improve on my own 
code? (if needed I can share the sample code, but honestly I do not think this 
is something wrong with my code, since as I mentioned: the exception is not 
happening every time I execute my code, so I suspect this might be a bug of 
Python 3.10.0)

(Since Jakub already reported it happens on Python 3.9, so I am not testing on 
3.9)

I would appreciate it if there is any update or info that can be shared.

Thank you!

----------
nosy: +markao

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue43498>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to