Uploaded image for project: 'Python Driver'
  1. Python Driver
  2. PYTHON-1590

Transaction tests fail with RuntimeError: can't start new thread

    • Type: Icon: Bug Bug
    • Resolution: Fixed
    • Priority: Icon: Major - P3 Major - P3
    • 3.7
    • Affects Version/s: 3.7
    • Component/s: Tests
    • Labels:
      None

      The transaction tests open too many MongoClients. We should close each client at the end fo the test explicitly to avoid waiting for garbage collection.

       [2018/06/14 19:36:33.295] ======================================================================
       [2018/06/14 19:36:33.295] ERROR [0.000s]: test_transactions_run_command_run_command_with_default_read_preference (test_transactions.TestTransactions)
       [2018/06/14 19:36:33.295] ----------------------------------------------------------------------
       [2018/06/14 19:36:33.295] Traceback (most recent call last):
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\test\__init__.py", line 402, in wrap
       [2018/06/14 19:36:33.295]     return f(*args, **kwargs)
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\test\__init__.py", line 402, in wrap
       [2018/06/14 19:36:33.295]     return f(*args, **kwargs)
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\test\__init__.py", line 402, in wrap
       [2018/06/14 19:36:33.295]     return f(*args, **kwargs)
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\test\test_transactions.py", line 369, in run_scenario
       [2018/06/14 19:36:33.295]     write_concern_coll.drop()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\collection.py", line 1077, in drop
       [2018/06/14 19:36:33.295]     dbo.drop_collection(self.__name, session=session)
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\database.py", line 659, in drop_collection
       [2018/06/14 19:36:33.295]     with self.__client._socket_for_writes() as sock_info:
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\mongo_client.py", line 999, in _socket_for_writes
       [2018/06/14 19:36:33.295]     server = self._get_topology().select_server(writable_server_selector)
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\mongo_client.py", line 966, in _get_topology
       [2018/06/14 19:36:33.295]     self._topology.open()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\topology.py", line 155, in open
       [2018/06/14 19:36:33.295]     self._ensure_opened()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\topology.py", line 475, in _ensure_opened
       [2018/06/14 19:36:33.295]     server.open()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\server.py", line 45, in open
       [2018/06/14 19:36:33.295]     self._monitor.open()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\monitor.py", line 76, in open
       [2018/06/14 19:36:33.295]     self._executor.open()
       [2018/06/14 19:36:33.295]   File "C:\data\mci\197ac60919941348cb70092e1963ac8b\src\pymongo\periodic_executor.py", line 83, in open
       [2018/06/14 19:36:33.295]     thread.start()
       [2018/06/14 19:36:33.295]   File "C:\python\Python35\lib\threading.py", line 844, in start
       [2018/06/14 19:36:33.295]     _start_new_thread(self._bootstrap, ())
       [2018/06/14 19:36:33.295] RuntimeError: can't start new thread
      

            Assignee:
            shane.harvey@mongodb.com Shane Harvey
            Reporter:
            shane.harvey@mongodb.com Shane Harvey
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated:
              Resolved: