This patch broke running "log" command when "crash --minimal" is
invoked for any vmcore. This is important because sometimes there is
a damaged vmcore and the log is enough to diagnose the problem.
It looks like this is the result of this code block where machdep->hz
== 0 and we divide by 0:
@@ -4936,6 +4939,15 @@ cmd_log(void)
if (argerrs)
cmd_usage(pc->curcmd, SYNOPSIS);
+ if (kt->boot_date.tv_sec == 0) {
+ ulonglong uptime_jiffies;
+ ulong uptime_sec;
+ get_uptime(NULL, &uptime_jiffies);
+ uptime_sec = (uptime_jiffies)/(ulonglong)machdep->hz;
+ kt->boot_date.tv_sec = kt->date.tv_sec - uptime_sec;
+ kt->boot_date.tv_nsec = 0;
+ }
+
I am not sure what the correct approach is here but wanted to report
this regression. Also wanted to ask whether this project has
considered any sort of CI tests to run on checkins.
Thanks.