This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients brett.cannon, vstinner
Date 2017-08-31.16:56:18
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1504198579.15.0.519448055701.issue31217@psf.upfronthosting.co.za>
In-reply-to
Content
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
---
History
Date User Action Args
2017-08-31 16:56:19vstinnersetrecipients: + vstinner, brett.cannon
2017-08-31 16:56:19vstinnersetmessageid: <1504198579.15.0.519448055701.issue31217@psf.upfronthosting.co.za>
2017-08-31 16:56:19vstinnerlinkissue31217 messages
2017-08-31 16:56:18vstinnercreate