Description of problem: This problem is somehow related to polish locales. fsck.ext3 -cvf /dev/sdb1 e2fsck 1.41.12 (17-May-2010) Poszukiwanie wadliwych bloków (tyl^CGotowe w 0.01%, minęło 0:090807060504 Interrupted at block 56320 /dev/sdb1: Updating bad block inode. Please take a look at timer 0:090807060504 - strange. Isn't it? (And it's getting worse over time. I can not leave fsck with polish locales on screen, because output is totally messed up later, when I check results) This is caused by two letters "ęł" in "minęło" word. When I change this string to "minelo" sudo fsck.ext3 -cvf /dev/sdb1 e2fsck 1.41.12 (17-May-2010) Poszukiwanie wadliwych bloków (tylko odczyt): ^Ctowe w 0.10%, minelo 0:47 Interrupted at block 375936 /dev/sdb1: Updating bad block inode. Everything is fine. This is not a big problem, I can use different locale, but it's still a bug :)
I'm not certain where to start with this. Can you translate some of the above strings for me so I know where it is in the code? I'm no local/i18n expert, sadly. Can I reproduce this myself somehow? Thanks, -Eric
misc/badblocks.c line 201 <------>len = snprintf(line_buf, sizeof(line_buf),. <------><------> _("%6.2f%% done, %s elapsed"), <------><------> calc_percent((unsigned long) currently_testing, <------><------><------><------> (unsigned long) num_blocks),. <------><------> time_diff_format(&time_end, &time_start, diff_buf)); Translation is in po/pl.po line 3089 #: misc/badblocks.c:202 #, c-format msgid "%6.2f%% done, %s elapsed" msgstr "Gotowe w %6.2f%%, min..o %s" I think that you can reproduce this bug by adding LANG="pl_PL" LANG="pl_PL" sudo fsck.ext3 -cvf /dev/sdb1 IMHO removal of the polish characters from string is fully acceptable solution if the problem is not obvious to solve.
Created attachment 461670 [details] patch that removes polish chars from translation string - fixes bug This patch removes polish chars from translation. Please use it if there is no better solution.
Thank you for the further information! I'll try to sort this out. -Eric
Is e2fsprogs the only package that's exhibiting the problem? Surely this isn't the only translation with polish characters...?
I have not noticed problems with displaing polish characters in other programs.
It was pointed out to me by Arkadiusz Miskiewicz that "the update function that updates timer there doesn't correctly count for multibyte locales causing little shift on the screen which in the end causes many digits written" and "wchar.h and wcslen() instead of strlen maybe will work" I'll look into that.
Created attachment 461674 [details] testcase I created a test case that demonstrates this problem.
OMG :), I checked this test case without polish chars. It doesn't work as expected - probably I should think about re-learning C :)
Ahah. Finally looked at the code. This is fixed upstream. the 2nd assignment of "len" should fix it I think: len = snprintf(line_buf, sizeof(line_buf), _("%6.2f%% done, %s elapsed"), calc_percent((unsigned long) currently_testing, (unsigned long) num_blocks), time_diff_format(&time_end, &time_start, diff_buf)); #ifdef HAVE_MBSTOWCS len = mbstowcs(NULL, line_buf, sizeof(line_buf)); #endif $ git annotate misc/badblocks.c | grep MBSTOWCS 61ef2474 (Theodore Ts'o 2010-08-01 22:30:33 -0400 206)#ifdef HAVE_MBSTOWCS $ git show 61ef2474 commit 61ef2474c24c80a5bf0e24ba85a7506fd7651a5c Author: Theodore Ts'o <tytso> Date: Sun Aug 1 22:30:33 2010 -0400 badblocks: Deal with UTF-8 characters in progress message Addresses-Gentoo-Bug: #309909 Addresses-Debian-Bug: #583782 Addresses-Debian-Bug: #587834 Signed-off-by: "Theodore Ts'o" <tytso> ... If this is causing you trouble in F14 I could certainly pull that patch over, I think. -Eric
It would be great. Best regards, Michal
Apologies for the late action on this. I did a scratch build with the patch in place, care to test it? http://kojipkgs.fedoraproject.org/scratch/sandeen/task_2650057/ Thanks, -Eric
"Apologies for the late action on this." No problem, it wasn't critical bug :) "care to test it?" Works fine. Thanks! Best regards, Michal
(In reply to comment #13) > "Apologies for the late action on this." > > No problem, it wasn't critical bug :) > > "care to test it?" > > Works fine. Thanks! Great, thanks. I'll get it pushed out today.
e2fsprogs-1.41.12-6.fc14 has been submitted as an update for Fedora 14. https://admin.fedoraproject.org/updates/e2fsprogs-1.41.12-6.fc14
e2fsprogs-1.41.12-6.fc14 has been pushed to the Fedora 14 testing repository. If problems still persist, please make note of it in this bug report. If you want to test the update, you can install it with su -c 'yum --enablerepo=updates-testing update e2fsprogs'. You can provide feedback for this update here: https://admin.fedoraproject.org/updates/e2fsprogs-1.41.12-6.fc14
e2fsprogs-1.41.12-6.fc14 has been pushed to the Fedora 14 stable repository. If problems still persist, please make note of it in this bug report.