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

[Build Failure] RuntimeError: can't start new thread on Windows Hosts

    • Type: Icon: Build Failure Build Failure
    • Resolution: Unresolved
    • Priority: Icon: Unknown Unknown
    • None
    • Affects Version/s: None
    • Component/s: None
    • Labels:
      None
    • Python Drivers

      Name of Failure:

      test.test_discovery_and_monitoring.TestUnifiedAuthError.test_Reset_server_and_pool_after_AuthenticationFailure_error
      test.test_discovery_and_monitoring.TestUnifiedAuthMiscCommandError.test_Reset_server_and_pool_after_misc_command_error
      etc.

      Link to task:

      https://spruce.mongodb.com/task/mongo_python_driver_tests_windows_python_version_32_bit__platform~windows_64_vsMulti_small_auth_ssl~auth_ssl_python_version_windows_32~3.10_test_6.0_sharded_cluster_e8900ad9f48d7effe733b30c7aca176dad89fe66_24_04_24_11_27_06?execution=0&sortBy=STATUS&sortDir=ASC

      Context of when and why the failure occurred:

      First failing task was https://spruce.mongodb.com/version/mongo_python_driver_e37394d4029d61f72a02dc465fbfc9afe35a5701/tasks?sorts=STATUS%3AASC%3BBASE_STATUS%3ADESC on 26 March 24 for PYTHON-2723, but it seems unrelated.

      Stack trace:

       [2024/04/24 06:46:16.691] FAILURE: RuntimeError: can't start new thread ()
       [2024/04/24 06:46:16.691] self = <test.test_discovery_and_monitoring.TestUnifiedAuthShutdownError testMethod=test_Reset_server_and_pool_after_shutdown_error_during_authentication>
       [2024/04/24 06:46:16.691]     def test_case(self):
       [2024/04/24 06:46:16.691] >       self.run_scenario(spec)
       [2024/04/24 06:46:16.691] test\unified_format.py:1919: 
       [2024/04/24 06:46:16.691] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/04/24 06:46:16.691] test\unified_format.py:1863: in run_scenario
       [2024/04/24 06:46:16.691]     self._run_scenario(spec, uri)
       [2024/04/24 06:46:16.691] test\unified_format.py:1883: in _run_scenario
       [2024/04/24 06:46:16.691]     self.entity_map.create_entities_from_spec(self.TEST_SPEC.get("createEntities", []), uri=uri)
       [2024/04/24 06:46:16.691] test\unified_format.py:600: in create_entities_from_spec
       [2024/04/24 06:46:16.691]     self._create_entity(spec, uri=uri)
       [2024/04/24 06:46:16.691] test\unified_format.py:511: in _create_entity
       [2024/04/24 06:46:16.691]     client = rs_or_single_client(**kwargs)
       [2024/04/24 06:46:16.691] test\utils.py:630: in rs_or_single_client
       [2024/04/24 06:46:16.691]     return _mongo_client(h, p, **kwargs)
       [2024/04/24 06:46:16.691] test\utils.py:594: in _mongo_client
       [2024/04/24 06:46:16.691]     return MongoClient(uri, port, **client_options)
       [2024/04/24 06:46:16.691] pymongo\mongo_client.py:865: in __init__
       [2024/04/24 06:46:16.691]     self._init_background()
       [2024/04/24 06:46:16.691] pymongo\mongo_client.py:883: in _init_background
       [2024/04/24 06:46:16.691]     self._topology = Topology(self._topology_settings)
       [2024/04/24 06:46:16.691] pymongo\topology.py:172: in __init__
       [2024/04/24 06:46:16.691]     executor.open()
       [2024/04/24 06:46:16.691] pymongo\periodic_executor.py:98: in open
       [2024/04/24 06:46:16.691]     thread.start()
       [2024/04/24 06:46:16.691] _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
       [2024/04/24 06:46:16.691] self = <Thread(pymongo_events_thread, initial daemon)>
       [2024/04/24 06:46:16.691]     def start(self):
       [2024/04/24 06:46:16.691]         """Start the thread's activity.
       [2024/04/24 06:46:16.691]     
       [2024/04/24 06:46:16.691]         It must be called at most once per thread object. It arranges for the
       [2024/04/24 06:46:16.691]         object's run() method to be invoked in a separate thread of control.
       [2024/04/24 06:46:16.691]     
       [2024/04/24 06:46:16.691]         This method will raise a RuntimeError if called more than once on the
       [2024/04/24 06:46:16.691]         same thread object.
       [2024/04/24 06:46:16.691]     
       [2024/04/24 06:46:16.691]         """
       [2024/04/24 06:46:16.691]         if not self._initialized:
       [2024/04/24 06:46:16.691]             raise RuntimeError("thread.__init__() not called")
       [2024/04/24 06:46:16.691]     
       [2024/04/24 06:46:16.691]         if self._started.is_set():
       [2024/04/24 06:46:16.691]             raise RuntimeError("threads can only be started once")
       [2024/04/24 06:46:16.691]     
       [2024/04/24 06:46:16.691]         with _active_limbo_lock:
       [2024/04/24 06:46:16.691]             _limbo[self] = self
       [2024/04/24 06:46:16.691]         try:
       [2024/04/24 06:46:16.691] >           _start_new_thread(self._bootstrap, ())
       [2024/04/24 06:46:16.691] E           RuntimeError: can't start new thread
       [2024/04/24 06:46:16.691] C:\python\32\Python311\Lib\threading.py:957: RuntimeError
      

            Assignee:
            noah.stapp@mongodb.com Noah Stapp
            Reporter:
            steve.silvester@mongodb.com Steve Silvester
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: