Bug 670988 - iconv regression
Summary: iconv regression
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: glibc
Version: 5.6
Hardware: x86_64
OS: Linux
high
high
Target Milestone: rc
: ---
Assignee: Andreas Schwab
QA Contact: qe-baseos-tools-bugs
URL:
Whiteboard:
Depends On:
Blocks: CVE-2011-0536 682991 707606
TreeView+ depends on / blocked
 
Reported: 2011-01-19 20:51 UTC by Alan Matsuoka
Modified: 2018-11-14 16:13 UTC (History)
6 users (show)

Fixed In Version: glibc-2.5-61
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-21 08:31:28 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
gconvmakefile.patch (1.11 KB, patch)
2011-01-19 20:53 UTC, Alan Matsuoka
no flags Details | Diff


Links
System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2011:1034 0 normal SHIPPED_LIVE glibc bug fix update 2011-07-20 15:44:02 UTC

Description Alan Matsuoka 2011-01-19 20:51:38 UTC
Description of Problem:
imap command came not to search japanese word after updating to glibc-2.5-49.el5_5.7.i686.
This issue was reported by our customer but we could reproduce this issue, too.

Actually, this issue does not happen in old glibc version but happens in glibc-2.5-49.
We believe the cause is related to glibc-2.5-49.el5_5.7.i686.

Could you please investigate root cause?
I upload sosreport and dovecot.log.
dovecot.log is strace information collected when this issue happened.

According to strace info, imap did not refer to files under /usr/lib/gconv and could not read
library files , so could not search japanese word.

** Strace info collected when this issue happened.
--- Excerpt from dovecot.log ---
18481 14:02:24.021261 read(0, "03 UID SEARCH CHARSET ISO-2022-J"..., 4078) = 103
18481 14:02:24.021599 open("/home/users/mtnecst/Mailindex/index/.INBOX/dovecot.index.cache", O_RDWR|O_LARGEFILE) = 8
18481 14:02:24.021878 open("/home/users/mtnecst/Mailindex/control/.INBOX/dovecot-uidlist", O_RDONLY|O_LARGEFILE) = 9
18481 14:02:24.022501 open("/home/users/mtnecst/Maildir/cur/XXXXXXXXXX.XXXXX_X.XXXXXX.XXXX.XXXX-X.XX.XX:2,",  O_RDONLY|O_LARGEFILE)
= 9
18481 14:02:24.022763 open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 10
18481 14:02:24.023016 open("/usr/lib/gconv/ISO-2022-JP.so", O_RDONLY) = 10

18481 14:02:24.023372 open("$ORIGIN/tls/i686/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023428 open("$ORIGIN/tls/i686/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023482 open("$ORIGIN/tls/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023534 open("$ORIGIN/tls/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023583 open("$ORIGIN/i686/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023635 open("$ORIGIN/i686/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023684 open("$ORIGIN/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.023733 open("$ORIGIN/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
^^^^^^^
18481 14:02:24.023782 open("/etc/ld.so.cache", O_RDONLY) = 10

18481 14:02:24.036257 open("/lib/i686/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.036307 open("/lib/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.036365 open("/usr/lib/tls/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.036416 open("/usr/lib/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
18481 14:02:24.036471 open("/usr/lib/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)

18481 14:02:24.036733 write(1, "03 NO [BADCHARSET] Unknown chars"..., 36) = 36
--------------------------------------

** Strace info collected when this issue did not happen.
----------------------------------------------------------------------
32235 15:59:59.547683 read(0, "03 UID SEARCH CHARSET ISO-2022-J"..., 4077) = 54
32235 15:59:59.556235 open("/home/imaptest3/Maildir/dovecot.index.cache", O_RDWR|O_LARGEFILE) = 8
32235 15:59:59.559326 open("/home/imaptest3/Maildir/dovecot-uidlist", O_RDONLY|O_LARGEFILE) = 9
32235 15:59:59.564745 open("/home/imaptest3/Maildir/cur/YYYYYYYYYY.YYYYYYYYYYYYYYY.YYYYYYY-Y.YY.YYYY:2,S", O_RDONLY|O_LARGEF
ILE) = 9
32235 15:59:59.570712 open("/usr/lib/gconv/gconv-modules.cache", O_RDONLY) = 10 32235 15:59:59.571709 fstat64(10,
{st_mode=S_IFREG|0644, st_size=25462, ...}) = 0
32235 15:59:59.574132 open("/usr/lib/gconv/ISO-2022-JP.so", O_RDONLY) = 10
32235 15:59:59.581720 open("/usr/lib/gconv/tls/i686/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.583264 open("/usr/lib/gconv/tls/i686/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.585102 open("/usr/lib/gconv/tls/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.586168 open("/usr/lib/gconv/tls/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.587979 open("/usr/lib/gconv/i686/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.589694 open("/usr/lib/gconv/i686/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.590954 open("/usr/lib/gconv/sse2/libJIS.so", O_RDONLY) = -1 ENOENT (No such file or directory)
32235 15:59:59.592191 open("/usr/lib/gconv/libJIS.so", O_RDONLY) = 10
^^^^^^^^^^^^^^^
32235 15:59:59.597172 open("/usr/lib/gconv/libGB.so", O_RDONLY) = 10
^^^^^^^^^^^^^^^
32235 15:59:59.602983 open("/usr/lib/gconv/libKSC.so", O_RDONLY) = 10
^^^^^^^^^^^^^^^
32235 15:59:59.612979 open("/home/imaptest3/Maildir/cur/YYYYYYYYYY.YYYYYYYYYYYYYYY.YYYYYYY-Y.YY.YYYY:2,S", O_RDONLY|O_LARGEF
ILE) = 9

32235 15:59:59.625101 write(1, "* SEARCH\r\n03 OK Search completed"..., 35) = 35
----------------------------------------------------------------------

How reproducible:
Always.

Steps to Reproduce:
1. Update to glibc-2.5-49.el5_5.7.i686
2. Start dovecot
# service dovecot start

3. Operate imap via telnet as follows.

$ telnet localhost 143
Trying 127.0.0.1...
Connected to localhost.localdomain (127.0.0.1).
Escape character is '^]'.
* OK Dovecot ready.
01 login <username> <passward>
01 OK Logged in.
02 EXAMINE INBOX
* FLAGS (\Answered \Flagged \Deleted \Seen \Draft)
* OK [PERMANENTFLAGS ()] Read-only mailbox.
* 288 EXISTS
* 194 RECENT
* OK [UIDVALIDITY 1231382867] UIDs valid
* OK [UIDNEXT 71425] Predicted next UID
02 OK [READ-ONLY] Select completed.
03 UID SEARCH CHARSET ISO-2022-JP UID 67493:71182 OR (TEXT ".$B$F$9$H.(B") (HEADER cc ".$B$F$9$H.(B")
03 NO [BADCHARSET] Unknown charset

When old glibc ( such as glibc-2.5-12) is installed, this issue does not happen. 

It appears that the LD path for libJIS.so and others are wrong.
The attached patch appears to fix the problem.

Comment 1 Alan Matsuoka 2011-01-19 20:53:20 UTC
Created attachment 474355 [details]
gconvmakefile.patch

Comment 4 Tomas Hoger 2011-03-08 09:15:52 UTC
See bug #667974.

Comment 7 errata-xmlrpc 2011-07-21 08:31:28 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2011-1034.html


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