| Summary: | drakdisk crashed (Illegal division by zero at /usr/lib/libDrakX/diskdrake/hd_gtk.pm line 343) | ||
|---|---|---|---|
| Product: | Mageia | Reporter: | Barry Jackson <zen25000> |
| Component: | RPM Packages | Assignee: | Pascal Terjan <pterjan> |
| Status: | RESOLVED INVALID | QA Contact: | |
| Severity: | normal | ||
| Priority: | Normal | CC: | marja11, thierry.vignaud |
| Version: | 5 | Keywords: | NEEDINFO |
| Target Milestone: | --- | ||
| Hardware: | x86_64 | ||
| OS: | Linux | ||
| Whiteboard: | |||
| Source RPM: | drakxtools-curses-16.103-1.mga5 | CVE: | |
| Status comment: | |||
|
Description
Barry Jackson
2016-06-22 18:38:47 CEST
Thierry Vignaud
2016-06-22 19:00:40 CEST
CC:
(none) =>
thierry.vignaud
Marja Van Waes
2016-06-23 08:47:44 CEST
CC:
(none) =>
marja11 Is there anything special? raid? lvm? Can you attach the the /tmp/fdisk.txt file resulting from running the following command as root: fdisk -l > /tmp/fdisk.txt Keywords:
(none) =>
NEEDINFO Reading the code:
my @parts = grep { $_->{size} > MB(2) || !isEmpty($_) } @all_parts;
my $ratio = $totalsectors ? ($width - @parts * $minwidth) / $totalsectors : 1;
my $i = 1;
while ($i < 30) {
$i++;
my $totalwidth = sum(map { $_->{size} * $ratio + $minwidth } @parts);
$totalwidth <= $width and last;
$ratio /= $totalwidth / $width * 1.1;
}
So either $width is 0 or $totalwidth is 0 and $width is < 0.
I guess if the window is too small ($width - @parts * $minwidth) could be negative with interesting effects. $minwidth is 16 so that would happen if the window is smaller than 16 pixels * number of partitions.
But still that would not be enough to get a 0, I believe that to get $totalwidth to get a 0 we need $ratio to be (- @parts * $minwidth) / sum(map { $_->{size} } @parts), so $width to be 0, and in this case we would have $totalwidth <= $width and last and not reach that line.
So we probably have $width is 0 and $totalwidth is not.
if ($w->{window}->get_window) {
my $windowwidth = $w->{window}->get_allocated_width;
$windowwidth = $::real_windowwidth if $windowwidth <= 1;
$width = $windowwidth - first(get_action_box_size()) - 25;
}
So $windowwidth is 25 + first(get_action_box_size())?
Sorry for the delay. I suspect this happened when an SSD failed. The date seems correct. The drive (128GB) suddenly was reporting only 32kB and it also crashed gparted when I tried to investigate. It has been returned under warranty, so I can't put it back to check anything more, so probably best to close as invalid. I am in the same Mga5 LIVE now and diskdrake is behaving perfectly with 4 conventional hard drives. Closing then Status:
NEW =>
RESOLVED |