Skip to content

Regression due to removal of quadratic behavior in node ID cache clearing (GH-142145) #142754

Closed

Description

@stefanor

Bug report

Bug description:

In Debian we are seeing test failures as a result of #142146.

====================  test with PYTHON 3.14 ==================
ninja: Entering directory `/build/reproducible-path/pyatspi-2.57.0/build-3.14'
[0/1] Running all tests
dbus-daemon[7409]: [session uid=994 pid=7409 pidfd=5] Activating service name='org.a11y.Bus' requested by ':1.1' (uid=994 pid=7417 comm="/build/reproducible-path/pyatspi-2.57.0/build-3.14" label="unconfined")

(process:7419): dconf-CRITICAL **: 15:22:46.259: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:7419): dconf-CRITICAL **: 15:22:46.260: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:7419): dconf-CRITICAL **: 15:22:46.260: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:7419): dconf-CRITICAL **: 15:22:46.260: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:7419): dconf-CRITICAL **: 15:22:46.260: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.

(process:7419): dconf-CRITICAL **: 15:22:46.260: unable to create directory '/sbuild-nonexistent/.cache/dconf': Permission denied.  dconf will not work properly.
dbus-daemon[7409]: [session uid=994 pid=7409 pidfd=5] Successfully activated service 'org.a11y.Bus'
dbus-daemon[7425]: Activating service name='org.a11y.atspi.Registry' requested by ':1.0' (uid=994 pid=7417 comm="/build/reproducible-path/pyatspi-2.57.0/build-3.14" label="unconfined")
dbus-daemon[7425]: Successfully activated service 'org.a11y.atspi.Registry'
SpiRegistry daemon is running with well-known name - org.a11y.atspi.Registry
pyatspi:pyatspi time out (After 300 seconds)
1/1 pyatspi:pyatspi TIMEOUT        300.10s   killed by signal 15 SIGTERM
>>> top_builddir=/build/reproducible-path/pyatspi-2.57.0/build-3.14 UBSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 ASAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1 top_srcdir=/build/reproducible-path/pyatspi-2.57.0 MESON_TEST_ITERATION=1 MALLOC_PERTURB_=187 MSAN_OPTIONS=halt_on_error=1:abort_on_error=1:print_summary=1:print_stacktrace=1 /build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/runtests.sh
――――――――――――――――――――――――――――――――――――― ✀  ―――――――――――――――――――――――――――――――――――――
stdout:
AT-SPI Received D-Bus name - test.atspi.R242

Unique D-Bus name is: :1.1
stderr:
Traceback (most recent call last):
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 81, in entry
    self._func(self)
    ~~~~~~~~~~^^^^^^
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/accessibletest.py", line 234, in test_tree
    _createNode(doc, root, doc)
    ~~~~~~~~~~~^^^^^^^^^^^^^^^^
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/accessibletest.py", line 44, in _createNode
    e.setAttributeNode(nameA)
    ~~~~~~~~~~~~~~~~~~^^^^^^^
  File "/usr/lib/python3.13/xml/dom/minidom.py", line 805, in setAttributeNode
    _set_attribute_node(self, attr)
    ~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
  File "/usr/lib/python3.13/xml/dom/minidom.py", line 950, in _set_attribute_node
    _clear_id_cache(element)
    ~~~~~~~~~~~~~~~^^^^^^^^^
  File "/usr/lib/python3.13/xml/dom/minidom.py", line 1551, in _clear_id_cache
    elif node.ownerDocument:
         ^^^^^^^^^^^^^^^^^^
AttributeError: 'xml.dom.minidom.Element' object has no attribute 'ownerDocument'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 118, in idle_handler
    step.run()
    ~~~~~~~~^^
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 59, in run
    self.entry()
    ~~~~~~~~~~^^
  File "/build/reproducible-path/pyatspi-2.57.0/tests/pyatspi/pasytest/Pasy.py", line 83, in entry
    self.fail(e.message)
              ^^^^^^^^^
AttributeError: 'AttributeError' object has no attribute 'message'
――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――――

The relevant code here: https://gitlab.gnome.org/GNOME/pyatspi2/-/blob/ad723fb9f0e7d6cb321b6e21f20038a81ed8f5f1/tests/pyatspi/accessibletest.py#L216-250

See: https://bugs.debian.org/1122875

Also: OnroerendErfgoed/skosprovider#155

CPython versions tested on:

CPython main branch

Operating systems tested on:

Linux

Linked PRs

Activity

  1. added
    stdlibStandard Library Python modules in the Lib/ directory
    on Dec 15, 2025
  2. jacobtylerwalls commented on Dec 15, 2025

    @jacobtylerwalls
    Contributor

    Related: #67624.

  3. changed the title [-]Regression from 142145[/-] [+]Regression due to removal of quadratic behavior in node ID cache clearing (GH-142146)[/+] on Dec 15, 2025
  4. picnixz commented on Dec 15, 2025

    @picnixz
    Member
  5. changed the title [-]Regression due to removal of quadratic behavior in node ID cache clearing (GH-142146)[/-] [+]Regression due to removal of quadratic behavior in node ID cache clearing (GH-142145)[/+] on Dec 15, 2025
  6. jacobtylerwalls commented on Dec 15, 2025

    @jacobtylerwalls
    Contributor

    See also the view in #49101 (comment) that this isn't valid usage.

  7. ZeroIntensity commented on Dec 15, 2025

    @ZeroIntensity
    Member

    See also the view in #49101 (comment) that this isn't valid usage.

    Apparently, a lot of people have been breaking this rule.

  8. zeckma-tech commented on Dec 16, 2025

    @zeckma-tech

    From Linux From Scratch (Beyond LFS), we observe this as well. Present in 3.13.11 and 3.14.2.

  9. encukou commented on Dec 16, 2025

    @encukou
    Member

    Apparently, a lot of people have been breaking this rule.

    I wonder if that means we should start supporting it. Sure, there's a docs note saying that if you call a constructor you're on your own, but it's... weird at best.

  10. added a commit that references this issue on Dec 16, 2025
  11. 9 remaining items

  12. added a commit that references this issue on Dec 22, 2025
  13. added 2 commits that reference this issue on Dec 22, 2025
  14. hugovk commented on Jan 4, 2026

    @hugovk
    Member

    A fix has been merged and backported to 3.13. Can we close this?

  15. added a commit that references this issue on Jan 7, 2026
  16. added 2 commits that reference this issue on Jan 25, 2026
  17. added a commit that references this issue on Mar 6, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.13only security fixes3.14bugs and security fixesrelease-blockerstdlibStandard Library Python modules in the Lib/ directorytopic-XMLtype-bugAn unexpected behavior, bug, or error

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions