STINNER Victor <vstin...@python.org> added the comment:

I remove Mark from the issue. I may open later a different issue for 
tb_frame.f_globals=None, but it's unrelated to this bug.

I can reproduce the issue with a small hack to make GC collections make likely:

diff --git a/Lib/site.py b/Lib/site.py
index 939893eb5e..4103792e84 100644
--- a/Lib/site.py
+++ b/Lib/site.py
@@ -672,3 +672,6 @@ def exists(path):
 
 if __name__ == '__main__':
     _script()
+
+import gc
+gc.set_threshold(5)


With this patch, it becomes trivial to reproduce the crash on Linux:

$ ./python -m test test_ssl -m test_ssl_cert_verify_error -v 
(...)
Fatal Python error: Segmentation fault

Current thread 0x00007fd0f72a8640 (most recent call first):
  File "/home/vstinner/python/3.10/Lib/traceback.py", line 132 in 
format_exception
  File "/home/vstinner/python/3.10/Lib/test/test_ssl.py", line 262 in 
handle_error
  File "/home/vstinner/python/3.10/Lib/test/test_ssl.py", line 2401 in wrap_conn
(...)

So the problem is that _ssl.SSLError type traverse function is NULL.

----------
nosy:  -Mark.Shannon

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

Reply via email to