GNOME Bugzilla – Bug 623697
GParted crashes moving partitions when size is multiple of 16 MiB
Last modified: 2010-07-08 20:20:13 UTC
GParted will crash if moving a primary partition to the end of the disk device. This appears to happen only for partitions that are an exact multiple of 16 MiB in size. Other partition sizes do not exhibit this behaviour and the operation runs to successful completion. This crash was discovered using an MSDOS partition table, and the default alignment setting of "Align to MiB".
Further testing has revealed that the problem occurs when moving any partition that is an exact multiple of 16 MiB. I will update the title accordingly.
Created attachment 165377 [details] GParted 0.6.0 crash on 16MiB partition move Attached is a screen shot of a GParted progress update immediately just before GParted crashed. The screen shot was captured during a GDB debugging session and shows an action that should never occur. Specifically "copy 0.00 B using a block size of 0.00 B". This explains the following message shown in the debugger: Program received signal SIGFPE, Arithmetic exception. The progress update shown in the screen shot occurred immediately after the "copy 16.0 MiB using a block size of 1.00 MiB".
Further investigation shows that this bug would also have existed in previous GParted versions, but would be based on a block size of 65536 sectors. Versions prior to enhancing the optimal blocksize algorithm would have experienced the problem based on a block size of 32768 sectors. The likelihood of encountering this problem in previous versions is lessened because the above multiples of sector sizes would be less likely to be encountered since the default alignment was then "Round to cylinders".
A fix for this bug has been committed to the GNOME git repository for inclusion in the next release of GParted (0.6.1). The relevant git commit can be viewed at the following link: http://git.gnome.org/browse/gparted/commit/?id=e810b7f7f099a69a671be58ab7cd75475d55b57e
GParted 0.6.1, which includes this bug fix, was released on July 8, 2010. Closing this bug.