GNU bug report logs - #23296
parted 3.2 (libparted) , mklabel sun, bug, sparc64

Previous Next

Package: parted;

Reported by: Anatoly Pugachev <matorola <at> gmail.com>

Date: Fri, 15 Apr 2016 15:40:01 UTC

Severity: normal

To reply to this bug, email your comments to 23296 AT debbugs.gnu.org.

Toggle the display of automated, internal messages from the tracker.

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to bug-parted <at> gnu.org:
bug#23296; Package parted. (Fri, 15 Apr 2016 15:40:01 GMT) Full text and rfc822 format available.

Acknowledgement sent to Anatoly Pugachev <matorola <at> gmail.com>:
New bug report received and forwarded. Copy sent to bug-parted <at> gnu.org. (Fri, 15 Apr 2016 15:40:01 GMT) Full text and rfc822 format available.

Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Anatoly Pugachev <matorola <at> gmail.com>
To: bug-parted <at> gnu.org
Cc: debian-sparc <debian-sparc <at> lists.debian.org>
Subject: parted 3.2 (libparted) , mklabel sun, bug, sparc64
Date: Fri, 15 Apr 2016 16:35:00 +0300
Hello!

I can't make sun partition table with parted over existing one on
debian sparc64 physical machine Sun SPARC T5120:


root <at> nvg5120:~# parted /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit co
(parted) print
Warning: The disk CHS geometry (17848,255,63) reported by the
operating system does not match the geometry stored on the disk label
(65535,16,273).
Ignore/Cancel? I
Model: SEAGATE ST914602SSUN146G (scsi)
Disk /dev/sda: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number  Start   End     Size    File system  Flags
 1      0.00B   16.1GB  16.1GB  sun-ufs      root
 2      16.1GB  33.3GB  17.2GB
 4      33.3GB  49.4GB  16.1GB  sun-ufs
 5      49.4GB  146GB   97.0GB  sun-ufs

(parted) unit s
(parted) print
Model: SEAGATE ST914602SSUN146G (scsi)
Disk /dev/sda: 286739329s
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number  Start      End         Size        File system  Flags
 1      0s         31458335s   31458336s   sun-ufs      root
 2      31458336s  65013311s   33554976s
 4      65013312s  96471647s   31458336s   sun-ufs
 5      96471648s  285837551s  189365904s  sun-ufs

(parted)
(parted) mklabel sun
Warning: The existing disk label on /dev/sda will be destroyed and all
data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Backtrace has 1 calls on stack:
  1: /lib/sparc64-linux-gnu/libparted.so.2(ped_assert+0x2c) [0xffff8001001344c4]

You found a bug in GNU Parted! Here's what you have to do:
....

Assertion (bios_geom->cylinders == (PedSector) (dev->length /
cyl_size)) at ../../../libparted/labels/sun.c:190 in function
sun_alloc() failed.

Aborted



PS: OS is Linux debian sid/unstable (kernel 4.5 , glibc 2.22) sparc64.




Information forwarded to bug-parted <at> gnu.org:
bug#23296; Package parted. (Mon, 18 Apr 2016 22:43:01 GMT) Full text and rfc822 format available.

Message #8 received at 23296 <at> debbugs.gnu.org (full text, mbox):

From: Phillip Susi <psusi <at> ubuntu.com>
To: Anatoly Pugachev <matorola <at> gmail.com>, 23296 <at> debbugs.gnu.org
Cc: debian-sparc <debian-sparc <at> lists.debian.org>
Subject: Re: bug#23296: parted 3.2 (libparted) , mklabel sun, bug, sparc64
Date: Mon, 18 Apr 2016 18:42:38 -0400
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

On 04/15/2016 09:35 AM, Anatoly Pugachev wrote:
> You found a bug in GNU Parted! Here's what you have to do: ....
> 
> Assertion (bios_geom->cylinders == (PedSector) (dev->length / 
> cyl_size)) at ../../../libparted/labels/sun.c:190 in function 
> sun_alloc() failed.

I don't know how the sun disklabel works, so it might blow up in a
shower of sparks, but you might try commenting out that assert and see
if it works.  See if you can manipulate the existing partition table
too, before creating a new one.



-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2

iQEcBAEBCgAGBQJXFWLeAAoJEBB5UWFcu6UWFm4H/39y6Ey5Kyztl3bTa9n8Rk33
P5f2ordS7lvi8hwW2rhWI6Ba5BxMdVjlOIHQ4F5LtNyox+iyMz/Z5ifNaS8jM2La
G7fz0qf8tuf803XzyaJgqBboHYyGeTvYmcS+IBgKIJExhmosS6VVQ5iTWfYsktoG
0p2D99VXA0w+fFyynM27MACT+Bo3/ktIyJ5V0y6KJU2YrKSCirUPrIPmxnZaK30Y
AqVca3d/K2lvmETnK5GGviaBzWty6eE1DF1tor/YrAzXgxTfKNMELEuvZmDlyZOM
yWJMNBiyFQKmuoK98FIRTdqQn+S4sKd4BlLD0qQmeCY7nSNag/u1/E+V+TsgGM0=
=dNCf
-----END PGP SIGNATURE-----




Information forwarded to bug-parted <at> gnu.org:
bug#23296; Package parted. (Tue, 26 Apr 2016 15:24:02 GMT) Full text and rfc822 format available.

Message #11 received at 23296 <at> debbugs.gnu.org (full text, mbox):

From: Anatoly Pugachev <matorola <at> gmail.com>
To: Phillip Susi <psusi <at> ubuntu.com>
Cc: 23296 <at> debbugs.gnu.org, debian-sparc <debian-sparc <at> lists.debian.org>
Subject: Re: bug#23296: parted 3.2 (libparted) , mklabel sun, bug, sparc64
Date: Tue, 26 Apr 2016 18:23:08 +0300
On Tue, Apr 19, 2016 at 1:42 AM, Phillip Susi <psusi <at> ubuntu.com> wrote:
> On 04/15/2016 09:35 AM, Anatoly Pugachev wrote:
>> You found a bug in GNU Parted! Here's what you have to do: ....
>>
>> Assertion (bios_geom->cylinders == (PedSector) (dev->length /
>> cyl_size)) at ../../../libparted/labels/sun.c:190 in function
>> sun_alloc() failed.
>
> I don't know how the sun disklabel works, so it might blow up in a
> shower of sparks, but you might try commenting out that assert and see
> if it works.  See if you can manipulate the existing partition table
> too, before creating a new one.

just tried to create a new partition and remove it after - works.

tried to compile parted.git , but it failed:

$ git clone git://git.savannah.gnu.org/parted.git
$ ./bootstrap
$ ./configure && make
...
make[4]: Entering directory '/home/mator/parted.git/libparted/labels'
  CC       aix.lo
aix.c: In function 'aix_label_magic_get':
aix.c:45:10: error: cast increases required alignment of target type
[-Werror=cast-align]
  return *(unsigned int *)label;
          ^
aix.c: In function 'aix_label_magic_set':
aix.c:51:3: error: cast increases required alignment of target type
[-Werror=cast-align]
  *(unsigned int *)label = magic_val;
   ^
cc1: all warnings being treated as errors
Makefile:1238: recipe for target 'aix.lo' failed
make[4]: *** [aix.lo] Error 1
make[4]: Leaving directory '/home/mator/parted.git/libparted/labels'
Makefile:1151: recipe for target 'all' failed
make[3]: *** [all] Error 2
...

mator <at> deb4g:~/parted.git$ gcc -v
Using built-in specs.
COLLECT_GCC=gcc
COLLECT_LTO_WRAPPER=/usr/lib/gcc/sparc64-linux-gnu/5/lto-wrapper
Target: sparc64-linux-gnu
Configured with: ../src/configure -v --with-pkgversion='Debian
5.3.1-13' --with-bugurl=file:///usr/share/doc/gcc-5/README.Bugs
--enable-languages=c,ada,c++,java,go,d,fortran,objc,obj-c++
--prefix=/usr --program-suffix=-5 --enable-shared
--enable-linker-build-id --libexecdir=/usr/lib
--without-included-gettext --enable-threads=posix --libdir=/usr/lib
--enable-nls --with-sysroot=/ --enable-clocale=gnu
--enable-libstdcxx-debug --enable-libstdcxx-time=yes
--with-default-libstdcxx-abi=new --enable-gnu-unique-object
--disable-libquadmath --enable-plugin --with-system-zlib
--disable-browser-plugin --enable-java-awt=gtk --enable-gtk-cairo
--with-java-home=/usr/lib/jvm/java-1.5.0-gcj-5-sparc64/jre
--enable-java-home
--with-jvm-root-dir=/usr/lib/jvm/java-1.5.0-gcj-5-sparc64
--with-jvm-jar-dir=/usr/lib/jvm-exports/java-1.5.0-gcj-5-sparc64
--with-arch-directory=sparc64
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar --enable-objc-gc
--enable-multiarch --enable-targets=all --with-long-double-128
--enable-multilib --enable-checking=release --build=sparc64-linux-gnu
--host=sparc64-linux-gnu --target=sparc64-linux-gnu
Thread model: posix
gcc version 5.3.1 20160323 (Debian 5.3.1-13)



the only way to compile parted for me , is to pass
--disable-gcc-warnings to configure.
Creating a new partition and removing it with git compiled parted works.

Commenting out PED_ASSERT at libparted/labels/sun.c , line 189 , and
compiling again, allow to create sun/gpt/msdos labels.

(after msdos label has been created)

(parted) p
Model: SEAGATE ST914602SSUN146G (scsi)
Disk /dev/sda: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos
Disk Flags:

Number  Start  End  Size  Type  File system  Flags

(parted) mklabel
New disk label type? Sun
Warning: The existing disk label on /dev/sda will be destroyed and all
data on this disk will be lost. Do you want to continue?
Yes/No? Yes
Warning: The disk has 562233 cylinders, which is greater than the
maximum of 65536.
(parted) p
Model: SEAGATE ST914602SSUN146G (scsi)
Disk /dev/sda: 147GB
Sector size (logical/physical): 512B/512B
Partition Table: sun
Disk Flags:

Number  Start  End  Size  File system  Flags

(parted)



Thanks for help.




This bug report was last modified 9 years and 51 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.