Message301051
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
--- |
|
Date |
User |
Action |
Args |
2017-08-31 16:56:19 | vstinner | set | recipients:
+ vstinner, brett.cannon |
2017-08-31 16:56:19 | vstinner | set | messageid: <1504198579.15.0.519448055701.issue31217@psf.upfronthosting.co.za> |
2017-08-31 16:56:19 | vstinner | link | issue31217 messages |
2017-08-31 16:56:18 | vstinner | create | |
|