You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Check the bug
Before filling this bug report, please search if a similar issue already exists.
In this case, just add a comment on this existing issue.
#3091 mentions the same crash, but is not primarily about it.
Describe the bug
A clear and concise description of what the bug is.
After running fine for some hours, Glances consistently crashes with the following stack trace:
File "C:\Users\ryabtsev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\glances\processes.py", line 628, in update_list
return list_of_namedtuple_to_list_of_dict(processlist)
File "C:\Users\ryabtsev\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.13_qbz5n2kfra8p0\LocalCache\local-packages\Python313\site-packages\glances\globals.py", line 495, in list_of_namedtuple_to_list_of_dict
return [namedtuple_to_dict(d) for d in data]
^^^^^^^^^^^^^^^^^^^^^
File "/app/glances/globals.py", line 490, in namedtuple_to_dict
return {k: (v._asdict() if hasattr(v, '_asdict') else v) for k, v in data.items()}
^^^^^^^^^^^^
RuntimeError: dictionary changed size during iteration
To Reproduce
Steps to reproduce the behavior:
Start Glances with the following options '-w'
Wait X hours (X < 24)
See error
Expected behavior
Glances doesn't hit multithreading errors
Screenshots
N/A
Environement (please complete the following information)
Operating System (lsb_release -a or OS name/version): Windows 11 Pro 64-bit Build 26100
Additional context
Should a threading.Lock be used on these globals (https://docs.python.org/3/library/threading.html#lock-objects)? Alternatively, storing .keys() and accessing them with handling for when they are removed by another thread during iteration.
I have no idea if this works as intended but i.e.:
keys = list(data.keys()) # grab keys atomically
output = {}
for key in keys:
value = data.get(key, None)
if value is None:
continue
if hasattr(value, '_asdict'):
value = value._asdict()
output[key] = value
return output
Check the bug
Before filling this bug report, please search if a similar issue already exists.
In this case, just add a comment on this existing issue.
#3091 mentions the same crash, but is not primarily about it.
Describe the bug
A clear and concise description of what the bug is.
After running fine for some hours, Glances consistently crashes with the following stack trace:
To Reproduce
Steps to reproduce the behavior:
Expected behavior
Glances doesn't hit multithreading errors
Screenshots
N/A
Environement (please complete the following information)
.../glances.exe --issue
: https://pastebin.com/nPPcG8x0Additional context
Should a threading.Lock be used on these globals (https://docs.python.org/3/library/threading.html#lock-objects)? Alternatively, storing .keys() and accessing them with handling for when they are removed by another thread during iteration.
I have no idea if this works as intended but i.e.:
You can also pastebin:
The text was updated successfully, but these errors were encountered: