Subject: bug#18314: [bug] fail to print device info

From: lumin <[email-masked]>
Date: Fri, 22 Aug 2014 01:31:21 +0000

parted version: 3.2 (debian jessie)
debian package version: 
> parted/testing,testing,now 3.2-4 amd64

hello,
I am new at bug reporting, and I am trying to provide enough information
about the BUG I have encountered.

I have dd'ed a debian 7.6 DVD installation media(iso) directly into my
USB stick(USB3.0). I am sure there is no damage on this device. 
Then I'd like to make a new partition table,then I typed 'print' first:

```
(parted) print
Warning: The driver descriptor says the physical block size is 2048
bytes, but Linux says it is 512 bytes.
Ignore/Cancel? I
```

then the bug occured.
this is device info required by the program:
```
(parted)
print                                                            
Warning: The driver descriptor says the physical block size is 2048
bytes, but
Linux says it is 512 bytes.
Ignore/Cancel?
C                                                          
Model: Kingston DataTraveler 3.0 (scsi)
Disk /dev/sdc: 15356160s
Sector size (logical/physical): 512B/512B
Partition Table: unknown
Disk Flags: 
```
when I say Ignore:
```
***
Command History:
unit
s
print
I

Error: A general SIGSEGV signal was encountered.
```
 
this is the original BUG:
(parted /dev/sdc)
```
Command History:
print
I

Error: SEGV_MAPERR (Address not mapped to object)
Backtrace has 16 calls on stack:
  16: /lib/x86_64-linux-gnu/libparted.so.2(ped_assert+0x31)
[0x7ffbda65f5f1]
  15: parted() [0x40a684]
  14: /lib/x86_64-linux-gnu/libc.so.6(+0x35480) [0x7ffbd9e6a480]
  13: /lib/x86_64-linux-gnu/libc.so.6(+0x90875) [0x7ffbd9ec5875]
  12: /lib/x86_64-linux-gnu/libparted.so.2(+0x1817e) [0x7ffbda66a17e]
  11: /lib/x86_64-linux-gnu/libparted.so.2(ped_geometry_read+0x35)
[0x7ffbda665a85]
  10: /lib/x86_64-linux-gnu/libparted.so.2(+0x1ce16) [0x7ffbda66ee16]
  9: /lib/x86_64-linux-gnu/libparted.so.2(ped_file_system_probe_specific
+0x37) [0x7ffbda660a07]
  8: /lib/x86_64-linux-gnu/libparted.so.2(ped_file_system_probe+0x4e)
[0x7ffbda660ace]
  7: /lib/x86_64-linux-gnu/libparted.so.2(+0x2954c) [0x7ffbda67b54c]
  6: /lib/x86_64-linux-gnu/libparted.so.2(ped_disk_new+0x48)
[0x7ffbda6644b8]
  5: parted() [0x407659]
  4: parted(interactive_mode+0xff) [0x40c6ef]
  3: parted(main+0x1175) [0x405f45]
  2: /lib/x86_64-linux-gnu/libc.so.6(__libc_start_main+0xf5)
[0x7ffbd9e56b45]
  1: parted() [0x405f98]
```

then I erased the first sector of the disk:
sudo dd if=/dev/zero of=/dev/sdc bs=512 count=1
then ALL things went back to normal.
seems like matter of Device driver.

-- 
Regards,
  C.D.Luminate