systemd / systemd-bootchart

Boot performance graphing tool
GNU General Public License v2.0
53 stars 28 forks source link

systemd-bootchart is not generating an image when run from init on a slow system #2

Open ensonic opened 8 years ago

ensonic commented 8 years ago

This is a copy of systemd/systemd#656.

As a summary: I am trying to get a detailed report on a LEGO mindstorms EV3 running debian jessie. The system is quite slow (400MHz Arm9 and 64 Mb memory). The boot is quite busy.

sofar commented 8 years ago

from your earlier logs I caught this:

Jan 01 04:07:44 ev3dev kernel: Kernel command line: mem=64M console=ttyS1,115200n8 root=/dev/mmcblk0p2 rw rootwait splash init=/lib/systemd/systemd-bootchart
Jul 31 13:40:39 ev3dev systemd-bootchart[603]: Bootchart created: /run/log/bootchart-20150731-1340.svg

Most likely, it doesn't like starting 1-1-1970 and the subsequent time change, even though internally it mostly uses CLOCK_MONOTONIC.

ensonic commented 8 years ago

Thanks for pointing this out. I can check what can be done on the ev3 kernel (@dlech). In case you have ideas where bootchart is not using the monotonic clock yet, that'd be great too.

sofar commented 8 years ago

systemd-bootchart is only ever using the CLOCK_MONOTONIC clock, but it may not be reliable on your platform?

https://github.com/systemd/systemd-bootchart/blob/e6c5e467c4b593114a4cefa17ed10afd6def1d6e/src/store.c#L56

dlech commented 8 years ago

There are 2 things I have found that might help with the time change.

  1. https://packages.debian.org/jessie/fake-hwclock
  2. RTC_HCTOSYS=n in the kernel configuration

Also turning off NTP or disconnecting from the Internet while booting should keep the time from changing.

sofar commented 7 years ago

395d046511c4d08ba7b6ca6b9ec17db6f7c35715 could be related, and fix this issue.

gk4 commented 7 years ago

I'm using bootchart 2.3.2 and I'm experiencing the same behavior. Are there any workarounds or hints to debug the issue?