Commit c476410
authored
The test could deadlock trying join on the worker processes due to a
combination of behaviors:
* The use of `assertReachesEventually` did not ensure that workers
actually woken.release() because the SyncManager's Semaphore does not
implement get_value.
* This mean that the test could finish and the variable "sleeping" would
got out of scope and be collected. This unregisters the proxy leading
to failures in the worker or possibly the manager.
* The subsequent call to `p.join()` during cleanUp therefore never
finished.
This takes two approaches to fix this:
1) Use woken.acquire() to ensure that the workers actually finish
calling woken.release()
2) At the end of the test, wait until the workers are finished, while `cond`,
`sleeping`, and `woken` are still valid.
1 parent 89df62c commit c476410
1 file changed
+12
-5
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1694 | 1694 | | |
1695 | 1695 | | |
1696 | 1696 | | |
| 1697 | + | |
1697 | 1698 | | |
1698 | 1699 | | |
1699 | 1700 | | |
1700 | 1701 | | |
1701 | 1702 | | |
1702 | | - | |
| 1703 | + | |
1703 | 1704 | | |
1704 | 1705 | | |
1705 | 1706 | | |
1706 | 1707 | | |
1707 | 1708 | | |
1708 | | - | |
| 1709 | + | |
1709 | 1710 | | |
1710 | 1711 | | |
1711 | 1712 | | |
| |||
1724 | 1725 | | |
1725 | 1726 | | |
1726 | 1727 | | |
1727 | | - | |
| 1728 | + | |
1728 | 1729 | | |
1729 | 1730 | | |
1730 | 1731 | | |
1731 | 1732 | | |
1732 | | - | |
| 1733 | + | |
1733 | 1734 | | |
1734 | 1735 | | |
1735 | 1736 | | |
| |||
1745 | 1746 | | |
1746 | 1747 | | |
1747 | 1748 | | |
1748 | | - | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
1749 | 1752 | | |
1750 | 1753 | | |
1751 | 1754 | | |
1752 | 1755 | | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1753 | 1760 | | |
1754 | 1761 | | |
1755 | 1762 | | |
| |||
0 commit comments