yahoo-eng-team team mailing list archive
-
yahoo-eng-team team
-
Mailing list archive
-
Message #96286
[Bug 2103413] Re: [SRU] Python3.13: Garbage collection due to attribute cache inlining
** Also affects: nova (Ubuntu Plucky)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Yahoo!
Engineering Team, which is subscribed to OpenStack Compute (nova).
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
Status in nova source package in Plucky:
Confirmed
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