Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
21 changes: 20 additions & 1 deletion service/lib/agama/storage/manager.rb
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,26 @@ def actions

probed = Y2Storage::StorageManager.instance.probed
staging = Y2Storage::StorageManager.instance.staging
ActionsGenerator.new(probed, staging).generate
# FIXME: This is a hot-fix to avoid segmentation fault in the actions, see
# https://github.com/openSUSE/agama/issues/1396.
#
# Source of the problem:
# * An actiongraph is generated from the target devicegraph.
# * The list of compound actions is recovered from the actiongraph.
# * No refrence to the actiongraph is kept, so the object is a candidate to be cleaned by
# the ruby GC.
# * Accessing to the generated actions raises a segmentation fault if the actiongraph was
# cleaned.
#
# There was a previous attempt of fixing the issue by keeping a reference to the
# actiongraph in the ActionsGenerator object. But that solution is not enough because
# the ActionGenerator object is also cleaned up.
#
# As a hot-fix, the generator is kept in an instance variable to avoid the GC to kill it.
# A better solution is needed, for example, by avoiding to store an instance of a compound
# action in the Action object.
@generator = ActionsGenerator.new(probed, staging)
@generator.generate
end

# Changes the service's locale
Expand Down
6 changes: 6 additions & 0 deletions service/package/rubygem-agama-yast.changes
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Thu Jun 27 08:36:13 UTC 2024 - José Iván López González <jlopez@suse.com>

- Avoid error in storage actions (hot-fix)
(gh#openSUSE/agama#1400).

-------------------------------------------------------------------
Wed Jun 26 13:54:28 UTC 2024 - José Iván López González <jlopez@suse.com>

Expand Down