GNOME Bugzilla – Bug 764558
App crashes when resizing fat32 partition
Last modified: 2016-04-05 07:42:58 UTC
After resizing gparted crashes with this output in terminal: *** Error in `/usr/sbin/gpartedbin': double free or corruption (!prev): 0x00007f3be000a0b0 *** Aborted
Hi Yan, I haven't seen a crash like this. Please provide some more information. 1) What distribution are you using? E.G.: GParted Live CD 0.24.0, Unbuntu 15.10, Fedora 23, etc. 2) Are there any unusual characteristics of the FAT32 file system? File system size? Very deep directories? (Have recently fixed FAT32 fs resize crash when the directory names are longer than 512 bytes. Bug 762448). 3) Please provide full terminal output. (Command line, libparted version, etc). 4) If you can, please provide a backtrace. Thanks, Mike How to capture a backtrace from a coredump ------------------------------------------ 1) Turn off any OS core dump capturing, ensuring: cat /proc/sys/kernel/core_pattern reports just "core" Some methods to do this, depending on distro version, are: * service abrt-ccpp stop * systemctl stop abrtd * sudo service apport stop 2) Increase core dump limit and run GParted as root Either: ulimit -c unlimited sudo gparted or: su - root ulimit -c unlimited gparted 3) Perform crashing action 4) Capture backtrace ls -lrt core* which gpartedbin gdb `which gpartedbin` {COREFILE} --batch --quiet \ -ex backtrace -ex quit > backtrace.log Please paste the terminal output when running gparted and the contents of the backtrace.log file.
1) LinuxMint 17.3 64 bit. Kernel 4.2 (this package is installed from getdeb repo). But the same happens to 0.18 from ubuntu repo.) 2) FS is empty. The resize crash happens every time, doesn't deepnd on size. The last time I was shrinknig 5.5 GB to 5.4 GB. 3) This error is the only thing I see. Before this error I see: ====================== libparted : 2.3 ====================== 4) Later :)
No need for a backtrace. I've managed to reproduce the crash on Ubuntu 14.04 LTS with GParted 0.24.0 and GIT master. (Linux Mint 17.3 is derived from Ubuntu 14.04 LTS). [With a 5600 MiB FAT32 partition, resize to 5500 MiB.] # ./gpartedbin ====================== libparted : 2.3 ====================== Segmentation fault (core dumped) # gdb ./gpartedbin core --batch --quiet -ex backtrace -ex quit > backtrace.log 539 /build/buildd/glib2.0-2.40.2/./glib/gslice.c: No such file or directory. # cat backtrace.log [New LWP 12554] [New LWP 12598] [New LWP 27592] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/home/xubuntu/programming/c/gparted/src/gpartedbin'. Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 236142
Suspect this is a libparted bug resizing FAT32. Here's the backtrace of all 3 threads with thread 3 showing these function calls: needs_duplicating() in libparted search_next_fragment() fat_duplicate_clusters() fat_resize() GParted_Core::thread_lp_ped_file_system_reisze() in GParted # gdb ~xubuntu/programming/c/gparted/src/gpartedbin core --batch --quiet -ex 'info threads' -ex 'thread apply all backtrace' -ex quit > backtrace-all.log 539 /build/buildd/glib2.0-2.40.2/./glib/gslice.c: No such file or directory. # cat backtrace-all.log [New LWP 12554] [New LWP 12598] [New LWP 27592] [Thread debugging using libthread_db enabled] Using host libthread_db library "/lib/x86_64-linux-gnu/libthread_db.so.1". Core was generated by `/home/xubuntu/programming/c/gparted/src/gpartedbin'. Program terminated with signal SIGSEGV, Segmentation fault.
+ Trace 236143
Thread 1 (Thread 0x7f01b0f11a00 (LWP 12554))
Hi Yan, I have been reminded that we have seen this bug before. Bug 735471 - fat32 resize crash - error "corrupted double-linked list" It causes GParted to crash when resizing fat32 file system on Debian, Ubuntu 14.04 LTS and now Linux Mint 17.3 with these distro provided packages: Name Version ================= ===================== libparted0debian1 2.3 libparted0debian1 2.3-19ubuntu1.14.04.1 You will need to raise a bug with one of the afore mentioned distros to get this fixed. Later versions of libparted do not suffer from this. Also other distros with libparted 2.3 are not affected either. Note that libparted 3.2 suffers from this different bug. Bug 759916 - fat(32) resizing generates boot sector(s) with invalid jump instruction and pseudo-random boot code Closing this bug as duplicate. Thanks, Mike *** This bug has been marked as a duplicate of bug 735471 ***
Thnak you!:) I will report those bugs to ubuntu's bug tracking system