STINNER Victor added the comment:
Current status of my analysis. I'm able to reproduce the bug using this
modified Lib/test/test_sys.py:
---
import unittest, test.support
from test.support.script_helper import assert_python_ok
import threading
def f123():
pass
class SysModuleTest(unittest.TestCase):
def test_current_frames(self):
t = threading.Thread(target=f123)
t.start()
t.join()
---
And this shell script:
---
set -x
while true; do PYTHONHASHSEED=$RANDOM ./python -m test -R 3:3 -j1 test_sys -m
test_current_frames || break; done
---
With this command, when the test fail, it's possible to reproduce the bug 100%
of times using the written PYTHONHASHSEED. Example:
---
pydev@stormageddon ~/cpython $ ./bug.sh
++ true
++ PYTHONHASHSEED=23016
++ ./python -m test -R 3:3 -j1 test_sys -m test_current_frames
Run tests in parallel using 1 child processes
0:00:00 load avg: 0.15 [1/1] test_sys passed
beginning 6 repetitions
123456
......
1 test OK.
Total duration: 982 ms
Tests result: SUCCESS
++ true
++ PYTHONHASHSEED=9197
++ ./python -m test -R 3:3 -j1 test_sys -m test_current_frames
Run tests in parallel using 1 child processes
0:00:00 load avg: 0.22 [1/1/1] test_sys failed
beginning 6 repetitions
123456
......
test_sys leaked [1, 1, 1] memory blocks, sum=3
1 test failed:
test_sys
Total duration: 1000 ms
Tests result: FAILURE
++ break
pydev@stormageddon ~/cpython $ PYTHONHASHSEED=9197 ./python -m test -R 3:3 -j1
test_sys -m test_current_frames
Run tests in parallel using 1 child processes
0:00:00 load avg: 0.20 [1/1/1] test_sys failed
beginning 6 repetitions
123456
......
test_sys leaked [1, 1, 1] memory blocks, sum=3
1 test failed:
test_sys
Total duration: 987 ms
Tests result: FAILURE
---
----------
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue31217>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com