After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 415925 - GParted shouldn't try to read cdrom file systems
GParted shouldn't try to read cdrom file systems
Status: RESOLVED FIXED
Product: gparted
Classification: Other
Component: application
GIT HEAD
Other All
: Normal critical
: ---
Assigned To: gparted maintainers alias
gparted maintainers alias
Depends on:
Blocks:
 
 
Reported: 2007-03-08 02:44 UTC by Patrick Verner
Modified: 2008-01-19 17:57 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Patrick Verner 2007-03-08 02:44:43 UTC
Steps to reproduce:
1. Put a cd/dvd in a dvdrom > LiveCD (yours too) or normal system.
2. GParted crashes when the cdrom drive scan starts. Well, 1 out of 5 times.
3. segfault or glibc error


Stack trace:
GParted crashes 1 out of 5 times it scans devices with dvd drives. I can reproduce the bug over and over. To fix the problem all I have to do is take the cd out of the dvd drive. GParted for some reason reads the fs on the cd and then crashes.

Output of error:

root@anydistro:~# gparted
======================
libparted : 1.8.2
======================
Invalid argument during read on /dev/hdd
*** glibc detected *** double free or corruption (!prev): 0x082b9800 ***
*** glibc detected *** realloc(): invalid pointer: 0x082b9d90 ***
Aborted

I can take the cd out and then hit refresh devices all day and never have a crash.

I can reproduce the bug on parted-1.7.x too, so don't blame 1.8.x.

Other information:
Comment 1 Laurent de Trogoff 2007-03-08 06:04:15 UTC
Thx for reporting Patrick !
I did what you said and it seems to work, like you say.
I didn't get any problem with parted-1.7.x, but this is not important.

I will contact parted-team about that point.
thx
Comment 2 Patrick Verner 2007-03-08 21:14:49 UTC
If plors can stop it from listing devices with a logical sector size of 2048 it won't pick-up the cdrom any more. It's seems like it could fit in along the lines of the "check if devices are real" patch. The code for a sector size of 2048 in parted is experimental anyway. If this was fixed in GParted the newer versions of parted will work. This is the only issue I could find with GParted and parted-1.8.2 not working together.

Maybe Francois could hammer something out if plors doesn't have time. His other patch worked well and this going to stop everybody from using GParted/parted-1.8.2 on a LiveCD.
Comment 3 Steve Alexander 2007-03-17 06:17:19 UTC
Note that it makes sense to run gparted against a DVD-RAM or CD-RAM !
 
Comment 4 Jürgen Gier 2007-08-06 08:14:32 UTC
I'm having a similar problem - whenever there's a disk in any of my 2 drives gparted (0.3.3) crashes, however with a different message than Patrick's:
(I have glibc-2.5-18.fc6, perhaps a different one than his?)

======================
libparted : 1.8.2
======================
Kann /dev/hdc nicht zum Schreiben öffnen (Das Dateisystem ist nur lesbar). /dev/hdc wurde nur zum Lesen geöffnet.
Datei oder Verzeichnis nicht gefunden, während von /dev/md0 gelesen wurde.
Kann /dev/hdc nicht zum Schreiben öffnen (Das Dateisystem ist nur lesbar). /dev/hdc wurde nur zum Lesen geöffnet.

(in English:
  Can't open /dev/hdc (DVD-ROM) for writing (file system is read-only)
  /dev/hdc opened read-only
  file or directory not found while reading from /dev/md0
  repeat 1st msg)

I can always start gparted with a device argument (gparted /dev/hda etc.), but then it will only know about that device.


So I tried parted 1.8.2 on a DVD-ROM:

parted /dev/hdc print
Warnung: Kann /dev/hdc nicht zum Schreiben öffnen (Das Dateisystem ist nur
lesbar). /dev/hdc wurde nur zum Lesen geöffnet.
Warnung: Device /dev/hdc has a logical sector size of 2048.  Not all parts of
GNU Parted support this at the moment, and the working code is HIGHLY
EXPERIMENTAL.

Warnung: Kann /dev/hdc nicht zum Schreiben öffnen (Das Dateisystem ist nur
lesbar). /dev/hdc wurde nur zum Lesen geöffnet.


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 (1.8.2)
along with the error message below, the output of

        parted DEVICE unit co print unit s print

and additional information about your setup you consider important.

Error: SEGV_MAPERR (Address not mapped to object)
Backtrace has 3 calls on stack:
  3: /usr/lib/libparted-1.8.so.2(ped_assert+0x3b) [0x7c0f1b]
  2: [0x80527f8]
  1: [0xfe2440]
Abgebrochen


So probably this is a bug in libparted, not in the frontend?
Comment 5 gg 2008-01-16 20:01:15 UTC
Anyone able to reproduce this with libparted 1.8.8 ?

I have just tested 5 times in a row with a DVD and earlier with an audio CD. No error. 

Is this bug still valid?

regards.
Comment 6 Jürgen Gier 2008-01-16 20:52:16 UTC
Have tested with libparted 1.8.6, a DVD and an audio CD. No error for me either.
Comment 7 Laurent de Trogoff 2008-01-19 17:57:15 UTC
no this bug is solved with parted 1.8.8