Public bug reported:
[ Impact ]
After update mutter 46.2-1ubuntu0.24.04.13, gnome-shell now fails to
build from source because of a build-time-test failure.
The mutter update included a patch that shuffles the monitor creation
logic. The new logic tries to check whether an output had already been
associated with a monitor:
if (meta_output_get_monitor (output))
continue;
In mutter 46.x it was considered an invalid usage of the API to try and
retrieve the monitor associated with an output before it had been set, and it
produces a warning.
The glib2 style of coding uses these warnings to effectively define
pre-conditions and invariants for API functions.
Such warnings are treated as fatal by gnome-shell tests.
We can simply allow `meta_output_get_monitor` to return NULL without
warning to accommodate the new monitor creation logic. See "Where
problems could occur" for an explanation of why this is safe to do.
[ Test Case A ]
1. Log-in to Ubuntu Desktop
2. Verify that journalctl does not contain:
gnome-shell[1678]: (../src/backends/meta-
output.c:142):meta_output_get_monitor: runtime check failed:
(priv->monitor)
[ Test Case B ]
1. Verify that the gnome-shell package passes all build-time tests and
is able to complete a build from source.
[ Where problems could occur ]
The patch technically modifies the mutter API, by relaxing the pre-
condition that meta_output_get_monitor() could never be called before
the object had been set.
However, this is safe to do because it doesn't actually change behaviour. It is
only at monitor construction time that we want to check whether or not we had
already assigned a monitor to a particular output; it is still true that after
construction a monitor will always have an output assigned.
All other users of this API expect that meta_output_get_monitor will never
return NULL and that promise is still honoured for them: it is just not made
explicit as a runtime invariant anymore.
Removing this warning may have the effect of complicating debugging if
some users of this API (internal or external) were using it incorrectly:
before this change it would have printed a warning, while now it does
not anymore.
** Affects: mutter (Ubuntu)
Importance: Undecided
Status: Fix Released
** Affects: mutter (Ubuntu Noble)
Importance: Critical
Assignee: Alessandro Astone (aleasto)
Status: In Progress
** Also affects: mutter (Ubuntu Noble)
Importance: Undecided
Status: New
** Changed in: mutter (Ubuntu)
Status: New => Fix Released
** Changed in: mutter (Ubuntu Noble)
Status: New => In Progress
** Changed in: mutter (Ubuntu Noble)
Importance: Undecided => Critical
** Changed in: mutter (Ubuntu Noble)
Assignee: (unassigned) => Alessandro Astone (aleasto)
** Changed in: mutter (Ubuntu Noble)
Milestone: None => noble-updates
** Description changed:
[ Impact ]
After update mutter 46.2-1ubuntu0.24.04.13, gnome-shell now fails to
build from source because of a build-time-test failure.
The mutter update included a patch that shuffles the monitor creation
logic. The new logic tries to check whether an output had already been
associated with a monitor:
- if (meta_output_get_monitor (output))
- continue;
+ if (meta_output_get_monitor (output))
+ continue;
In mutter 46.x it was considered an invalid usage of the API to try and
retrieve the monitor associated with an output before it had been set,
and it produces a warning. Such warning is treated as fatal by gnome-
shell tests.
We can simply allow `meta_output_get_monitor` to return NULL to
accommodate the new monitor creation logic. See "Where problems could
occur" for an explanation of why this is safe to do.
[ Test Case A ]
- 1. Log-in to Ubuntu Desktop
- 2. Verify that journalctl does not contain:
+ 1. Log-in to Ubuntu Desktop
+ 2. Verify that journalctl does not contain:
gnome-shell[1678]: (../src/backends/meta-
output.c:142):meta_output_get_monitor: runtime check failed:
(priv->monitor)
[ Test Case B ]
- 1. Verify that the gnome-shell package passes all build-time tests and
+ 1. Verify that the gnome-shell package passes all build-time tests and
is able to complete a build from source.
[ Where problems could occur ]
- The patch technically modifies the mutter API, by relaxing what was
- previously considered to be a runtime invariant that the
- meta_output_get_monitor getter could never be called before the object
- had been set, and thus it could never return NULL.
+ The patch technically modifies the mutter API, by relaxing the pre-
+ condition that meta_output_get_monitor() could never be called before
+ the object had been set.
- However, this is safe to do because it doesn't actually change behaviour. It
is only at monitor construction time that we want to check whether or not we
had already assigned a monitor to a particular output. The invariant is still
valid that after construction a monitor will always have an output assigned.
+ However, this is safe to do because it doesn't actually change behaviour. It
is only at monitor construction time that we want to check whether or not we
had already assigned a monitor to a particular output; it is still true that
after construction a monitor will always have an output assigned.
All other users of this API expect that meta_output_get_monitor will never
return NULL and that promise is still honoured for them: it is just not made
explicit as a runtime invariant anymore.
Removing this warning may have the effect of complicating debugging if
some users of this API (internal or external) were using it incorrectly:
before this change it would have printed a warning, while now it does
not anymore.
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2135115
Title:
gnome-shell FTBFS in noble
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mutter/+bug/2135115/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs