Bug 2254801 - pyanaconda.modules.common.errors.general.AnacondaError: 'utf-8' codec can't decode byte 0xff in position 102: invalid start byte
Summary: pyanaconda.modules.common.errors.general.AnacondaError: 'utf-8' codec can't d...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: rawhide
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: anaconda-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f50a399bff47277046d5a89c81f...
: 2256844 2278057 2279684 2284061 2292493 2308478 2321364 2322014 2327946 2359842 2363865 2363925 (view as bug list)
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2023-12-16 08:15 UTC by Ira Malinich
Modified: 2025-05-14 08:38 UTC (History)
18 users (show)

Fixed In Version: anaconda-43.17-1.fc43
Clone Of:
Environment:
Last Closed: 2025-05-14 07:50:40 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: anaconda-tb (3.37 MB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: backtrace (3.44 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: os_info (734 bytes, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: environ (574 bytes, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: journalctl (2.00 MB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: description (3.42 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: storage.log (729.98 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: packaging.log (20.03 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: program.log (16.50 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: nmcli_dev_list (2.31 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: lvm.log (571.81 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: anaconda.log (49.23 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: lsblk_output (4.17 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: dbus.log (3.90 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details
File: packaging.log (20.03 KB, text/plain)
2023-12-16 08:15 UTC, Ira Malinich
no flags Details

Description Ira Malinich 2023-12-16 08:15:12 UTC
Description of problem:
Attempting to install from Fedora 39 Workstation LiveUSB over an existing Fedora 38 Workstation system, reusing the /home directory and formatting the root, /boot, and /boot/efi filesystems on the existing disk.  Did not use blivet-gui or command-line tools to prepare the disks.

Disk contains the older LVM/ext4 standard Fedora configuration; original installation was Fedora 34 Workstation.

Version-Release number of selected component:
anaconda-core-39.32.6-2.fc39.x86_64


The following was filed automatically by anaconda:
anaconda 39.32.6 exception report
Traceback (most recent call first):
  File "/usr/lib/python3.12/site-packages/dasbus/client/handler.py", line 509, in _handle_method_error
    raise exception from None
  File "/usr/lib/python3.12/site-packages/dasbus/client/handler.py", line 483, in _get_method_reply
    return self._handle_method_error(error)
  File "/usr/lib/python3.12/site-packages/dasbus/client/handler.py", line 450, in _call_method
    return self._get_method_reply(
  File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/__init__.py", line 46, in sync_run_task
    task_proxy.Finish()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation.py", line 439, in run_install_bootloader
    sync_run_task(STORAGE.get_proxy(task))
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 246, in _run
    self._task_cb(*self._task_args, **self._task_kwargs)
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 75, in start
    self._run()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 188, in _run
    item.start()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 75, in start
    self._run()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 188, in _run
    item.start()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 75, in start
    self._run()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 188, in _run
    item.start()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation_tasks.py", line 75, in start
    self._run()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation.py", line 515, in _run_installation
    queue.start()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/installation.py", line 80, in run
    self._run_installation(
  File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/task.py", line 107, in _task_run_callback
    self._set_result(self.run())
  File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/task.py", line 94, in _thread_run_callback
    self._task_run_callback()
  File "/usr/lib64/python3.12/threading.py", line 989, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.12/site-packages/pyanaconda/core/threads.py", line 280, in run
    threading.Thread.run(self)
  File "/usr/lib64/python3.12/site-packages/pyanaconda/core/threads.py", line 171, in raise_if_error
    raise exc_info[1]
  File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/task.py", line 173, in finish
    thread_manager.raise_if_error(self._thread_name)
  File "/usr/lib64/python3.12/site-packages/pyanaconda/ui/gui/spokes/installation_progress.py", line 75, in _on_installation_done
    self._task.finish()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/core/signal.py", line 41, in emit
    func(obj, *args, **kargs)
  File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/runnable.py", line 115, in _task_stopped_callback
    self._stopped_signal.emit()
  File "/usr/lib64/python3.12/site-packages/pyanaconda/core/async_utils.py", line 68, in _idle_method
    func(*args, **kwargs)
pyanaconda.modules.common.errors.general.AnacondaError: 'utf-8' codec can't decode byte 0xff in position 102: invalid start byte

Additional info:
cmdline:        /usr/bin/python3  /sbin/anaconda --liveinst --graphical
executable:     /sbin/anaconda
hashmarkername: anaconda
product:        Fedora
package:        anaconda-core-39.32.6-2.fc39.x86_64
reason:         pyanaconda.modules.common.errors.general.AnacondaError: 'utf-8' codec can't decode byte 0xff in position 102: invalid start byte
type:           anaconda
release:        Fedora release 39 (Thirty Nine)
cmdline_file:   BOOT_IMAGE=/images/pxeboot/vmlinuz root=live:CDLABEL=Fedora-WS-Live-39-1-5 rd.live.image quiet rhgb
addons:         com_redhat_kdump
kernel:         6.5.6-300.fc39.x86_64
version:        39
other involved packages: anaconda-gui-39.32.6-2.fc39.x86_64, python3-dasbus-1.7-4.fc39.noarch, python3-libs-3.12.0-1.fc39.x86_64

Comment 1 Ira Malinich 2023-12-16 08:15:15 UTC
Created attachment 2004515 [details]
File: anaconda-tb

Comment 2 Ira Malinich 2023-12-16 08:15:16 UTC
Created attachment 2004516 [details]
File: backtrace

Comment 3 Ira Malinich 2023-12-16 08:15:18 UTC
Created attachment 2004517 [details]
File: os_info

Comment 4 Ira Malinich 2023-12-16 08:15:19 UTC
Created attachment 2004518 [details]
File: environ

Comment 5 Ira Malinich 2023-12-16 08:15:21 UTC
Created attachment 2004519 [details]
File: journalctl

Comment 6 Ira Malinich 2023-12-16 08:15:23 UTC
Created attachment 2004520 [details]
File: description

Comment 7 Ira Malinich 2023-12-16 08:15:24 UTC
Created attachment 2004521 [details]
File: storage.log

Comment 8 Ira Malinich 2023-12-16 08:15:26 UTC
Created attachment 2004522 [details]
File: packaging.log

Comment 9 Ira Malinich 2023-12-16 08:15:27 UTC
Created attachment 2004523 [details]
File: program.log

Comment 10 Ira Malinich 2023-12-16 08:15:29 UTC
Created attachment 2004524 [details]
File: nmcli_dev_list

Comment 11 Ira Malinich 2023-12-16 08:15:30 UTC
Created attachment 2004525 [details]
File: lvm.log

Comment 12 Ira Malinich 2023-12-16 08:15:32 UTC
Created attachment 2004526 [details]
File: anaconda.log

Comment 13 Ira Malinich 2023-12-16 08:15:33 UTC
Created attachment 2004527 [details]
File: lsblk_output

Comment 14 Ira Malinich 2023-12-16 08:15:35 UTC
Created attachment 2004528 [details]
File: dbus.log

Comment 15 Ira Malinich 2023-12-16 08:15:36 UTC
Created attachment 2004529 [details]
File: packaging.log

Comment 16 Aoife Moloney 2024-11-13 10:16:47 UTC
This message is a reminder that Fedora Linux 39 is nearing its end of life.
Fedora will stop maintaining and issuing updates for Fedora Linux 39 on 2024-11-26.
It is Fedora's policy to close all bug reports from releases that are no longer
maintained. At that time this bug will be closed as EOL if it remains open with a
'version' of '39'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, change the 'version' 
to a later Fedora Linux version. Note that the version field may be hidden.
Click the "Show advanced fields" button if you do not see it.

Thank you for reporting this issue and we are sorry that we were not 
able to fix it before Fedora Linux 39 is end of life. If you would still like 
to see this bug fixed and are able to reproduce it against a later version 
of Fedora Linux, you are encouraged to change the 'version' to a later version
prior to this bug being closed.

Comment 17 Martin Kolman 2024-11-27 13:29:01 UTC
Looks like the output from efibootmgr contains some non-UTF-8 characters & Anaconda can't really handle that:

Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]: INFO:anaconda.core.threads:Thread Failed: AnaTaskThread-InstallBootloaderTask-1 (139741458593472)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]: ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-InstallBootloaderTask-1 has failed: Traceback (most recent call last):
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/core/threads.py", line 280, in run
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     threading.Thread.run(self)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/threading.py", line 989, in run
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     self._target(*self._args, **self._kwargs)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/task.py", line 94, in _thread_run_callback
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     self._task_run_callback()
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/common/task/task.py", line 107, in _task_run_callback
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     self._set_result(self.run())
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:                      ^^^^^^^^^^
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/installation.py", line 139, in run
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     install_boot_loader(storage=self._storage)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/utils.py", line 215, in install_boot_loader
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     storage.bootloader.write()
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/efi.py", line 134, in write
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     self.install()
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/efi.py", line 143, in install
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     self.remove_efi_boot_target()
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/efi.py", line 105, in remove_efi_boot_target
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     buf = self.efibootmgr(capture=True)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/modules/storage/bootloader/efi.py", line 74, in efibootmgr
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     return exec_func("efibootmgr", list(args), **kwargs)
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/core/util.py", line 372, in execWithCapture
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     return _run_program(argv, stdin=stdin, root=root, log_output=log_output,
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:   File "/usr/lib64/python3.12/site-packages/pyanaconda/core/util.py", line 295, in _run_program
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:     output_string = output_string.decode("utf-8")
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]:                     ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Dec 16 00:59:31 localhost-live org.fedoraproject.Anaconda.Modules.Storage[2870]: UnicodeDecodeError: 'utf-8' codec can't decode byte 0xff in position 102: invalid start byte


Looks like at this stage we just call efibootmgr to list whats present on the system & the data it returns contains a non-UTF-8 character. IIRC this is not the first time we have seen this. I guess the question is who should do the input sanitation, efibootmgr itself or does Anaconda need to somehow make sure to survive if the strings returned by efibootmgr are not valid UTF-8 ?

Comment 18 Martin Kolman 2024-11-27 13:41:35 UTC
*** Bug 2256844 has been marked as a duplicate of this bug. ***

Comment 19 Katerina Koukiou 2024-12-11 15:31:00 UTC
*** Bug 2321364 has been marked as a duplicate of this bug. ***

Comment 20 Katerina Koukiou 2024-12-11 15:32:30 UTC
*** Bug 2322014 has been marked as a duplicate of this bug. ***

Comment 21 Katerina Koukiou 2024-12-11 15:35:55 UTC
*** Bug 2327946 has been marked as a duplicate of this bug. ***

Comment 22 Katerina Koukiou 2024-12-11 15:38:57 UTC
*** Bug 2278057 has been marked as a duplicate of this bug. ***

Comment 23 Katerina Koukiou 2024-12-11 15:39:37 UTC
*** Bug 2279684 has been marked as a duplicate of this bug. ***

Comment 24 Katerina Koukiou 2024-12-11 15:40:27 UTC
*** Bug 2284061 has been marked as a duplicate of this bug. ***

Comment 25 Katerina Koukiou 2024-12-11 15:40:58 UTC
*** Bug 2308478 has been marked as a duplicate of this bug. ***

Comment 26 Katerina Koukiou 2024-12-19 14:44:00 UTC
This should be fixed on efibootmgr side to not print invalid utf-8, but we can introduce a temporary fix in anaconda till this is properly resolved: https://github.com/rhinstaller/anaconda/pull/6060

Possible fix on the efibootmgr side is: https://github.com/rhboot/efibootmgr/pull/221/

Comment 27 Aoife Moloney 2025-02-26 12:54:44 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 42 development cycle.
Changing version to 42.

Comment 28 Katerina Koukiou 2025-04-16 12:18:51 UTC
We still see this, we probably missed something in the 6060 anaconda PR.

Comment 29 Katerina Koukiou 2025-04-16 12:19:13 UTC
*** Bug 2292493 has been marked as a duplicate of this bug. ***

Comment 30 Katerina Koukiou 2025-04-30 06:15:41 UTC
*** Bug 2359842 has been marked as a duplicate of this bug. ***

Comment 31 Katerina Koukiou 2025-05-14 07:51:36 UTC
This should be fixed by:

commit f3720e73172cc77844cb5c760f5b5b09bd57a812
Author: Katerina Koukiou <k.koukiou>
Date:   Wed Apr 16 14:26:57 2025 +0200

    pyanaconda: storage: efi: never try to decode utf8 when calling efibootmgr

Comment 32 Katerina Koukiou 2025-05-14 08:37:36 UTC
*** Bug 2363865 has been marked as a duplicate of this bug. ***

Comment 33 Katerina Koukiou 2025-05-14 08:38:57 UTC
*** Bug 2363925 has been marked as a duplicate of this bug. ***


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