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

Bug#602568: squeeze-di-beta1 installer: partman hang

I finally found the parted_servec.c into http://packages.debian.org/squeeze/partman-base . I think the problem is in the OPEN command path for /dev/sdb:

        log("command_open()");  <===  found in the log
        char *device;
        if (1 != iscanf("%as", &device))
                critical_error("Expected device name.");
        log("Request to open %s", device_name); <=== in the log
        if (device_opened(device_name)) {
                static char *only_ok[] = { "OK", NULL };
                log("Warning: the device is already opened");
                                 "The device is already opened.", only_ok);
        } else {
                set_device_named(device_name, ped_device_get(device));
        oprintf("OK\n"); <=== In the log too
        if (NULL != device_named(device_name)) {
                oprintf("OK\n"); <=== Last line from the log
        } else

So I now suspect that the function ped_disk_new() is where parted_server failed. But it's actually just a beat, not a proven fact.

I have see that in the install expert mode that parted can be loaded as a additional component, so I did and give it a try:

parted /dev/sda print
Model: ATA ST9250315AS (scsi)
Disk /dev/sda: 250GB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End     Size    Type      File system  Flags
 1      1049kB  54.5GB  54.5GB  primary   ntfs
 3      54.5GB  55.1GB  537MB   primary   ext3         boot
 4      55.1GB  250GB   195GB   extended
 5      55.1GB  109GB   53.7GB  logical   btrfs
 2      250GB   250GB   21.2MB  primary

Seem to be OK, despite the btrfs partition. Now with /dev/sdb:

parted /dev/sdb print

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

Don't panic! The bug has most likely not affected any of your data.
Help us to fix this bug by doing the following:

Check whether the bug has already been fixed by checking
the last version of GNU Parted that you can find at:


Please check this version prior to bug reporting.

If this has not been fixed yet or if you don't know how to check,
please visit the GNU Parted website:


for further information.

Your report should contain the version of this release (2.3)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and the following history of commands you entered.
Also include any additional information about your setup you
consider important.

Assertion (dev != NULL) at ../../libparted/cs/geom.c:78 in function
ped_geometry_new() failed.

Ah! It's now clear that this is the 5MB FAT12 partition on /dev/sdb that cause the problem. I think that the bug can now safely be assigned to either parted or libparted0-udeb.

Here is the offending code:

 * Create a new PedGeometry object on \p disk, starting at \p start with a
 * size of \p length sectors.
 * \return NULL on failure.
ped_geometry_new (const PedDevice* dev, PedSector start, PedSector length)
        PedGeometry*    geom;

        PED_ASSERT (dev != NULL, return NULL); <=== Abort here.

        geom = (PedGeometry*) ped_malloc (sizeof (PedGeometry));
        if (!geom)
                goto error;
        if (!ped_geometry_init (geom, dev, start, length))
                goto error_free_geom;
        return geom;

        free (geom);
        return NULL;

Obviously, this problem is not really into ped_geometry_new(), but into a previously executed code that should have created the const PedDevice* dev.

Now, is parted abort with a so clear assert message, this don't explain why parted_server can terminate without generating a comparable message, and why 30parted is unable to see that parted_server is not there anymore. So maybe some more bugs should be open to fix all of this.


Jean-Christian de Rivaz

Reply to: