Bug 2131183 - Installer Crashes When Attempting to Reclaim Space
Summary: Installer Crashes When Attempting to Reclaim Space
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: anaconda
Version: 37
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Vendula Poncova
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: AcceptedBlocker
Depends On:
Blocks: F37FinalBlocker
TreeView+ depends on / blocked
 
Reported: 2022-09-30 08:17 UTC by seanmottles
Modified: 2022-10-10 14:22 UTC (History)
11 users (show)

Fixed In Version: anaconda-37.12.6-1.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-10-10 14:22:43 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)
installer log files (176.32 KB, application/gzip)
2022-09-30 08:17 UTC, seanmottles
no flags Details
previous installer log files (219.38 KB, application/gzip)
2022-09-30 12:22 UTC, seanmottles
no flags Details

Description seanmottles 2022-09-30 08:17:50 UTC
Created attachment 1915191 [details]
installer log files

Created attachment 1915191 [details]
installer log files

Description of problem:

Occasionally in the F37 nightly builds Anaconda will crash when attempting to reclaim space from the disk either when pressing the "reclaim space" button or when selecting the accordion entry of existing data on the custom partitioner. 

Version-Release number of selected component (if applicable):

Fedora-i3-Live-x86_64-37-20220929.n.0.iso
Fedora-Everything-netinst-x86_64-37-20220929.n.0.iso

How reproducible:

Hit or miss, maybe every 2 out of 3 attempts it will crash.

Steps to Reproduce:
1. Start installer with data on disk
2. Enter the partitioning section
3. Choose custom partitioning and try to reclaim space

Actual results:

Installer hangs for a moment and then the error prompt is shown

Expected results:

Installer is able to see and reclaim space from disks

Additional info:

qemu-system-x86_64
4GB of RAM
2 CPU

Comment 1 Kamil Páral 2022-09-30 09:59:10 UTC
From anaconda.log:

10:09:11,115 DBG ui.gui.spokes.custom_storage: Saving storage configuration...
10:09:12,145 DBG ui.gui.spokes.custom_storage: Checking storage configuration...
10:09:13,178 DBG exception: running handleException
10:09:13,181 CRT exception: Traceback (most recent call last):

  File "/usr/lib64/python3.11/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py", line 956, in on_back_clicked
    if not self._do_check():
           ^^^^^^^^^^^^^^^^

  File "/usr/lib64/python3.11/site-packages/pyanaconda/ui/gui/spokes/custom_storage.py", line 909, in _do_check
    report = apply_partitioning(
             ^^^^^^^^^^^^^^^^^^^

  File "/usr/lib64/python3.11/site-packages/pyanaconda/ui/lib/storage.py", line 329, in apply_partitioning
    sync_run_task(task_proxy)

  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/__init__.py", line 46, in sync_run_task
    task_proxy.Finish()

  File "/usr/lib/python3.11/site-packages/dasbus/client/handler.py", line 444, in _call_method
    return self._get_method_reply(
           ^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/dasbus/client/handler.py", line 477, in _get_method_reply
    return self._handle_method_error(error)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/usr/lib/python3.11/site-packages/dasbus/client/handler.py", line 497, in _handle_method_error
    raise exception from None

pyanaconda.modules.common.errors.general.AnacondaError: 'NoneType' object has no attribute 'type'





From storage.log:

DEBUG:anaconda.modules.storage.bootloader.base:Is sda a valid stage1 target device?
DEBUG:anaconda.modules.storage.bootloader.base:_is_valid_disklabel(sda) returning True
DEBUG:anaconda.modules.storage.bootloader.base:_is_valid_size(sda) returning True
DEBUG:anaconda.modules.storage.bootloader.base:_is_valid_location(sda) returning True
DEBUG:anaconda.modules.storage.bootloader.base:_is_valid_format(sda) returning True
DEBUG:anaconda.modules.storage.bootloader.base:is_valid_stage1_device(sda) returning True
INFO:anaconda.threading:Thread Failed: AnaTaskThread-StorageValidateTask-1 (139879147853504)
ERROR:anaconda.modules.common.task.task:Thread AnaTaskThread-StorageValidateTask-1 has failed: Traceback (most recent call last):
  File "/usr/lib64/python3.11/site-packages/pyanaconda/threading.py", line 275, in run
    threading.Thread.run(self)
  File "/usr/lib64/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task.py", line 96, in _thread_run_callback
    self._task_run_callback()
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task.py", line 109, in _task_run_callback
    self._set_result(self.run())
                     ^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 51, in run
    return self._validate_storage(self._storage)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 59, in _validate_storage
    result = storage_checker.check(storage)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/checker/utils.py", line 686, in check
    check(storage, constraints, result.add_error, result.add_warning)
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/checker/utils.py", line 213, in verify_gpt_biosboot
    for stage1, _stage2 in storage.bootloader.install_targets:
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/bootloader/grub2.py", line 392, in install_targets
    if self.stage2_device.type == "mdarray" and \
       ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'type'

INFO:anaconda.threading:Thread Done: AnaTaskThread-StorageValidateTask-1 (139879147853504)
WARNING:dasbus.server.handler:The call org.fedoraproject.Anaconda.Task.Finish has failed with an exception:
Traceback (most recent call last):
  File "/usr/lib/python3.11/site-packages/dasbus/server/handler.py", line 455, in _method_callback
    result = self._handle_call(
             ^^^^^^^^^^^^^^^^^^
  File "/usr/lib/python3.11/site-packages/dasbus/server/handler.py", line 265, in _handle_call
    return handler(*parameters, **additional_args)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task_interface.py", line 114, in Finish
    self.implementation.finish()
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task.py", line 175, in finish
    threadMgr.raise_if_error(self._thread_name)
  File "/usr/lib64/python3.11/site-packages/pyanaconda/threading.py", line 166, in raise_if_error
    raise exc_info[1]
  File "/usr/lib64/python3.11/site-packages/pyanaconda/threading.py", line 275, in run
    threading.Thread.run(self)
  File "/usr/lib64/python3.11/threading.py", line 975, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task.py", line 96, in _thread_run_callback
    self._task_run_callback()
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/common/task/task.py", line 109, in _task_run_callback
    self._set_result(self.run())
                     ^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 51, in run
    return self._validate_storage(self._storage)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/partitioning/validate.py", line 59, in _validate_storage
    result = storage_checker.check(storage)
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/checker/utils.py", line 686, in check
    check(storage, constraints, result.add_error, result.add_warning)
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/checker/utils.py", line 213, in verify_gpt_biosboot
    for stage1, _stage2 in storage.bootloader.install_targets:
                           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/lib64/python3.11/site-packages/pyanaconda/modules/storage/bootloader/grub2.py", line 392, in install_targets
    if self.stage2_device.type == "mdarray" and \
       ^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'type'

Comment 2 Kamil Páral 2022-09-30 10:40:21 UTC
Some extra info from Sean:

>> What is currently installed on the disk?
> a previous fedora testing install, 3 partitions: /dev/sda1 -> UEFI FAT, /dev/sda2 -> /boot, /dev/sda3 -> /
>> Fedora 37? Is the layout custom, or have you used the defaults? Also, is that VM BIOS or UEFI?
> Yep, Fedora 37. That install was UEFI, It was custom but "create standard partitions automatically" to have boot and root on ext4. The new installer fails on both legacy BIOS and UEFI
>> Since you have /dev/sda, it seems you're not using Virtio disks. What are you using?
> passing -hda to qemu, qcow2 disk image
> it's a small 10G disk

I'm unable to reproduce this problem. It seems to be a race condition, according to the original description. But it seems to be a genuine error, so I'm proposing it for a blocker discussion and I hope anaconda team can look into this.

Sean, please keep the VM around, don't overwrite it yet, thanks.

Comment 3 Geraldo Simião 2022-09-30 11:43:20 UTC
As said in the matrix room, Sean used Fedora-i3-Live-x86_64-37-20220929.n.0.iso as well as Fedora-Everything-netinst-x86_64-37-20220929.n.0.iso to try this install.
I tried to reproduce the bug without success with the same isos, as well as F37 KDE iso with updated anaconda (anaconda-37.12.5-1.fc37) in a virt-manager/qemu/kvm setup.
My installations ended as expected.

Comment 4 seanmottles 2022-09-30 11:51:17 UTC
Some additional info/corrections:

qemu is saying it's a raw disk image file (made it a couple weeks ago so couldn't remember. I usually make qcow2 format files out of muscle memory) and that write operations on block 0 will be restricted.

Running the installer when specifying raw format also crashes. Making a copy of the disk file and running the Debian 11 x86_64 iso installer in legacy BIOS mode without raw specified succeeds in detecting the existing data and reclaiming the space (Guided Partitioning -> Use entire disk), as well as completing the installation normally.

Here's my qemu command:
qemu-system-x86_64 -enable-kvm -m 4096 -smp 2 -hda ./vm.disk -cdrom ./Fedora-Everything-netinst-x86_64-37-20220929.n.0.iso -boot menu=on

Comment 5 seanmottles 2022-09-30 12:19:10 UTC
Another small update/correction:

Previous install was using Fedora-i3-Live-37_B-1-5 on legacy BIOS. Same qemu command just different cdrom choice.

I've attached the anaconda logs from the installation that exists on disk in case that's helpful.

Comment 6 seanmottles 2022-09-30 12:22:10 UTC
Created attachment 1915260 [details]
previous installer log files

Comment 7 Vendula Poncova 2022-10-03 13:35:44 UTC
Fixed in a pull request: https://github.com/rhinstaller/anaconda/pull/4359

Comment 8 Vendula Poncova 2022-10-03 14:52:40 UTC
How to reproduce the issue:

1. Enter the Installation Destination spoke.
2. Select some disks and choose the custom storage configuration.
3. Delete all mount points and devices on the Manual Partitioning screen.
4. Click Done.

Anaconda crashes with the same error as reported in this bug.

Comment 9 František Zatloukal 2022-10-03 17:08:26 UTC
Discussed during the 2022-10-03 blocker review meeting: [1]

The decision to classify this bug as an AcceptedBlocker was made:

"Any installer mechanism for resizing storage volumes must correctly attempt the requested operation."

[1] https://meetbot-raw.fedoraproject.org/fedora-blocker-review/2022-10-03/f37-blocker-review.2022-10-03-16.00.log.txt

Comment 10 Fedora Update System 2022-10-05 13:42:23 UTC
FEDORA-2022-2c9c1ebab5 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-2c9c1ebab5

Comment 11 Fedora Update System 2022-10-06 14:17:14 UTC
FEDORA-2022-2c9c1ebab5 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-2c9c1ebab5`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-2c9c1ebab5

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 12 Kamil Páral 2022-10-10 11:09:41 UTC
(In reply to Vendula Poncova from comment #8)
> How to reproduce the issue:
> 
> 1. Enter the Installation Destination spoke.
> 2. Select some disks and choose the custom storage configuration.
> 3. Delete all mount points and devices on the Manual Partitioning screen.
> 4. Click Done.
> 
> Anaconda crashes with the same error as reported in this bug.

This crash no longer happens with the updated anaconda. Also the installation completed fine.

Comment 13 Fedora Update System 2022-10-10 14:22:43 UTC
FEDORA-2022-2c9c1ebab5 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


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