When performing fsck on a clean ext3 or ext4 filesysem using e2fsprogs-1.42.12 (but not 1.42.11 or below), on a uclibc system with version 0.9.33.2-rX or 0.9.33.9999 (but not 9999), fsck will complain about a corrupted linked list for the inodes. If you proceed to actually fix the filesystem (with fsck -y), it will trash it. This only happens on amd64 and not x86 --- it probably happens on all 64-bit systems and not on 32-bit for the reasons outlined below: This behavior was introduced with the following commit in e2fsprogs: http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=f00948ad1df100c7d616ef6fbf7609329a2e4001 and an earlier companion commit: http://git.kernel.org/cgit/fs/ext2/e2fsprogs.git/commit/?id=baa3544609da3c9bbe7e253b83f32df74e1015de The later commit (f00948a) introduced pread64/pwrite64 and preferred it over pread/pwrite. On a 64-bit system pread64 should be just a wrapper to pread but it is broken in uclibc-0.9.33.X. A series of commits by Mike Frysinger to the uclibc::master branch fix these, but unfortunately backporting them to 0.9.33 branch is not very clean: http://git.uclibc.org/uClibc/log/libc/sysdeps/linux/common/pread_write.c I'm working on collecting these into a backportable patch, but in the mean time, I'm asking e2fsprogs/e2fsprogs-libs-1.42.12 on uclibc/amd64 profile and rebuilding the stage3's which are on the tree and carry this serious bug. Reproducible: Always
(In reply to Anthony Basile from comment #0) > > I'm working on collecting these into a backportable patch, Ouch, the set of patches intermix the fix with the syscall cancel stuff that was consolidated into <include/cancel.h>. Simply copying over include/cancel.h and libc/sysdeps/linux/common/pread_write.c "works" on amd64 but is messy. @mike. any advice here? should i just rewrite your "convert to SYSCALL_ALIGN_64BIT" to apply to the HEAD of 0.9.33 branch and submit that upstream? I would replace static _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, off_t, offset_hi, off_t, offset_lo) with # if defined(__UCLIBC_SYSCALL_ALIGN_64BIT__) static _syscall6(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, int, dummy, off_t, offset_hi, off_t, offset_lo) # else static _syscall5(ssize_t, __syscall_pread, int, fd, void *, buf, size_t, count, off_t, offset_hi, off_t, offset_lo) # endif without any of the MY_PREAD* stuff. Not sure that would fly.
(In reply to Anthony Basile from comment #1) > (In reply to Anthony Basile from comment #0) > @mike. any advice here? should i just rewrite your "convert to > SYSCALL_ALIGN_64BIT" to apply to the HEAD of 0.9.33 branch and submit that > upstream? I would replace Sorry for the spam. I got it. It needed a check for __WORDSIZE == 32 and switching to _syscall4 if it isn't.
A patch was submitted upstream. See URL. Also the stage3's on the mirror have be replace with working versions of e2fsprogs-1.42.10 at http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64-uclibc-hardened/ The good tarbals are: stage3-amd64-uclibc-hardened-20150509.tar.bz2 stage3-amd64-uclibc-vanilla-20150509.tar.bz2
(In reply to Anthony Basile from comment #3) > A patch was submitted upstream. See URL. Also the stage3's on the mirror > have be replace with working versions of e2fsprogs-1.42.10 at > http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64- > uclibc-hardened/ The good tarbals are: > > stage3-amd64-uclibc-hardened-20150509.tar.bz2 > stage3-amd64-uclibc-vanilla-20150509.tar.bz2 Patch accepted upstream. I'll add it to 0.9.33.2-r15 which I'll push out later. http://git.uclibc.org/uClibc/commit/?h=0.9.33&id=0aaf783f8d0c2748aee458ecd5b846be595c3068
(In reply to Anthony Basile from comment #4) > (In reply to Anthony Basile from comment #3) > > A patch was submitted upstream. See URL. Also the stage3's on the mirror > > have be replace with working versions of e2fsprogs-1.42.10 at > > http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64- > > uclibc-hardened/ The good tarbals are: > > > > stage3-amd64-uclibc-hardened-20150509.tar.bz2 > > stage3-amd64-uclibc-vanilla-20150509.tar.bz2 > > Patch accepted upstream. I'll add it to 0.9.33.2-r15 which I'll push out > later. > > http://git.uclibc.org/uClibc/commit/?h=0.9. > 33&id=0aaf783f8d0c2748aee458ecd5b846be595c3068 I just pushed out 0.9.33.2-r15 with this fix.
(In reply to Anthony Basile from comment #5) > (In reply to Anthony Basile from comment #4) > > (In reply to Anthony Basile from comment #3) > > > A patch was submitted upstream. See URL. Also the stage3's on the mirror > > > have be replace with working versions of e2fsprogs-1.42.10 at > > > http://distfiles.gentoo.org/releases/amd64/autobuilds/current-stage3-amd64- > > > uclibc-hardened/ The good tarbals are: > > > > > > stage3-amd64-uclibc-hardened-20150509.tar.bz2 > > > stage3-amd64-uclibc-vanilla-20150509.tar.bz2 > > > > Patch accepted upstream. I'll add it to 0.9.33.2-r15 which I'll push out > > later. > > > > http://git.uclibc.org/uClibc/commit/?h=0.9. > > 33&id=0aaf783f8d0c2748aee458ecd5b846be595c3068 > > I just pushed out 0.9.33.2-r15 with this fix. 0.9.33.2-r15 is now marked stable for all arches and all older ebuilds have been punted. The mask on e2fsprogs{,-libs} has been lifed. This bug is done.