[Bug 2103413] Re: Python3.13: Garbage collection happens too early on greenthread switches
Guillaume Boutry
2103413 at bugs.launchpad.net
Mon Aug 11 07:53:28 UTC 2025
** Description changed:
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] Traceback (most recent call last):
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 2648, in _build_and_run_instance
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] self.driver.spawn(context, instance, image_meta,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] injected_files, admin_password,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] allocs, network_info=network_info,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] block_device_info=block_device_info,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] accel_info=accel_info)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/virt/libvirt/driver.py", line 4832, in spawn
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] xml = self._get_guest_xml(context, instance, network_info,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] disk_info, image_meta,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] block_device_info=block_device_info,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] mdevs=mdevs, accel_info=accel_info)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/virt/libvirt/driver.py", line 7997, in _get_guest_xml
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] network_info_str = str(network_info)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/model.py", line 622, in __str__
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self._sync_wrapper(fn, *args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/model.py", line 605, in _sync_wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] self.wait()
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/model.py", line 637, in wait
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] self[:] = self._gt.wait()
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/eventlet/greenthread.py", line 232, in wait
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self._exit_event.wait()
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~~~~~^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/eventlet/event.py", line 131, in wait
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] current.throw(*self._exc)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/eventlet/greenthread.py", line 272, in main
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] result = function(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/utils.py", line 663, in context_wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return func(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 2018, in _allocate_network_async
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] raise e
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/compute/manager.py", line 1996, in _allocate_network_async
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] nwinfo = self.network_api.allocate_for_instance(
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] context, instance,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ...<3 lines>...
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] resource_provider_mapping=resource_provider_mapping,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] network_arqs=network_arqs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 1287, in allocate_for_instance
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] nw_info = self.get_instance_nw_info(
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] context, instance, networks=ordered_nets,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] port_ids=ordered_port_ids,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] admin_client=admin_client,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] preexisting_port_ids=preexisting_port_ids)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 2047, in get_instance_nw_info
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] result = self._get_instance_nw_info(context, instance, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 2073, in _get_instance_nw_info
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] nw_info = self._build_network_info_model(context, instance, networks,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] port_ids, admin_client,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] preexisting_port_ids,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] refresh_vif_id,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] force_refresh=force_refresh)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 3496, in _build_network_info_model
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] data = client.list_ports(**search_opts)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 196, in wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ret = obj(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 815, in list_ports
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self.list('ports', self.ports_path, retrieve_all,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] **_params)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 196, in wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ret = obj(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 372, in list
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] for r in self._pagination(collection, path, **params):
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 387, in _pagination
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] res = self.get(path, params=params)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 196, in wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ret = obj(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 356, in get
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self.retry_request("GET", action, body=body,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] headers=headers, params=params)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 196, in wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ret = obj(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 333, in retry_request
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self.do_request(method, action, body=body,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] headers=headers, params=params)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/nova/network/neutron.py", line 196, in wrapper
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ret = obj(*args, **kwargs)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/v2_0/client.py", line 284, in do_request
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] resp, replybody = self.httpclient.do_request(action, method, body=body,
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] headers=headers)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/client.py", line 341, in do_request
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] self._check_uri_length(url)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~~~~~~^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/client.py", line 334, in _check_uri_length
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] uri_len = len(self.endpoint_url) + len(url)
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/neutronclient/client.py", line 348, in endpoint_url
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] return self.get_endpoint()
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ~~~~~~~~~~~~~~~~~^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] File "/usr/lib/python3/dist-packages/keystoneauth1/adapter.py", line 330, in get_endpoint
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] if self.endpoint_override:
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] ^^^^^^^^^^^^^^^^^^^^^^
- 2025-03-17 11:08:00.390 38463 ERROR nova.compute.manager [instance: 5c6786d9-15c5-414f-990f-eff2bf9f4d1f] AttributeError: 'SessionClient' object has no attribute 'endpoint_override'
+ [ Impact ]
+ * Nova's neutron client wrapper fails under Python 3.13 due to a
+ garbage collection bug in CPython that causes dictionary references to
+ be prematurely cleared when one object's __dict__ is assigned to another
+ object's __dict__. This completely prevents users from being able to
+ spawn virtual VMs (or do other communication to Neutron that span
+ multiple cpu cycles), which is the main purpose of Nova.
- This using Plucky Proposed - 25.04
- nova-compute: 3:30.0.0+git2025030311.e6b8b051a9-0ubuntu1
+ * This bug fix stops ClientWrapper from inheriting clientv20.Client and
+ directly referencing the base_client's __dict__. This allows
+ ClientWrapper to act as a true proxy for clientv20.Client while
+ preventing the cache inlining bug that leads to garbage collection.
- This nova compute version is a snapshot of current master branch from
- the Nova project, RC1 will soon be available:
- https://review.opendev.org/c/openstack/releases/+/943941
+ [ Test Plan ]
- This happens during testing with Tempest, in tests such as:
- tempest.scenario.test_network_basic_ops.TestNetworkBasicOps.test_network_basic_ops
+ * With a configured Nova, spawn a VM.
+ To simplify testing, I've written a configuration script to help create a single node OpenStack cloud as VM: https://pastebin.ubuntu.com/p/JkHXBmKBbm/
- Nova should successfully create a VM
+ [ Where problems could occur ]
- Nova failed to communicate with neutron because of an attribute error
+ * The change modifies how the ClientWrapper class accesses attributes
+ from the underlying neutron client. If the __getattr__ implementation
+ doesn't properly handle all attribute types or edge cases, it could
+ result in AttributeError exceptions or unexpected behavior when
+ accessing client methods or properties.
- I've tested the same version of Nova using the Epoxy Cloud archive from
- proposed, and it worked correctly.
+ * Since this changes the inheritance model (from inheritance to
+ composition), any code that relies on isinstance() checks against
+ clientv20.Client for the wrapper would fail.
+
+ [ Other Info ]
+
+ * This patch comes directly from upstream Nova and has been back-ported
+ upstream to stable/2025.1, commit
+ bdf62d0653c2e31ae291fc51e7016407b19f6ff4.
+
+ * The fix specifically addresses Python 3.13 compatibility. The
+ behavior is correct on Python 3.12 and earlier versions, but Python 3.13
+ exhibits the dictionary clearing issue.
+
+ Previous comment:
+ https://bugs.launchpad.net/ubuntu/+source/nova/+bug/2103413/comments/0
** Summary changed:
- Python3.13: Garbage collection happens too early on greenthread switches
+ [SRU] Python3.13: Garbage collection happens too early on greenthread switches
** Summary changed:
- [SRU] Python3.13: Garbage collection happens too early on greenthread switches
+ [SRU] Python3.13: Garbage collection due to attribute cache inlining
--
You received this bug notification because you are a member of Ubuntu
OpenStack, which is subscribed to nova in Ubuntu.
https://bugs.launchpad.net/bugs/2103413
Title:
[SRU] Python3.13: Garbage collection due to attribute cache inlining
Status in OpenStack Compute (nova):
Fix Released
Status in Release Notes for Ubuntu:
Fix Released
Status in nova package in Ubuntu:
Fix Released
Bug description:
[ Impact ]
* Nova's neutron client wrapper fails under Python 3.13 due to a
garbage collection bug in CPython that causes dictionary references to
be prematurely cleared when one object's __dict__ is assigned to
another object's __dict__. This completely prevents users from being
able to spawn virtual VMs (or do other communication to Neutron that
span multiple cpu cycles), which is the main purpose of Nova.
* This bug fix stops ClientWrapper from inheriting clientv20.Client
and directly referencing the base_client's __dict__. This allows
ClientWrapper to act as a true proxy for clientv20.Client while
preventing the cache inlining bug that leads to garbage collection.
[ Test Plan ]
* With a configured Nova, spawn a VM.
To simplify testing, I've written a configuration script to help create a single node OpenStack cloud as VM: https://pastebin.ubuntu.com/p/JkHXBmKBbm/
[ Where problems could occur ]
* The change modifies how the ClientWrapper class accesses attributes
from the underlying neutron client. If the __getattr__ implementation
doesn't properly handle all attribute types or edge cases, it could
result in AttributeError exceptions or unexpected behavior when
accessing client methods or properties.
* Since this changes the inheritance model (from inheritance to
composition), any code that relies on isinstance() checks against
clientv20.Client for the wrapper would fail.
[ Other Info ]
* This patch comes directly from upstream Nova and has been back-
ported upstream to stable/2025.1, commit
bdf62d0653c2e31ae291fc51e7016407b19f6ff4.
* The fix specifically addresses Python 3.13 compatibility. The
behavior is correct on Python 3.12 and earlier versions, but Python
3.13 exhibits the dictionary clearing issue.
Previous comment:
https://bugs.launchpad.net/ubuntu/+source/nova/+bug/2103413/comments/0
To manage notifications about this bug go to:
https://bugs.launchpad.net/nova/+bug/2103413/+subscriptions
More information about the Ubuntu-openstack-bugs
mailing list