While testing new i586 isos for Mageia 6 sta2, stage2 is now fixed for packages installation step, we have now an error when coming summary stage. Clicking in "Next" button gives a "An error occurred Illegal division by zero" I was not able to go further... Missing package mentionned is there. Adding more screenshots
Created attachment 8759 [details] Installation screenshot
Created attachment 8760 [details] Installation screenshot
Created attachment 8761 [details] Installation screenshot
I can confirm the issue. Have now done the install twice and both had "An error occurred Illegal division by zero" error. Having done so before I could work-around the missing file|pkgs error and complete the installation. Am attaching the report.bug as 12_12b-report.bug. The "zero' error present at line 20283 * step "summary" failed with error: Illegal division by zero at /usr/lib/libDrakX/install/steps_gtk.pm line 658.
CC: (none) => cae
Created attachment 8763 [details] report.bug from zero error install.
Thanks for the log, I spent 1h installing on i586 in qemu but it succeeded to the end...
CC: (none) => pterjan
The line is: my $ratio = $total_size == 0 ? int64(0) : install::pkgs::size2time($current_total_size + $amount, $total_size) / install::pkgs::size2time($total_size, $total_size); So $total_size is not 0 but install::pkgs::size2time($total_size, $total_size) is 0.
Also for more context, it's about installing only one package so total_size should be its size, 198491: * '/usr/bin/curl' '-q' '--location-trusted' '-R' '-f' '--disable-epsv' '--connect-timeout' '60' '--anyauth' '--stderr' '-' '-O' 'http://mirrors.kernel.org/mageia/distrib/cauldron/i586/media/core/release/grub2-mageia-theme-2.02-0.git10463.4.mga6.noarch.rpm' * opening rpmdb (root=/mnt, write=1) * trans: scheduling update of grub2-mageia-theme-2.02-0.git10463.4.mga6.noarch (id=22764, file=/mnt/var/cache/urpmi/rpms/grub2-mageia-theme-2.02-0.git10463.4.mga6.noarch.rpm) * step "summary" took: 0:00:15 * step "summary" failed with error: Illegal division by zero at /usr/lib/libDrakX/install/steps_gtk.pm line 658. * error: Illegal division by zero at /usr/lib/libDrakX/install/steps_gtk.pm line 658.
CC: (none) => marja11Assignee: bugsquad => mageiatoolsSource RPM: (none) => drakx-installer-stage2
Code is: sub size2time { my ($x, $max) = @_; my $A = 7e-07; my $limit = min($max * 3 / 4, 9e8); if ($x < $limit) { $A * $x; } else { $x -= $limit; my $B = 6e-16; my $C = 15e-07; $B * $x ** 2 + $C * $x + $A * $limit; } } $x can not be < $x * 3 / 4 so the first case of the if can only be true if $x * 3/4 > 9e8, in which case the result can not be 0. So to return 0, we need both $x and $limit to be 0 (or maybe some negative value which would be added to a positive one due to ** 2 but that's unlikely to give exactly 0). $limit will only be 0 if $max is 0 but it can't be zero in: $total_size == 0 ? int64(0) : install::pkgs::size2time($current_total_size + $amount, $total_size) / install::pkgs::size2time($total_size, $total_size); So I have no idea... It really looks like $total_size == 0 is false despite it having a 0 value...
You might want to look at https://bugs.mageia.org/show_bug.cgi?id=19895 Thierry made several commits to resolve that bug, 2 of which were in steps_gtk.pm Maybe 1 of the commits made had an unintended consequence.
See Also: (none) => https://bugs.mageia.org/show_bug.cgi?id=19930
Ok so the following code prints 0 on i586 and 0.178643377450391 on x86_64: use diagnostics; use strict; use Math::Int64 ':native_if_available', 'int64'; sub min { my $n = shift; $_ < $n and $n = $_ foreach @_; $n } sub size2time { my ($x, $max) = @_; my $A = 7e-07; my $limit = min($max * 3 / 4, 9e8); if ($x < $limit) { $A * $x; } else { $x -= $limit; my $B = 6e-16; my $C = 15e-07; $B * $x ** 2 + $C * $x + $A * $limit; } } print size2time(int64(198491), int64(198491)); print "\n";
So multiplying $A, $B or $C by an int64 on i586 produces 0.
$ perl -e "use Math::Int64 ':native_if_available', 'int64'; print 0.5 * int64(4);" 0
Using $x = int64_to_number($x); and $limit = int64_to_number($limit); lead to the correct result but I wonder how many other such bugs there are, and I believe this will not be very correct for large installs...
commit d6b9de2d5c0d748a35287dae11950afbdb848b55 Author: Pascal Terjan <pterjan@...> Date: Tue Dec 13 23:49:20 2016 +0000 17.66 (should fix mga#19933 and mga#19930) --- Commit Link: http://gitweb.mageia.org/software/drakx/commit/?id=d6b9de2d5c0d748a35287dae11950afbdb848b55 Bug links: Mageia https://bugs.mageia.org/19933 https://bugs.mageia.org/19930
Thanks As soon as it makes it to mirrors I'll run a net install. I'll check with my usual install, no server lxde & xfce WM, and with a Huge install; games, all servers and all WMs. Will advise on outcomes.
Just ran 2 net installs using the i586 nonfree-boot.iso Normal-install 1769 pkgs 6536MB Install completed successfully and I rebooted to a working lxde desktop Huge-install 3803 pkgs 14196 MB Install completed successfully and I rebooted to a working xfce4 desktop The 'Time remaining' and 'Progress bar' were incorrect during both installs. Normal switched back and forth between 02:26 and 10 sec Huge switched back and forth between 03:18 and 10 sec For a moment each time 10 sec was displayed the 'Progress bar' showed as complete, at all other times it remained empty. To me as long as the iso will install the above is a minor issue that can be addressed in the Errata. If you agree this bug can now be closed as resolved.
The progress bar issue is already tracked in bug #19930
Status: NEW => RESOLVEDCC: (none) => thierry.vignaudResolution: (none) => FIXED