When I try to check FAT32 partition and fix the errors, dosfck aborts. Here is the output and the call stack: [nekit@localhost ~]$ sudo gdb -args dosfsck -a -v -V /dev/sdd GNU gdb (GDB) 7.1-6.mga1 (Mageia release 1) Copyright (C) 2010 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law. Type "show copying" and "show warranty" for details. This GDB was configured as "i586-mageia-linux-gnu". For bug reporting instructions, please see: <http://www.gnu.org/software/gdb/bugs/>... Reading symbols from /sbin/dosfsck...Reading symbols from /usr/lib/debug/sbin/dosfsck.debug...done. done. (gdb) r Starting program: /sbin/dosfsck -a -v -V /dev/sdd dosfsck 3.0.11 (24 Dec 2010) dosfsck 3.0.11, 24 Dec 2010, FAT32, LFN Checking we can access the last sector of the filesystem Boot sector contents: System ID "mkdosfs" Media byte 0xf8 (hard disk) 512 bytes per logical sector 32768 bytes per cluster 1 reserved sector First FAT starts at byte 512 (sector 1) 2 FATs, 16 bit entries 125440 bytes per FAT (= 245 sectors) Root directory starts at byte 251392 (sector 491) 512 root directory entries Data area starts at byte 267776 (sector 523) 62672 data clusters (2053636096 bytes) 16 sectors/track, 4 heads 0 hidden sectors 4011594 sectors total Starting check/repair pass. FATs differ but appear to be intact. Using first FAT. /.Trash-500 Contains a free cluster (570). Assuming EOF. Reclaiming unconnected clusters. *** buffer overflow detected ***: /sbin/dosfsck terminated warning: no loadable sections found in added symbol-file /usr/lib/debug/lib/libgcc_s-4.5.2.so.1.debug ======= Backtrace: ========= /lib/i686/libc.so.6(__fortify_fail+0x50)[0xb7f467e0] /lib/i686/libc.so.6(+0xeb81a)[0xb7f4481a] /lib/i686/libc.so.6(+0xeaf18)[0xb7f43f18] /lib/i686/libc.so.6(_IO_default_xsputn+0x95)[0xb7ec1745] /lib/i686/libc.so.6(_IO_vfprintf+0x1035)[0xb7e96805] /lib/i686/libc.so.6(__vsprintf_chk+0xa7)[0xb7f43fc7] /lib/i686/libc.so.6(__sprintf_chk+0x2d)[0xb7f43f0d] /sbin/dosfsck[0x804c798] ======= Memory map: ======== 08048000-08055000 r-xp 00000000 08:01 133375 /sbin/dosfsck 08055000-08056000 rw-p 0000c000 08:01 133375 /sbin/dosfsck 08056000-080d7000 rw-p 00000000 00:00 0 [heap] b7d9d000-b7db8000 r-xp 00000000 08:01 1179707 /lib/libgcc_s-4.5.2.so.1 b7db8000-b7db9000 rw-p 0001b000 08:01 1179707 /lib/libgcc_s-4.5.2.so.1 b7ddc000-b7e59000 rw-p 00000000 00:00 0 b7e59000-b7fb8000 r-xp 00000000 08:01 1184008 /lib/i686/libc-2.12.1.so b7fb8000-b7fb9000 ---p 0015f000 08:01 1184008 /lib/i686/libc-2.12.1.so b7fb9000-b7fbb000 r--p 0015f000 08:01 1184008 /lib/i686/libc-2.12.1.so b7fbb000-b7fbc000 rw-p 00161000 08:01 1184008 /lib/i686/libc-2.12.1.so b7fbc000-b7fbf000 rw-p 00000000 00:00 0 b7fe1000-b7fe3000 rw-p 00000000 00:00 0 b7fe3000-b7ffe000 r-xp 00000000 08:01 1179662 /lib/ld-2.12.1.so b7ffe000-b7fff000 r--p 0001a000 08:01 1179662 /lib/ld-2.12.1.so b7fff000-b8000000 rw-p 0001b000 08:01 1179662 /lib/ld-2.12.1.so bffdf000-c0000000 rw-p 00000000 00:00 0 [stack] ffffe000-fffff000 r-xp 00000000 00:00 0 [vdso] Program received signal SIGABRT, Aborted. 0xffffe424 in __kernel_vsyscall () (gdb) (gdb) bt #0 0xffffe424 in __kernel_vsyscall () #1 0xb7e830f1 in raise () from /lib/i686/libc.so.6 #2 0xb7e84c1e in abort () from /lib/i686/libc.so.6 #3 0xb7ebda1d in __libc_message () from /lib/i686/libc.so.6 #4 0xb7f467e0 in __fortify_fail () from /lib/i686/libc.so.6 #5 0xb7f4481a in __chk_fail () from /lib/i686/libc.so.6 #6 0xb7f43f18 in _IO_str_chk_overflow () from /lib/i686/libc.so.6 #7 0xb7ec1745 in _IO_default_xsputn_internal () from /lib/i686/libc.so.6 #8 0xb7e96805 in vfprintf () from /lib/i686/libc.so.6 #9 0xb7f43fc7 in __vsprintf_chk () from /lib/i686/libc.so.6 #10 0xb7f43f0d in __sprintf_chk () from /lib/i686/libc.so.6 #11 0x0804c798 in sprintf (fs=0xbffff408, de=0xbffff38c, pattern=0x80525b1 "FSCK%04dREC") at /usr/include/bits/stdio2.h:34 #12 alloc_rootdir_entry (fs=0xbffff408, de=0xbffff38c, pattern=0x80525b1 "FSCK%04dREC") at src/check.c:177 #13 0x0804ea56 in reclaim_file (fs=0xbffff408) at src/fat.c:489 #14 0x08049228 in main (argc=5, argv=0xbffff524) at src/dosfsck.c:174
Source RPM: (none) => dosfstools-3.0.11-1.mga1
Hi Nikita, Thanks for the report. I believe the problem might be in the upstream package itself and not specific to Mageia's implementation of it. I've (just) sent an email to the upstream maintainer asking him to have a look at this report. As follow up question: Do you know if the drive you are checking actually has errors on it?
Keywords: (none) => NO_PATCH, UPSTREAM
I have not found official bugtracker for this program, so I've decided to post the report here. Yes, the drive has errors. Also, earlier version from Mandriva 2008 works correctly.
This message is a reminder that Mageia 1 is nearing its end of life. In approximately 25 days from now, Mageia will stop maintaining and issuing updates for Mageia 1. At that time this bug will be closed as WONTFIX (EOL) if it remains open with a Mageia 'version' of '1'. Package Maintainer: If you wish for this bug to remain open because you plan to fix it in a currently maintained version, simply change the 'version' to a later Mageia version prior to Mageia 1's end of life. Bug Reporter: Thank you for reporting this issue and we are sorry that we may not be able to fix it before Mageia 1 is end of life. If you would still like to see this bug fixed and are able to reproduce it against a later version of Mageia, you are encouraged to click on "Version" and change it against that version of Mageia. Although we aim to fix as many bugs as possible during every release's lifetime, sometimes those efforts are overtaken by events. Often a more recent Mageia release includes newer upstream software that fixes bugs or makes them obsolete. -- Mageia Bugsquad
Mageia 1 changed to end-of-life (EOL) status on ''1st December''. Mageia 1 is no longer maintained, which means that it will not receive any further security or bug fix updates. As a result we are closing this bug. If you can reproduce this bug against a currently maintained version of Mageia please feel free to click on "Version" change it against that version of Mageia and reopen this bug. Thank you for reporting this bug and we are sorry it could not be fixed. -- Mageia Bugsquad
Status: NEW => RESOLVEDResolution: (none) => WONTFIX