/var/log/messages timezone are always UTC |
||
Issue descriptionChrome OS Version: 11125.0.0 Chrome OS Platform: All Steps To Reproduce: (1) tail /var/log/messages Expected Result: Timestamps use local timezone, like: 2018-10-04T17:38:10.981685-06:00 INFO kernel: [26065.017611] PM: suspend entry (deep) Actual Result: Timestamps always use UTC, like: 2018-10-05T02:43:43.690667+00:00 INFO kernel: [ 0.000000] KERNEL supported cpus: How frequently does this problem reproduce? (Always, sometimes, hard to reproduce?) Always. What is the impact to the user, and is there a workaround? If so, what is it? /var/log/messages timestamps can no longer be correlated against other logs in the system, e.g. by Android Bug Tool. A bisect shows this regression was introduced in R71-11108.0.0 by crrev.com/c/1248324. A fix has been uploaded as crrev.com/c/1270210.
,
Oct 10
The following revision refers to this bug: https://chromium.googlesource.com/chromiumos/platform2/+/69c44d560a6e7f3b21185dcb4d36542a298d5a23 commit 69c44d560a6e7f3b21185dcb4d36542a298d5a23 Author: Qijiang Fan <fqj@chromium.org> Date: Wed Oct 10 16:45:03 2018 mount /var/lib/timezone so rsyslogd can read correct timezone. In preload mode, libc read timezone earlier before the preload libarary locks everything down. But in static mode, rsyslogd is execve-ed after everything is locked down, while /etc/localtime symlinks to /var/lib/timezone/localtime. libc in rsyslogd needs to be able to read /var/lib/timezone/localtime to determine the correct timezone. This change alsl creates /var/lib/timezone directory in pre-start of syslog.conf, and update selinux policy to make sure timezone created by cros_init_scripts in cros_var_lib is labelled as cros_tz_data_file. BUG=b:117351818,b:116072767,b:80461815, chromium:893636 TEST=tail /var/log/messages and observes timezone Change-Id: I708c6ab65a79f6dcdd6751673e70b3ea88f4c6ed Reviewed-on: https://chromium-review.googlesource.com/1270210 Commit-Ready: Qijiang Fan <fqj@google.com> Tested-by: Qijiang Fan <fqj@google.com> Reviewed-by: Mike Frysinger <vapier@chromium.org> [modify] https://crrev.com/69c44d560a6e7f3b21185dcb4d36542a298d5a23/sepolicy/policy/chromeos/cros_init.te [modify] https://crrev.com/69c44d560a6e7f3b21185dcb4d36542a298d5a23/init/upstart/syslog.conf
,
Oct 12
|
||
►
Sign in to add a comment |
||
Comment 1 by vapier@chromium.org
, Oct 9