New submission from STINNER Victor: Example where the test hangs after at the 48th run: ---- [haypo@freebsd ~/prog/python/2.7]$ ./python -m test -F -m test.test_threading.ConditionTests.test_notify -v test_threading (...) 0:00:10 [ 47] test_threading test_notify (test.test_threading.ConditionTests) ... ok (...) 0:00:10 [ 48] test_threading test_notify (test.test_threading.ConditionTests) ... ----
It looks like a timing issue / race condition since the likehood of the bug seems to depend on the system load. Traceback using my watchdog: https://github.com/python/cpython/pull/2317 --- 0:00:57 [285] test_threading test_notify (test.test_threading.ConditionTests) ... *** STACKTRACE - START *** # ThreadID: 34391913984 File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 37, in task f() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 360, in f cond.wait() File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 340, in wait waiter.acquire() # ThreadID: 34392086528 File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 37, in task f() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 360, in f cond.wait() File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 340, in wait waiter.acquire() # ThreadID: 34384994304 File: "/usr/home/haypo/prog/python/2.7/Lib/runpy.py", line 174, in _run_module_as_main "__main__", fname, loader, pkg_name) File: "/usr/home/haypo/prog/python/2.7/Lib/runpy.py", line 72, in _run_code exec code in run_globals File: "/usr/home/haypo/prog/python/2.7/Lib/test/__main__.py", line 3, in <module> regrtest.main_in_temp_cwd() File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 2030, in main_in_temp_cwd main() File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 812, in main result = local_runtest() File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 798, in local_runtest testdir=testdir) File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 1007, in runtest return runtest_inner(test, verbose, quiet, huntrleaks, pgo, testdir) File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 1196, in runtest_inner indirect_test() File: "/usr/home/haypo/prog/python/2.7/Lib/test/test_threading.py", line 929, in test_main ThreadingExceptionTests, File: "/usr/home/haypo/prog/python/2.7/Lib/test/support/__init__.py", line 1571, in run_unittest _run_suite(suite) File: "/usr/home/haypo/prog/python/2.7/Lib/test/support/__init__.py", line 1530, in _run_suite result = runner.run(suite) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/runner.py", line 151, in run test(result) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/suite.py", line 70, in __call__ return self.run(*args, **kwds) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/suite.py", line 108, in run test(result) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/suite.py", line 70, in __call__ return self.run(*args, **kwds) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/suite.py", line 108, in run test(result) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/case.py", line 393, in __call__ return self.run(*args, **kwds) File: "/usr/home/haypo/prog/python/2.7/Lib/unittest/case.py", line 329, in run testMethod() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 401, in test_notify self._check_notify(cond) File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 384, in _check_notify _wait() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 16, in _wait time.sleep(0.01) # ThreadID: 34384996864 File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 774, in __bootstrap self.__bootstrap_inner() File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 801, in __bootstrap_inner self.run() File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 1971, in run self.dump_threads() File: "/usr/home/haypo/prog/python/2.7/Lib/test/regrtest.py", line 1997, in dump_threads self.dump_thread(stack) # ThreadID: 34392083968 File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 37, in task f() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 360, in f cond.wait() File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 340, in wait waiter.acquire() # ThreadID: 34392080128 File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 37, in task f() File: "/usr/home/haypo/prog/python/2.7/Lib/test/lock_tests.py", line 360, in f cond.wait() File: "/usr/home/haypo/prog/python/2.7/Lib/threading.py", line 340, in wait waiter.acquire() *** STACKTRACE - END *** --- ---------- components: Tests messages: 296591 nosy: haypo priority: normal severity: normal status: open title: [2.7] test_threading.ConditionTests.test_notify() hangs randomly on FreeBSD on Python 2.7 versions: Python 2.7 _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue30727> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com