regression: crash --minimal "log" command spins at 100% cpu after c86250bce29f Introduction of the "log -T" option

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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.

--
Crash-utility mailing list
Crash-utility@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/crash-utility




[Index of Archives]     [Fedora Development]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [KDE Users]     [Fedora Tools]

 

Powered by Linux