[New-bugs-announce] [issue44645] Python 3.10: Under some trivial circunstances, GIL not released
Jesús Cea Avión
report at bugs.python.org
Thu Jul 15 09:26:07 EDT 2021
New submission from Jesús Cea Avión <jcea at jcea.es>:
After https://github.com/python/cpython/pull/18334, a "while condition: pass" in a thread will preclude releasing the GIL, hanging the program with CPU at 100%.
Trivial to reproduce:
"""
#!/usr/bin/env python3.10
import threading
import time
def worker():
while cont:
pass
def main():
global cont
cont = True
t = threading.Thread(target=worker)
t.start()
time.sleep(1)
cont = False
t.join()
if __name__ == '__main__':
main()
"""
----------
keywords: 3.10regression
messages: 397549
nosy: Mark.Shannon, jcea, pablogsal
priority: release blocker
severity: normal
status: open
title: Python 3.10: Under some trivial circunstances, GIL not released
versions: Python 3.10
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue44645>
_______________________________________
More information about the New-bugs-announce
mailing list