Bug 2358888 - Occasional crash with "IndexError: list index out of range" on `return "" if not self.layouts_variants else self.layouts_variants[0]` in localed.py
Summary: Occasional crash with "IndexError: list index out of range" on `return "" if ...
Keywords:
Status: CLOSED DUPLICATE of bug 2357836
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 42
Hardware: All
OS: Linux
unspecified
urgent
Target Milestone: ---
Assignee: anaconda-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks: F42FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2025-04-10 15:52 UTC by Adam Williamson
Modified: 2025-04-10 16:03 UTC (History)
5 users (show)

Fixed In Version:
Clone Of:
Environment:
Last Closed: 2025-04-10 16:03:34 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Adam Williamson 2025-04-10 15:52:41 UTC
openQA is occasionally seeing Workstation live installs crash with this rather odd traceback:
```
WARNING:dasbus.server.handler:The call org.fedoraproject.Anaconda.Modules.Localization.GetCompositorSelectedLayout has failed with an exception:
Traceback (most recent call last):
  File "/usr/lib/python3.13/site-packages/dasbus/server/handler.py", line 455, in _method_callback
    result = self._handle_call(
        interface_name,
    ...<2 lines>...
        **additional_args
    )
  File "/usr/lib/python3.13/site-packages/dasbus/server/handler.py", line 265, in _handle_call
    return handler(*parameters, **additional_args)
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/localization_interface.py", line 299, in GetCompositorSelectedLayout
    return self.implementation.get_compositor_selected_layout()
           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/localization.py", line 417, in get_compositor_selected_layout
    return self.localed_compositor_wrapper.current_layout_variant
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.13/site-packages/pyanaconda/modules/localization/localed.py", line 320, in current_layout_variant
    return "" if not self.layouts_variants else self.layouts_variants[0]
                                                ~~~~~~~~~~~~~~~~~~~~~^^^
IndexError: list index out of range
```
I'm not sure how self.layouts_variants can be a truth-y list(? - the error message at least implies that it *is* a list), yet not have an element at zero. I'm going to investigate, though, cos it's intriguing!

We could probably fix this by turning it into a try/except block, but I'd love to know why it happens.

I think this is happening to about 1-2% of installs, it mixes in with https://bugzilla.redhat.com/show_bug.cgi?id=2358880 so it's hard to be totally sure of the proportion. Together they affect maybe 5% in openQA. I *think* this is webUI-specific - I can't find any case of it happening to a non-webUI install yet.

Proposing as a Final blocker as a conditional violation of "The installer must be able to complete an installation using any supported locally connected storage interface" and any other "install must complete" criterion, in the rare case that this bug happens, install fails.

Comment 1 Jiri Konecny 2025-04-10 16:03:34 UTC

*** This bug has been marked as a duplicate of bug 2357836 ***


Note You need to log in before you can comment on or make changes to this bug.