Bug 64371 - systemd-analyze no longer shows firmware + loader times as of v203
Summary: systemd-analyze no longer shows firmware + loader times as of v203
Status: RESOLVED FIXED
Alias: None
Product: systemd
Classification: Unclassified
Component: general (show other bugs)
Version: unspecified
Hardware: x86-64 (AMD64) Linux (All)
: medium minor
Assignee: systemd-bugs
QA Contact: systemd-bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-05-08 21:42 UTC by Zach
Modified: 2013-05-30 09:25 UTC (History)
0 users

See Also:
i915 platform:
i915 features:


Attachments
Patch fixing efi timestamp bug (2.68 KB, patch)
2013-05-10 18:23 UTC, Zach
Details | Splinter Review
Patch fixing efi timestamp bug (2.70 KB, patch)
2013-05-13 20:05 UTC, Zach
Details | Splinter Review
Patch recording efi timestamps after /sys is mounted (2.92 KB, patch)
2013-05-13 21:41 UTC, Zach
Details | Splinter Review

Description Zach 2013-05-08 21:42:45 UTC
After a fresh boot it fails, but it works after a systemctl --system daemon-reexec


$ systemd-analyze
Startup finished in 307ms (kernel) + 1.378s (initrd) + 7.028s (userspace) = 8.714s
$ sudo systemctl --system daemon-reexec
$ systemd-analyze
Startup finished in 4.646s (firmware) + 101ms (loader) + 307ms (kernel) + 1.378s (initrd) + 7.028s (userspace) = 13.462s


Reverting commit c3a170f3d3358135a39ac6eafe66f18aef0bd67d seems to fix this, so I think the efi timestamp loading should be moved back to where it was, as earlier seems to not work for me.

Can anyone else reproduce this bug?
Comment 1 Zach 2013-05-10 18:23:00 UTC
Created attachment 79115 [details] [review]
Patch fixing efi timestamp bug
Comment 2 Zach 2013-05-13 20:05:57 UTC
Created attachment 79271 [details] [review]
Patch fixing efi timestamp bug

This is the same as the previous patch submitted, except it correctly uses spaces instead of tabs
Comment 3 Zach 2013-05-13 20:50:59 UTC
The source of this problem seems to be that c3a170f3 moved the call to efi_get_boot_timestamps to before /sys is mounted in main.c, and so it cannot always read the firmware and loader timestamps
Comment 4 Zach 2013-05-13 21:41:43 UTC
Created attachment 79273 [details] [review]
Patch recording efi timestamps after /sys is mounted

This patch has a better description than the previous ones
Comment 5 Zach 2013-05-21 18:40:51 UTC
The root cause is calling  efi_get_boot_timestamps (which reads from /sys/firmware/efi/efivars) before /sys/firmware/efi/efivars is mounted by systemd, so the read will fail on a fresh boot.
Comment 6 Zach 2013-05-29 14:32:53 UTC
Patch applied to latest git
Comment 7 Harald Hoyer 2013-05-30 09:25:56 UTC
Thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.