Bug 1734198 - g-i-s crashes if timedatex.service isn't running
Summary: g-i-s crashes if timedatex.service isn't running
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: gnome-initial-setup
Version: 31
Hardware: x86_64
OS: Linux
unspecified
high
Target Milestone: ---
Assignee: Rui Matos
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: openqa
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2019-07-29 23:36 UTC by Adam Williamson
Modified: 2019-08-17 13:01 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Bugzilla 1735584 None NEW retire timedatex in F31+ 2019-08-18 08:56:01 UTC

Description Adam Williamson 2019-07-29 23:36:28 UTC
In current Fedora Rawhide (Fedora-Rawhide-20190729.n.0), Workstation live installs boot to a broken state (just a desktop background, no meaningful interaction possible). This is because gnome-initial-setup should run, but is crashing instead. Looking at the backtrace, it seems it crashed because it couldn't talk to timedated:

Thread 1 (Thread 0x7f869b9d5600 (LWP 1336)):
#0  _g_log_abort (breakpoint=1) at ../glib/gmessages.c:554
        debugger_present = 1
#1  0x00007f86a5a372b9 in g_log_default_handler (log_domain=log_domain@entry=0x0, log_level=log_level@entry=6, message=message@entry=0x558a08668730 "Failed to create proxy for timedated: Error calling StartServiceByName for org.freedesktop.timedate1: Timeout was reached", unused_data=unused_data@entry=0x0) at ../glib/gmessages.c:3119
        fields = {{key = 0x7f86a5a87506 "GLIB_OLD_LOG_API", value = 0x7f86a5ae04e6, length = -1}, {key = 0x7f86a5a87441 "MESSAGE", value = 0x558a08668730, length = -1}, {key = 0x7f86a5a87454 "PRIORITY", value = 0x7f86a5a80f3a, length = -1}, {key = 0x558a06eec980 "\f", value = 0x558a08668730, length = 140216281579216}}
        n_fields = <optimized out>
#2  0x00007f86a5a374eb in g_logv (log_domain=0x0, log_level=G_LOG_LEVEL_ERROR, format=<optimized out>, args=args@entry=0x7ffca7ddf470) at ../glib/gmessages.c:1350
        domain = 0x0
        data = 0x0
        depth = 1
        log_func = 0x7f86a5a37200 <g_log_default_handler>
        domain_fatal_mask = <optimized out>
        masquerade_fatal = 0
        test_level = 6
        was_fatal = 0
        was_recursion = 0
        buffer = <optimized out>
        msg = 0x558a08668730 "Failed to create proxy for timedated: Error calling StartServiceByName for org.freedesktop.timedate1: Timeout was reached"
        msg_alloc = 0x558a08668730 "Failed to create proxy for timedated: Error calling StartServiceByName for org.freedesktop.timedate1: Timeout was reached"
        i = 2
        size = <optimized out>
#3  0x00007f86a5a376d3 in g_log (log_domain=log_domain@entry=0x0, log_level=log_level@entry=G_LOG_LEVEL_ERROR, format=format@entry=0x558a05191db8 "Failed to create proxy for timedated: %s") at ../glib/gmessages.c:1413
        args = {{gp_offset = 32, fp_offset = 48, overflow_arg_area = 0x7ffca7ddf550, reg_save_area = 0x7ffca7ddf490}}

g-i-s can't talk to timedated because it's not running because of an SELinux denial; I've filed that as https://bugzilla.redhat.com/show_bug.cgi?id=1734197 . But I'm also filing this as a separate bug as it seems wrong that g-i-s just flat out crashes when this happens, especially as the time/date screen isn't a critical one.

I'm proposing both bugs as Beta blockers for F31 Beta, as combined they produce a violation of "A system installed with a release-blocking desktop must boot to a log in screen where it is possible to log in to a working desktop using a user account created during installation or a 'first boot' utility" for the Workstation live install.

Comment 1 Adam Williamson 2019-07-29 23:38:40 UTC
https://gitlab.gnome.org/GNOME/gnome-initial-setup/blob/master/gnome-initial-setup/pages/timezone/gis-timezone-page.c#L383 is where the crash happens, BTW:

  priv->dtm = timedate1_proxy_new_for_bus_sync (G_BUS_TYPE_SYSTEM,
                                                G_DBUS_PROXY_FLAGS_NONE,
                                                "org.freedesktop.timedate1",
                                                "/org/freedesktop/timedate1",
                                                NULL,
                                                &error);
  if (priv->dtm == NULL) {
    g_error ("Failed to create proxy for timedated: %s", error->message);
    exit (1);
  }

Comment 2 Zbigniew Jędrzejewski-Szmek 2019-08-01 06:30:35 UTC
See also https://bugzilla.redhat.com/show_bug.cgi?id=1735584: taking timedatex out of the picture
might or might not help with this.

Comment 3 Michael Catanzaro 2019-08-04 00:06:07 UTC
FWIW I think it's reasonable for this to be fatal. Distros should skip the page if timedated won't be running at install time. And we should fix our timedated. :)

(In reply to Adam Williamson from comment #1)
>   if (priv->dtm == NULL) {
>     g_error ("Failed to create proxy for timedated: %s", error->message);
>     exit (1);
>   }

This is a little weird because the exit (1) is unreachable (because g_error() never returns).

Comment 4 Zbigniew Jędrzejewski-Szmek 2019-08-04 12:33:23 UTC
> FWIW I think it's reasonable for this to be fatal.

Please, no. There should be some resiliency in the system. If the dbus call fails, just show the error and continue.
Stuff like this happens, will happen in the future, and things must not just fall apart.

Comment 5 Michael Catanzaro 2019-08-04 14:41:55 UTC
Well this is the timezone configuration step in the initial setup wizard. It really cannot possibly work without timedated. Only reasonable behavior is to skip ahead to the next page and leave the system configured with the default timezone, but I think I'd much rather get a crash report instead.

Notably, this page will only run for the very first user account and will be skipped for any subsequently-created user accounts, so at this point there's nothing a user can have done to sabotage timedated.

Comment 6 Adam Williamson 2019-08-04 22:09:26 UTC
You don't just get a crash notification and the screen is skipped, though. The entire g-i-s does not run, and since you can't create a user account or root password during anaconda in workstation, that means the system is unusable.

Comment 7 Ben Cotton 2019-08-13 17:10:21 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to '31'.

Comment 8 Ben Cotton 2019-08-13 18:34:24 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 31 development cycle.
Changing version to 31.

Comment 9 Michael Catanzaro 2019-08-16 18:54:23 UTC
Anyway, surely this shouldn't be a blocker if it's been fixed by selinux.

(In reply to Adam Williamson from comment #6)
> You don't just get a crash notification and the screen is skipped, though.
> The entire g-i-s does not run, and since you can't create a user account or
> root password during anaconda in workstation, that means the system is
> unusable.

To be clear: my position is that this is desired behavior and no g-i-s change is required. The crash is intentional SIGABRT with a nice error message, not a programming mistake

Comment 10 Adam Williamson 2019-08-16 20:13:11 UTC
"Anyway, surely this shouldn't be a blocker if it's been fixed by selinux."

Yeah, it doesn't need to be one any more.

Comment 11 Adam Williamson 2019-08-16 20:14:27 UTC
"The crash is intentional SIGABRT with a nice error message, not a programming mistake"

From the perspective of the app, fine. From the perspective of the system the app is embedded in...not really. The 'nice error message' is not visible and is impossible to find unless you happened to hack in a root user before rebooting from the installer, or you take the trouble to reboot back to the installer or some other bootable environment and chroot into the broken installed system or something.

Comment 12 Zbigniew Jędrzejewski-Szmek 2019-08-17 13:01:32 UTC
Yep, that's just bad user experience. Let's consider a similar case: if I stop NetworkManager, and navigate to the network settings panel, I get a message "Oops, something went wrong. NetworkManager is not running." (from memory, so probably not exactly like that). It would be great if g-i-s could behave like this too.


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