Bug 260997 - AutoInstall.install_everything is unsafe
Summary: AutoInstall.install_everything is unsafe
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: Tools / Tests (show other bugs)
Version: WebKit Nightly Build
Hardware: Unspecified Unspecified
: P2 Normal
Assignee: Sam Sneddon [:gsnedders]
URL:
Keywords: InRadar
Depends on:
Blocks: 261004
  Show dependency treegraph
 
Reported: 2023-08-31 15:01 PDT by Sam Sneddon [:gsnedders]
Modified: 2023-09-01 08:38 PDT (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Sam Sneddon [:gsnedders] 2023-08-31 15:01:38 PDT
INTERNALERROR>   File "/Volumes/gsnedders/projects/Safari/OpenSource/Tools/Scripts/libraries/resultsdbpy/.tox/py39/lib/python3.9/site-packages/webkitcorepy/autoinstall.py", line 642, in install_everything
INTERNALERROR>     for packages in cls.packages.values():
INTERNALERROR> RuntimeError: dictionary changed size during iteration

I believe this is caused by:

AutoInstall.register(Package('twisted', Version(21, 2, 0), pypi_name='Twisted', implicit_deps=[
    Package('incremental', Version(21, 3, 0)),
]))

…where the AutoInstaller will AutoInstall twisted, and then recurse into its implicit_deps, and it will then register incremental as it begins to install it—thus mutating the dict being iterated over.
Comment 1 Sam Sneddon [:gsnedders] 2023-08-31 18:01:58 PDT
Pull request: https://github.com/WebKit/WebKit/pull/17317
Comment 2 EWS 2023-09-01 08:37:56 PDT
Committed 267552@main (d94691e07a31): <https://commits.webkit.org/267552@main>

Reviewed commits have been landed. Closing PR #17317 and removing active labels.
Comment 3 Radar WebKit Bug Importer 2023-09-01 08:38:16 PDT
<rdar://problem/114822346>