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

2010-11-09 Thread Jean-Christian de Rivaz
In http://article.gmane.org/gmane.comp.gnu.parted.bugs/10180 Jim 
Meyering provided a patch that solve the problem. After verification, he 
commited it into git://git.debian.org/git/parted/parted.git:


commit 9f5b0608611eed40ef33be2096f5d482710602e5
Author: Jim Meyering meyer...@redhat.com
Date:   Tue Nov 9 10:25:36 2010 +0100

dos: fix a bug affecting very small devices (smaller than 1 cylinder)

This bug was introduced in commit c79d91ec, dos: accommodate very
small devices (useful for testing).
* libparted/labels/dos.c (_primary_constraint): The bug was to
skip setting start_geom for small devices.  That led to a used-
uninitialized bug in the subsequent ped_constraint_new call.
The fix is to relax the constraint to use a starting sector of 1,
if necessary.  Report and diagnosis by Jean-Christian de Rivaz in
http://thread.gmane.org/gmane.comp.gnu.parted.bugs/10178
* NEWS (Bug fixes): Mention it.

Many thanks to Jim for this patch. Debian installer should use this last 
revision to fix this problem.


It it worth noting that partman is still deficient in the way it handle 
a parted-server error. Improving it will certainly help to get better 
problem report from Debian users. I have see on the internet others 
installer report about hang at the same partman operation time.


Also, the debian/rules for parted still should be updated with my 
proposed patch to remove obsoletes directives.


So even if the primary cause is now fixed, from a quality view, this bug 
is still not in the state to be closed. Or should other bug be opened 
for those point ?


Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#602568: [Parted-maintainers] Bug#602568: squeeze-di-beta1 installer: partman hang

2010-11-09 Thread Otavio Salvador
Hello Jean-Christian,

On Tue, Nov 9, 2010 at 4:46 PM, Jean-Christian de Rivaz j...@eclis.ch wrote:
 In http://article.gmane.org/gmane.comp.gnu.parted.bugs/10180 Jim Meyering
 provided a patch that solve the problem. After verification, he commited it
 into git://git.debian.org/git/parted/parted.git:

 commit 9f5b0608611eed40ef33be2096f5d482710602e5
 Author: Jim Meyering meyer...@redhat.com
...
 Many thanks to Jim for this patch. Debian installer should use this last
 revision to fix this problem.

Thanks for Jim and you for handling this issue.

I talked to Colin today and he will take a look on this issue.

 It it worth noting that partman is still deficient in the way it handle a
 parted-server error. Improving it will certainly help to get better problem
 report from Debian users. I have see on the internet others installer report
 about hang at the same partman operation time.

 Also, the debian/rules for parted still should be updated with my proposed
 patch to remove obsoletes directives.

 So even if the primary cause is now fixed, from a quality view, this bug is
 still not in the state to be closed. Or should other bug be opened for those
 point ?

I agree. Colin will probably look at this while checking the patch
into parted's Debian package.

-- 
Otavio Salvador                  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-09 Thread Colin Watson
On Tue, Nov 09, 2010 at 07:46:37PM +0100, Jean-Christian de Rivaz wrote:
 So even if the primary cause is now fixed, from a quality view, this bug  
 is still not in the state to be closed. Or should other bug be opened  
 for those point ?

If you believe parted_server (which is in the partman-base package)
needs improvements, please clone this bug and reassign the clone to
partman-base.  Keeping this bug open for that would make tracking too
difficult.

-- 
Colin Watson   [cjwat...@debian.org]



-- 
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-09 Thread Jean-Christian de Rivaz

Colin Watson a écrit :

On Tue, Nov 09, 2010 at 07:46:37PM +0100, Jean-Christian de Rivaz wrote:
So even if the primary cause is now fixed, from a quality view, this bug  
is still not in the state to be closed. Or should other bug be opened  
for those point ?


If you believe parted_server (which is in the partman-base package)
needs improvements, please clone this bug and reassign the clone to
partman-base.  Keeping this bug open for that would make tracking too
difficult.



Ok. I can now reproduce the partman-base problem, using a specially 
created crash prone /lib/libparted.so.0.0.1 library. The parted-server, 
as expected, crash this way on the console it has been started from:


r...@point:/home/jcdr/partman-base-test# bin/parted_server
r...@point:/home/jcdr/partman-base-test# echo OPEN =dev=sdb /dev/sdb  
/var/lib/partman/infifo

r...@point:/home/jcdr/partman-base-test# Backtrace has 19 calls on stack:
  19: /lib/libparted.so.0(ped_assert+0x28) [0xb77bcea3]
  18: /lib/libparted.so.0(ped_geometry_new+0x5a) [0xb77c6909]
  17: /lib/libparted.so.0(ped_geometry_duplicate+0x73) [0xb77c69e2]
  16: /lib/libparted.so.0(ped_constraint_init+0x15e) [0xb77c7aae]
  15: /lib/libparted.so.0(ped_constraint_new+0x82) [0xb77c7b70]
  14: /lib/libparted.so.0(+0x4eef7) [0xb77feef7]
  13: /lib/libparted.so.0(+0x4f60c) [0xb77ff60c]
  12: /lib/libparted.so.0(+0x4fc78) [0xb77ffc78]
  11: /lib/libparted.so.0(+0x501e6) [0xb78001e6]
  10: /lib/libparted.so.0(+0x130ab) [0xb77c30ab]
  9: /lib/libparted.so.0(ped_disk_add_partition+0x15f) [0xb77c5896]
  8: /lib/libparted.so.0(+0x4d1e4) [0xb77fd1e4]
  7: /lib/libparted.so.0(+0x4d406) [0xb77fd406]
  6: /lib/libparted.so.0(ped_disk_new+0xd2) [0xb77c1bda]
  5: bin/parted_server() [0x805594d]
  4: bin/parted_server() [0x8055b4b]
  3: bin/parted_server() [0x805621b]
  2: /lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb7680c76]
  1: bin/parted_server() [0x804a101]

The /var/lib/partman/outfifo simply report:
OK
OK

And /var/log/partman say:

parted_server: === Starting the server
parted_server: main_loop: iteration 1
parted_server: Opening infifo
parted_server: Read command: OPEN
parted_server: command_open()
parted_server: Request to open =dev=sdb
parted_server: Opening outfifo
parted_server: OUT: OK


parted_server: OUT: OK


So I think it's not really parted_server the cause of the problem (is 
case of libparted problem), but more the script that started it and 
failed to observe that it crashed.


Still, this script probably in partman-base too.

But what do you say by clone this bug ?
* It there a procedure to do this ?
* Or it's a administrative option I don't have access to as a user ?
* Or I have to manually copy the report into a new one ?

Regards,

Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



Bug#602568: [Parted-maintainers] Bug#602568: squeeze-di-beta1 installer: partman hang

2010-11-09 Thread Otavio Salvador
 But what do you say by clone this bug ?
 * It there a procedure to do this ?
 * Or it's a administrative option I don't have access to as a user ?
 * Or I have to manually copy the report into a new one ?

Please read http://www.debian.org/Bugs/server-control

-- 
Otavio Salvador                  O.S. Systems
E-mail: ota...@ossystems.com.br  http://www.ossystems.com.br
Mobile: +55 53 9981-7854         http://projetos.ossystems.com.br



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-08 Thread Jean-Christian de Rivaz
It seem that the only maintained source archive for GNU parted is 
git://git.debian.org/git/parted/parted.git . Right ?


I managed to find that the bug was introduced by this commit:

commit c79d91ec71882a1673daae0482aa90c514c63cc1
Author: Jim Meyering meyer...@redhat.com
Date:   Tue Mar 30 16:50:59 2010 +0200

dos: accommodate very small devices (useful for testing)

* libparted/labels/dos.c (_primary_constraint): Don't pass a negative
device_length to ped_geometry_init when the underlying device
has fewer sectors than a cylinder.

diff --git a/libparted/labels/dos.c b/libparted/labels/dos.c
index 752f186..8679c49 100644
--- a/libparted/labels/dos.c
+++ b/libparted/labels/dos.c
@@ -1616,8 +1616,13 @@ _primary_constraint (const PedDisk* disk, const 
PedCHSGeometry* bios_geom,

dev-length - min_geom-end))
return NULL;
} else {
-   if (!ped_geometry_init (start_geom, dev, cylinder_size,
-   dev-length - cylinder_size))
+   /* Do not assume that length is larger than 1 cylinder's
+  worth of sectors.  This is useful when testing with
+  a memory-mapped disk (a la scsi_debug) that is say,
+  2048 sectors long.  */
+   if (cylinder_size  dev-length
+!ped_geometry_init (start_geom, dev, cylinder_size,
+  dev-length - cylinder_size))
return NULL;
if (!ped_geometry_init (end_geom, dev, 0, dev-length))
return NULL;


I posted a message on the bug-par...@gnu.org, but it seem that there is 
not a lot of developers on it, so I don't expect this will be handled 
anytime soon.


The only basic idea I have right now, is to add a -t option to force 
to not call ped_geometry_init (start_geom, ...) if cylinder_size  
dev-length when using parted with a memory-mapped device for testing 
purpose. There is maybe a better logic to handle all of that, but I 
don't know this code good enough to see it. Where can I find a test case 
with a memory-mapped device that needed this commit ?


Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-07 Thread Christian PERRIER
reassign 602568 parted
severity 602568 important
tags 602568 patch
thanks

Quoting Jean-Christian de Rivaz (j...@eclis.ch):
 Please find in attachment my current proposition of patch. It remove
 the  obsolete -fgnu89-inline and use the same flags for build-udeb
 than for build-deb to get the -O2 optimization.
 
 This work, but I still don't understand why the code fail without
 optimization.


THanks *a lot* for this very detailed analysis. It really seems that
your fix should make it into parted.

Otavio?




signature.asc
Description: Digital signature


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

2010-11-06 Thread Christian PERRIER
Quoting Jean-Christian de Rivaz (j...@eclis.ch):

 Unfortunately there is no /var/log/installer/ directory:

That dir exists on the installed system. As you couuldn't install, it
is indeed not there

 
 ls -al /var/log
 drwxr-xr-x2 root root 0 Nov  5 22:33 .
 drwxr-xr-x8 root root 0 Nov  5 22:23 ..
 -rw-r--r--1 root root 17172 Nov  5 22:33 hardware-summary
 lrwxrwxrwx1 root root44 Nov  5 22:33
 install-report.template -
 /usr/share/save-logs/install-report.template
 lrwxrwxrwx1 root root16 Nov  5 22:33 lsb-release
 - /etc/lsb-release
 -rw-r--r--1 root root   993 Nov  5 22:23 partman
 lrwxrwxrwx1 root root20 Nov  5 22:33 status -
 /var/lib/dpkg/status
 -rw-r--r--1 root root 71813 Nov  5 22:33 syslog


/var/log/partman is what Miguel wanted to mention.




signature.asc
Description: Digital signature


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

2010-11-06 Thread Jean-Christian de Rivaz

Christian PERRIER a écrit :

Quoting Jean-Christian de Rivaz (j...@eclis.ch):


Unfortunately there is no /var/log/installer/ directory:


That dir exists on the installed system. As you couuldn't install, it
is indeed not there


ls -al /var/log
drwxr-xr-x2 root root 0 Nov  5 22:33 .
drwxr-xr-x8 root root 0 Nov  5 22:23 ..
-rw-r--r--1 root root 17172 Nov  5 22:33 hardware-summary
lrwxrwxrwx1 root root44 Nov  5 22:33
install-report.template -
/usr/share/save-logs/install-report.template
lrwxrwxrwx1 root root16 Nov  5 22:33 lsb-release
- /etc/lsb-release
-rw-r--r--1 root root   993 Nov  5 22:23 partman
lrwxrwxrwx1 root root20 Nov  5 22:33 status -
/var/lib/dpkg/status
-rw-r--r--1 root root 71813 Nov  5 22:33 syslog



/var/log/partman is what Miguel wanted to mention.


Thanks for the clarification, here is the /var/log/partman:

/bin/partman: ***
/lib/partman/init.d/25md-devices:
***
/lib/partman/init.d/30parted:
***
parted_server: === Starting the server
parted_server: main_loop: iteration 1
parted_server: Opening infifo
/lib/partman/init.d/30parted: IN: OPEN =dev=sda /dev/sda
parted_server: Read command: OPEN
parted_server: command_open()
parted_server: Request to open =dev=sda
parted_server: Opening outfifo
parted_server: OUT: OK


parted_server: OUT: OK


parted_server: Note =dev=sda as unchanged
parted_server: Closing infifo and outfifo
parted_server: main_loop: iteration 2
parted_server: Opening infifo
/lib/partman/init.d/30parted: IN: OPEN =dev=sdb /dev/sdb
parted_server: Read command: OPEN
parted_server: command_open()
parted_server: Request to open =dev=sdb
parted_server: Opening outfifo
parted_server: OUT: OK


parted_server: OUT: OK



I suspect that something like Closing infifo and outfifo for /dev/sdb 
is missing. On the screen I have at this moment a progress bar Starting 
up the partitioner fixed at 50% and a statement Scanning disks... on 
the lower left. If I understand correctly, those /var/log/partman traces 
are related to this code from /lib/partman/init.d/30parted that seem to 
talk to a parted_server process:


cd $dev
open_dialog OPEN $(cat $dev/device)
read_line response
close_dialog
if [ $response = failed ]; then
cd /
rm -rf $dev
fi

Maybe parted_server is not responding to /lib/partman/init.d/30parted. A 
 'ps' give this processes list:


  PID USER   VSZ STAT COMMAND
1 root  1360 S/bin/busybox init
2 root 0 SW   [kthreadd]
3 root 0 SW   [ksoftirqd/0]
4 root 0 SW   [watchdog/0]
5 root 0 SW   [events/0]
6 root 0 SW   [cpuset]
7 root 0 SW   [khelper]
8 root 0 SW   [netns]
9 root 0 SW   [async/mgr]
   10 root 0 SW   [pm]
   11 root 0 SW   [sync_supers]
   12 root 0 SW   [bdi-default]
   13 root 0 SW   [kintegrityd/0]
   14 root 0 SW   [kblockd/0]
   15 root 0 SW   [kacpid]
   16 root 0 SW   [kacpi_notify]
   17 root 0 SW   [kacpi_hotplug]
   18 root 0 SW   [kseriod]
   19 root 0 SW   [kondemand/0]
   20 root 0 SW   [khungtaskd]
   21 root 0 SW   [kswapd0]
   22 root 0 SWN  [ksmd]
   23 root 0 SW   [aio/0]
   24 root 0 SW   [crypto/0]
   44 root  1356 S   udevd --daemon --resolve-names=never
  202 root 0 SW   [ksuspend_usbd]
  203 root 0 SW   [khubd]
  204 root 0 SW   [ata/0]
  205 root 0 SW   [ata_aux]
  207 root 0 SW   [scsi_eh_0]
  208 root 0 SW   [scsi_eh_1]
  209 root 0 SW   [scsi_eh_2]
  210 root 0 SW   [scsi_eh_3]
  222 root 0 SW   [scsi_eh_4]
  223 root 0 SW   [usb-storage]
  257 root  1360 S/sbin/syslogd -m 0 -O /var/log/syslog -S
  259 root  1360 S/sbin/klogd -c 2
  321 root  1364 S/bin/sh /sbin/debian-installer
  322 root  1872 S-/bin/sh
  323 root  1360 S/bin/busybox init
  324 root  1360 S/usr/bin/tail -f /var/log/syslog
  334 root  3364 S/usr/bin/bterm -f /lib/unifont.bgf -l C.UTF-8 
/lib/d

  335 root 14248 Sdebconf -o d-i /usr/bin/main-menu
  341 root  1236 S/usr/bin/main-menu
 1983 root 0 SW  [loop0]
 4463 root  1868 Sudhcpc -i eth0 -V d-i -O subnet -O broadcast 
-O rout

 4744 root  1352 S   udevd --daemon --resolve-names=never
 5212 root  1712 Sudpkg --configure --force-configure partman-base
 5213 root  1868 S/bin/sh 
/var/lib/dpkg/info/partman-base.postinst con

 5214 root  1872 S/bin/sh 

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

2010-11-06 Thread Jean-Christian de Rivaz
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:


void
command_open()
{
log(command_open());  ===  found in the log
char *device;
scan_device_name();
if (1 != iscanf(%as, device))
critical_error(Expected device name.);
log(Request to open %s, device_name); === in the log
open_out();
if (device_opened(device_name)) {
static char *only_ok[] = { OK, NULL };
log(Warning: the device is already opened);
pseudo_exception(Warning,
 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
deactivate_exception_handler();
set_disk_named(device_name,
   ped_disk_new(device_named(device_name)));
unchange_named(device_name);
activate_exception_handler();
} else
oprintf(failed\n);
free(device);
}

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 SizeType  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:

http://ftp.gnu.org/gnu/parted/

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:

http://www.gnu.org/software/parted

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.
 */
PedGeometry*
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;

error_free_geom:
free (geom);
error:
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.


Regards,

Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-06 Thread Jean-Christian de Rivaz
Can't easily find what's wrong into the parted-2.3/libparted code. But 
GNU Parted 1.8.8 from a Lenny machine work on this disk:


 parted /dev/sdb print
Error: Can't have the end before the start!
Model: disk2go PURE II (scsi)
Disk /dev/sdb: 5243kB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End SizeType File system  Flags
 1  32.8kB  5243kB  5210kB  primary  fat16


The problem maybe cam from the message Can't have the end before the 
start!. Also this version of parted say this is a FAT16 partition, but 
fdisk say this is a FAT12:


fdisk -l /dev/sdb

Disk /dev/sdb: 5 MB, 5242880 bytes
256 heads, 32 sectors/track, 1 cylinders
Units = cylinders of 8192 * 512 = 4194304 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1   250881  FAT12
Partition 1 has different physical/logical endings:
 phys=(40, 255, 32) logical=(1, 63, 32)

It also say that something is wrong with the geometry of this partition.

I then do a new partition on the /dev/sdb:
Disk /dev/sdb: 5 MB, 5242880 bytes
256 heads, 32 sectors/track, 1 cylinders
Units = cylinders of 8192 * 512 = 4194304 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1   140801  FAT12

The parted from Lenny is still not happy:

 parted /dev/sdb print
Error: Can't have the end before the start!
Model: disk2go PURE II (scsi)
Disk /dev/sdb: 5243kB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start   End SizeType File system  Flags
 1  16.4kB  4194kB  4178kB  primary

And the parted on the Squeeze installer still hang the same way. After 
that I tryed to use a FAT16 partition:


Disk /dev/sdb: 5 MB, 5242880 bytes
256 heads, 32 sectors/track, 1 cylinders
Units = cylinders of 8192 * 512 = 4194304 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1   140806  FAT16

But still, the parted from the installed abort with the same message.

At this point, I am a bit confused: why the parted from the Squeeze 
installer get so ill with this 5MB disk despite the fact that others 
tools and previous parted version handle it correctly.


Finally I removed the partition from that /dev/sdb disk and the 
installed worked. Ah! So the bug seem to be related to a unusual 
geometry of that disk.


Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-06 Thread Jean-Christian de Rivaz
Now Squeeze is installed into the notepad and I can test the parted 
2.3-3 that is available from it. No problem without partition of course, 
bt the surprise is that it also have no issue with a FAT12 partition:


fdisk -l /dev/sdb

Disk /dev/sdb: 5 MB, 5242880 bytes
1 heads, 10 sectors/track, 1024 cylinders
Units = cylinders of 10 * 512 = 5120 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   2102451151  FAT12

parted /dev/sdb print
Model: disk2go PURE II (scsi)
Disk /dev/sdb: 5243kB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End SizeType File system  Flags
 1  5120B  5243kB  5238kB  primary

But from http://packages.debian.org/squeeze/libparted0-udeb it seem that 
this is this 2.3-3 version that is used into the installer. I feel lost 
in doubt. I rebooted and restarted the installer, only to find that his 
parted still abort the same way.


Now the question is why the parted from the installer react so bad to 
something that do not hurt the parted from squeeze, since there should 
be compiled from the same code base ?


Or is there something missing in the picture ?

Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-06 Thread Jean-Christian de Rivaz

Interesting finding:

libparted.so.0.0.1 (from *.deb) != libparted.so.0.0.1 (from *.udeb)

I have do this:

apt-get source parted
cd parted-2.3/
dpkg-buildpackage -rfakeroot -uc -us
cd ..
mkdir install-bin
dpkg -x libparted0-udeb_2.3-3_i386.udeb install-bin/
dpkg -x parted-udeb_2.3-3_i386.udeb install-bin/
cd install-bin/
ls -l *
lib:
total 484
lrwxrwxrwx 1 jcdr jcdr 18  6 nov 21:46 libparted.so.0 - 
libparted.so.0.0.1

-rw-r--r-- 1 jcdr jcdr 489596  6 nov 21:37 libparted.so.0.0.1
sbin:
total 72
-rwxr-xr-x 1 jcdr jcdr 68012  6 nov 21:37 parted

Now test ./sbin/parted with the system library:

ldd ./sbin/parted
linux-gate.so.1 =  (0xb77c)
libparted.so.0 = /lib/libparted.so.0 (0xb773d000)
libc.so.6 = /lib/i686/cmov/libc.so.6 (0xb75f7000)
libuuid.so.1 = /lib/libuuid.so.1 (0xb75f2000)
libdl.so.2 = /lib/i686/cmov/libdl.so.2 (0xb75ee000)
libdevmapper.so.1.02.1 = /lib/libdevmapper.so.1.02.1 (0xb75cc000)
libblkid.so.1 = /lib/libblkid.so.1 (0xb75b)
/lib/ld-linux.so.2 (0xb77c1000)
libselinux.so.1 = /lib/libselinux.so.1 (0xb7595000)
libudev.so.0 = /lib/libudev.so.0 (0xb7586000)


./sbin/parted /dev/sdb print
WARNING: You are not superuser.  Watch out for permissions.
Model: disk2go PURE II (scsi)
Disk /dev/sdb: 5243kB
Sector size (logical/physical): 512B/512B
Partition Table: msdos

Number  Start  End SizeType File system  Flags
 1  5120B  5243kB  5238kB  primary


It use the /lib/libparted.so.0 (with the root /) and work fine.

Now test ./sbin/parted with the installer library:

LD_LIBRARY_PATH=./lib/ ldd ./sbin/parted
linux-gate.so.1 =  (0xb78b1000)
libparted.so.0 = ./lib/libparted.so.0 (0xb7831000)
libc.so.6 = /lib/i686/cmov/libc.so.6 (0xb76da000)
libuuid.so.1 = /lib/libuuid.so.1 (0xb76d5000)
libdl.so.2 = /lib/i686/cmov/libdl.so.2 (0xb76d1000)
libdevmapper.so.1.02.1 = /lib/libdevmapper.so.1.02.1 (0xb76af000)
libblkid.so.1 = /lib/libblkid.so.1 (0xb7693000)
/lib/ld-linux.so.2 (0xb78b2000)
libselinux.so.1 = /lib/libselinux.so.1 (0xb7678000)
libudev.so.0 = /lib/libudev.so.0 (0xb7669000)

LD_LIBRARY_PATH=./lib/ ./sbin/parted /dev/sdb print
WARNING: You are not superuser.  Watch out for permissions.


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:

http://ftp.gnu.org/gnu/parted/

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:

http://www.gnu.org/software/parted

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.

Abandon


It use the ./lib/libparted.so.0 (the current directory lib instead of 
the root /) and failed. I verified that it work this way with the others 
partitions.


There is obviously something different between this two library, despite 
 the fact that there are compiled form the same source package:


ls -l /lib/libparted.so.0.0.1 lib/libparted.so.0.0.1
-rw-r--r-- 1 root root 432668 17 oct 12:18 /lib/libparted.so.0.0.1
-rw-r--r-- 1 jcdr jcdr 489596  6 nov 21:37 lib/libparted.so.0.0.1
file /lib/libparted.so.0.0.1 lib/libparted.so.0.0.1
/lib/libparted.so.0.0.1: ELF 32-bit LSB shared object, Intel 80386, 
version 1 (SYSV), dynamically linked, stripped
lib/libparted.so.0.0.1:  ELF 32-bit LSB shared object, Intel 80386, 
version 1 (SYSV), dynamically linked, stripped


The installed library is about 56k less in size that the system library. 
Is some code path not compiled for the installer version ?


Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-06 Thread Jean-Christian de Rivaz

I now have a backtrace:

Backtrace has 20 calls on stack:
  20: ./libparted/.libs/libparted.so.0(ped_assert+0x28) [0xb77d9073]
  19: ./libparted/.libs/libparted.so.0(ped_geometry_new+0x5a) [0xb77e2aed]
  18: ./libparted/.libs/libparted.so.0(ped_geometry_duplicate+0x73) 
[0xb77e2bc6]
  17: ./libparted/.libs/libparted.so.0(ped_constraint_init+0x15e) 
[0xb77e3c92]
  16: ./libparted/.libs/libparted.so.0(ped_constraint_new+0x82) 
[0xb77e3d54]

  15: ./libparted/.libs/libparted.so.0(+0x504c8) [0xb781c4c8]
  14: ./libparted/.libs/libparted.so.0(+0x50bdd) [0xb781cbdd]
  13: ./libparted/.libs/libparted.so.0(+0x51249) [0xb781d249]
  12: ./libparted/.libs/libparted.so.0(+0x517b7) [0xb781d7b7]
  11: ./libparted/.libs/libparted.so.0(+0x1328f) [0xb77df28f]
  10: ./libparted/.libs/libparted.so.0(ped_disk_add_partition+0x15f) 
[0xb77e1a7a]

  9: ./libparted/.libs/libparted.so.0(+0x4e72c) [0xb781a72c]
  8: ./libparted/.libs/libparted.so.0(+0x4e94e) [0xb781a94e]
  7: ./libparted/.libs/libparted.so.0(ped_disk_new+0xd2) [0xb77dddbe]
  6: /home/jcdr/install-O2/sbin/parted() [0x804dec5]
  5: /home/jcdr/install-O2/sbin/parted() [0x804b26d]
  4: /home/jcdr/install-O2/sbin/parted() [0x8054b7f]
  3: /home/jcdr/install-O2/sbin/parted() [0x8051a52]
  2: /lib/i686/cmov/libc.so.6(__libc_start_main+0xe6) [0xb768bc76]
  1: /home/jcdr/install-O2/sbin/parted() [0x804af21]

I can reproduce this with this command from the package build:

parted-2.3/build-udeb$ LD_LIBRARY_PATH=./libparted/.libs/ 
~/install-O2/sbin/parted /dev/sdb print



While analyzing the debian/rules I found this:

# Workaround/fix bug #442308
CFLAGS += -fgnu89-inline
UDEB_CFLAGS += -fgnu89-inline

This bug is tracked here:

http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=442308

This workaround is now obsolete as is was introduced 3 years ago for 
parted 1.8-7 and we now use parted 2.3-3 that compile just fine without 
this option. But unfortunately this is not the cause of my problem.



After a lot of test with different config.status file, I found this 
picture by testing only the build-udeb:


library fail with CFLAGS=' -Werror'
library fail with CFLAGS='-g  -Werror'
library good with CFLAGS='-g -O2  -Werror'
library good with CFLAGS='-O2  -Werror'

Something wrong without the -O2 optimization ? Seem incredible. But... I 
just want to check:


library good in build-deb with CFLAGS='-g -O2 -fgnu89-inline -Werror'
library good in build-udeb with CFLAGS='-O2 -fgnu89-inline -Werror'
library fail in build-deb with CFLAGS='-g -fgnu89-inline -Werror'
library fail in build-udeb with CFLAGS='-fgnu89-inline -Werror'

Ouch! It better to use the -O2 optimizer !


Ok, now at this stage I can give some facts:

1) The lib/partman/init.d/30parted script is unable to detect and report 
abnormal parted-server end.


2) The CFLAGS -fgnu89-inline option from the bug #442308 can be removed 
for the current version of parted-2.3-3


3) Something bad happen with the parted-2.3-3 code when the -O2 
optimization is not used.


Enough for me. Please, someone from Debian, give me some instruction of 
what action must be taken now. Should I open others bugs report for 1) 
and 2) ?


Regards,

Jean-Christian de Rivaz



--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-06 Thread Jean-Christian de Rivaz
Please find in attachment my current proposition of patch. It remove the 
 obsolete -fgnu89-inline and use the same flags for build-udeb than for 
build-deb to get the -O2 optimization.


This work, but I still don't understand why the code fail without 
optimization.


Regards,

Jean-Christian de Rivaz
--- a/debian/rules	2010-11-07 02:57:24.0 +0100
+++ b/debian/rules	2010-11-07 02:59:01.0 +0100
@@ -89,14 +89,11 @@
 
 ifeq (, $(CFLAGS))
 CFLAGS = -g
-UDEB_CFLAGS = -g
 
 ifeq (, $(findstring noopt, $(DEB_BUILD_OPTIONS)))
 CFLAGS += -O2
-UDEB_CFLAGS += -Os
 else
 CFLAGS += -O0
-UDEB_CFLAGS += -O0
 endif
 
 endif
@@ -118,10 +115,6 @@
   CONFFLAGS += --disable-pc98
 endif
 
-# Workaround/fix bug #442308
-CFLAGS += -fgnu89-inline
-UDEB_CFLAGS += -fgnu89-inline
-
 # Enable device-mapper only on Linux
 ifeq (linux, $(DEB_BUILD_ARCH_OS))
   CONFDEVMAPPER = --enable-device-mapper
@@ -186,7 +179,7 @@
 	dh_testdir
 	[ -d build-udeb ] || mkdir build-udeb
 
-	cd build-udeb  CFLAGS=$(UDEB_CFLAGS) ac_cv_header_execinfo_h=no ../configure --prefix=/usr \
+	cd build-udeb  CFLAGS=$(CFLAGS) ac_cv_header_execinfo_h=no ../configure --prefix=/usr \
 	--sbindir=/sbin --libdir=/lib --mandir=\$${prefix}/share/man \
 	--infodir=\$${prefix}/share/info --enable-shared --disable-static \
 	--build=$(DEB_BUILD_GNU_TYPE) --host=$(DEB_HOST_GNU_TYPE) \


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

2010-11-05 Thread Jean-Christian de Rivaz

Package: installation-reports

Boot method: disk2go PURE II USB stick
Image version: 
http://cdimage.debian.org/cdimage/squeeze_di_beta1/i386/iso-cd/debian-squeeze-di-beta1-i386-businesscard.iso

Date: 06 nov 2010

Machine: Asus EeePC 1015PE
Processor: Intel Atom N450
Memory: 2GB
Partitions:

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x29133921

   Device Boot  Start End  Blocks   Id  System
/dev/sda1   16632532674567  HPFS/NTFS
/dev/sda2   30399   30402   20664   ef  EFI (FAT-12/16/32)
/dev/sda3   *66326697  524288+  83  Linux
/dev/sda46697   30399   190385151+   5  Extended
/dev/sda56697   1322452428800+  83  Linux

Partition table entries are not in disk order

Disk /dev/sdb: 5 MB, 5242880 bytes
256 heads, 32 sectors/track, 1 cylinders
Units = cylinders of 8192 * 512 = 4194304 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x

   Device Boot  Start End  Blocks   Id  System
/dev/sdb1   1   250881  FAT12
Partition 1 has different physical/logical endings:
 phys=(40, 255, 32) logical=(1, 63, 32)

Disk /dev/sdc: 2142 MB, 2142240768 bytes
66 heads, 62 sectors/track, 1022 cylinders
Units = cylinders of 4092 * 512 = 2095104 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0xbb0eb409

This doesn't look like a partition table
Probably you selected the wrong device.

   Device Boot  Start End  Blocks   Id  System
/dev/sdc1   ?  842478 1298648   933323145+  66  Unknown
Partition 1 has different physical/logical beginnings (non-Linux?):
 phys=(1010, 16, 43) logical=(842477, 65, 13)
Partition 1 has different physical/logical endings:
 phys=(906, 97, 3) logical=(249046, 43, 23)
Partition 1 does not end on cylinder boundary.
/dev/sdc2   ?   1   1   0   72  Unknown
Partition 2 has different physical/logical beginnings (non-Linux?):
 phys=(101, 116, 32) logical=(0, 41, 32)
Partition 2 has different physical/logical endings:
 phys=(370, 114, 47) logical=(0, 41, 31)
Partition 2 does not end on cylinder boundary.

Partition table entries are not in disk order


Output of lspci -knn (or lspci -nn):

00:00.0 Host bridge [0600]: Intel Corporation N10 Family DMI Bridge 
[8086:a010]

Subsystem: ASUSTeK Computer Inc. Device [1043:83ac]
Kernel driver in use: agpgart-intel
00:02.0 VGA compatible controller [0300]: Intel Corporation N10 Family 
Integrated Graphics Controller [8086:a011]

Subsystem: ASUSTeK Computer Inc. Device [1043:83ac]
00:02.1 Display controller [0380]: Intel Corporation N10 Family 
Integrated Graphics Controller [8086:a012]

Subsystem: ASUSTeK Computer Inc. Device [1043:83ac]
00:1b.0 Audio device [0403]: Intel Corporation N10/ICH 7 Family High 
Definition Audio Controller [8086:27d8] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:841c]
00:1c.0 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI 
Express Port 1 [8086:27d0] (rev 02)

Kernel driver in use: pcieport
00:1c.1 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI 
Express Port 2 [8086:27d2] (rev 02)

Kernel driver in use: pcieport
00:1c.3 PCI bridge [0604]: Intel Corporation N10/ICH 7 Family PCI 
Express Port 4 [8086:27d6] (rev 02)

Kernel driver in use: pcieport
00:1d.0 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB 
UHCI Controller #1 [8086:27c8] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:83ad]
Kernel driver in use: uhci_hcd
00:1d.1 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB 
UHCI Controller #2 [8086:27c9] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:83ad]
Kernel driver in use: uhci_hcd
00:1d.2 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB 
UHCI Controller #3 [8086:27ca] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:83ad]
Kernel driver in use: uhci_hcd
00:1d.3 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB 
UHCI Controller #4 [8086:27cb] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:83ad]
Kernel driver in use: uhci_hcd
00:1d.7 USB Controller [0c03]: Intel Corporation N10/ICH 7 Family USB2 
EHCI Controller [8086:27cc] (rev 02)

Subsystem: ASUSTeK Computer Inc. Device [1043:83ad]
Kernel driver in use: ehci_hcd
00:1e.0 PCI bridge [0604]: Intel Corporation 82801 Mobile PCI Bridge 
[8086:2448] (rev e2)
00:1f.0 ISA bridge [0601]: Intel Corporation NM10 Family LPC Controller 

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

2010-11-05 Thread Miguel Figueiredo
A Sexta 05 Novembro 2010 23:06:26 Jean-Christian de Rivaz você escreveu:

[...]
 
 How can I get more debug informations from partman to go deeper into the
 analysis ?

[...]

You can check /var/log/installer/partman and the syslog on that location can 
be useful too.

-- 
Melhores cumprimentos/Best regards,

Miguel Figueiredo
http://www.DebianPT.org




--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org



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

2010-11-05 Thread Jean-Christian de Rivaz

Miguel Figueiredo a écrit :

A Sexta 05 Novembro 2010 23:06:26 Jean-Christian de Rivaz você escreveu:

[...]
 

How can I get more debug informations from partman to go deeper into the
analysis ?


[...]

You can check /var/log/installer/partman and the syslog on that location can 
be useful too.




Unfortunately there is no /var/log/installer/ directory:

ls -al /var/log
drwxr-xr-x2 root root 0 Nov  5 22:33 .
drwxr-xr-x8 root root 0 Nov  5 22:23 ..
-rw-r--r--1 root root 17172 Nov  5 22:33 hardware-summary
lrwxrwxrwx1 root root44 Nov  5 22:33 
install-report.template - /usr/share/save-logs/install-report.template
lrwxrwxrwx1 root root16 Nov  5 22:33 lsb-release - 
/etc/lsb-release

-rw-r--r--1 root root   993 Nov  5 22:23 partman
lrwxrwxrwx1 root root20 Nov  5 22:33 status - 
/var/lib/dpkg/status

-rw-r--r--1 root root 71813 Nov  5 22:33 syslog

I already inspected the syslog as you can find the interesting part in 
my initial report: partman simply hang without verbose message. This is 
why I search a way to get more informations.


Jean-Christian





--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of unsubscribe. Trouble? Contact listmas...@lists.debian.org