Bug 647938 - sort assertion failure if LC_CTYPE does not match LC_TIME
Summary: sort assertion failure if LC_CTYPE does not match LC_TIME
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: coreutils
Version: 13
Hardware: All
OS: Unspecified
low
medium
Target Milestone: ---
Assignee: Kamil Dudka
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard: abrt_hash:f3762814c36b2b31c84f03c78d2...
Depends On:
Blocks: 649224
TreeView+ depends on / blocked
 
Reported: 2010-10-29 21:37 UTC by Lukas Middendorf
Modified: 2010-11-17 23:24 UTC (History)
4 users (show)

Fixed In Version: coreutils-8.4-10.fc13
Doc Type: Bug Fix
Doc Text:
Clone Of:
: 649224 (view as bug list)
Environment:
Last Closed: 2010-11-04 23:45:54 UTC
Type: ---


Attachments (Terms of Use)
File: backtrace (8.22 KB, text/plain)
2010-10-29 21:37 UTC, Lukas Middendorf
no flags Details
proposed fix (1.00 KB, patch)
2010-11-02 17:31 UTC, Kamil Dudka
no flags Details | Diff
proposed fix V2 (against rawhide) (2.19 KB, patch)
2010-11-02 18:33 UTC, Kamil Dudka
ovasik: review+
Details | Diff

Description Lukas Middendorf 2010-10-29 21:37:50 UTC
abrt version: 1.1.13
architecture: x86_64
Attached file: backtrace
cmdline: sort --version
component: coreutils
crash_function: raise
executable: /bin/sort
kernel: 2.6.34.7-61.fc13.x86_64
package: coreutils-8.4-9.fc13
rating: 4
reason: Process /bin/sort was killed by signal 6 (SIGABRT)
release: Fedora release 13 (Goddard)
time: 1288387960
uid: 500

comment
-----
sort from coreutils just crashes and does not work at all. Output is

sort: sort.c:1306: inittables_mb: Assertion `mblength != (size_t)-1 && mblength != (size_t)-2' failed.
Aborted (core dumped)

I'm using coreutils-8.4.9.fc13 on an updated F13 system (x86_64).
I have also tried to rebuild coreutils-8.5-5.fc14.1.src.rpm for F13, but the result is the same.

How to reproduce
-----
1. run "sort" in any way (like "sort --version")

Comment 1 Lukas Middendorf 2010-10-29 21:37:53 UTC
Created attachment 456566 [details]
File: backtrace

Comment 2 Kamil Dudka 2010-10-29 22:39:22 UTC
Thank you for filing the bug!  Please append the output of 'locale'.

Comment 3 Lukas Middendorf 2010-10-29 22:52:30 UTC
Output of 'locale' is
LANG=en_US.UTF-8
LC_CTYPE="en_US.UTF-8"
LC_NUMERIC="en_US.UTF-8"
LC_TIME=de_DE
LC_COLLATE="en_US.UTF-8"
LC_MONETARY="en_US.UTF-8"
LC_MESSAGES="en_US.UTF-8"
LC_PAPER="en_US.UTF-8"
LC_NAME="en_US.UTF-8"
LC_ADDRESS="en_US.UTF-8"
LC_TELEPHONE="en_US.UTF-8"
LC_MEASUREMENT="en_US.UTF-8"
LC_IDENTIFICATION="en_US.UTF-8"
LC_ALL=

Comment 4 Kamil Dudka 2010-10-30 15:46:11 UTC
Right, sort needs to be fixed.  The following should get you over the problem until we fix it properly:

$ export LC_TIME=de_DE.UTF-8

Comment 5 Kamil Dudka 2010-11-02 17:31:43 UTC
Created attachment 457239 [details]
proposed fix

Comment 6 Kamil Dudka 2010-11-02 18:33:16 UTC
Created attachment 457246 [details]
proposed fix V2 (against rawhide)

Comment 7 Ondrej Vasik 2010-11-03 09:28:24 UTC
Comment on attachment 457246 [details]
proposed fix V2 (against rawhide)

Thanks Kamil, looks fine, although some hunks in your new patch are IMHO unrelated to this issue :).

Comment 8 Kamil Dudka 2010-11-03 11:01:13 UTC
(In reply to comment #7)
> Thanks Kamil, looks fine, although some hunks in your new patch are IMHO
> unrelated to this issue :).

Right, those hunks just eliminate some unrelated warnings in sort.c that were caused by the i18n patch.  I forgot to mention it...

Comment 9 Kamil Dudka 2010-11-03 11:36:27 UTC
fixed in coreutils-8.6-3.fc15

Comment 10 Fedora Update System 2010-11-03 11:50:33 UTC
coreutils-8.5-7.fc14 has been submitted as an update for Fedora 14.
https://admin.fedoraproject.org/updates/coreutils-8.5-7.fc14

Comment 11 Fedora Update System 2010-11-03 11:57:19 UTC
coreutils-8.4-10.fc13 has been submitted as an update for Fedora 13.
https://admin.fedoraproject.org/updates/coreutils-8.4-10.fc13

Comment 12 Fedora Update System 2010-11-03 21:07:51 UTC
coreutils-8.4-10.fc13 has been pushed to the Fedora 13 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 coreutils'.  You can provide feedback for this update here: https://admin.fedoraproject.org/updates/coreutils-8.4-10.fc13

Comment 13 Fedora Update System 2010-11-04 23:45:49 UTC
coreutils-8.5-7.fc14 has been pushed to the Fedora 14 stable repository.  If problems still persist, please make note of it in this bug report.

Comment 14 Fedora Update System 2010-11-17 23:24:48 UTC
coreutils-8.4-10.fc13 has been pushed to the Fedora 13 stable repository.  If problems still persist, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.