Bug 354171
Summary: | bogus locale handling: ENAMETOOLONG, environment strings in filenames | ||||||
---|---|---|---|---|---|---|---|
Product: | [Fedora] Fedora | Reporter: | John Reiser <jreiser> | ||||
Component: | bash | Assignee: | Roman Rakus <rrakus> | ||||
Status: | CLOSED WONTFIX | QA Contact: | Fedora Extras Quality Assurance <extras-qa> | ||||
Severity: | low | Docs Contact: | |||||
Priority: | low | ||||||
Version: | 10 | CC: | maurizio.antillon, pmatilai, rh-bugzilla, rrakus, tsmetana, twaugh | ||||
Target Milestone: | --- | Keywords: | Reopened | ||||
Target Release: | --- | ||||||
Hardware: | All | ||||||
OS: | Linux | ||||||
Whiteboard: | |||||||
Fixed In Version: | Doc Type: | Bug Fix | |||||
Doc Text: | Story Points: | --- | |||||
Clone Of: | Environment: | ||||||
Last Closed: | 2009-11-18 23:54:18 UTC | Type: | --- | ||||
Regression: | --- | Mount Type: | --- | ||||
Documentation: | --- | CRM: | |||||
Verified Versions: | Category: | --- | |||||
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |||||
Cloudforms Team: | --- | Target Upstream Version: | |||||
Embargoed: | |||||||
Attachments: |
|
Description
John Reiser
2007-10-26 14:38:38 UTC
I wasn't able to reproduce this. Could you attach full output of "strace -f bash -c date", please? I cannot reproduce it today, either. Attached is strace output (14KB excerpt) where I first noticed it, running strace on anaconda install from DVD. That output is huge (1GB), so I reproduced the problem using 'date'. Perhaps the environment was bad already upon entry to bash. Created attachment 242331 [details]
strace output showing dubious filenames (locale strings in filename)
from strace of anaconda during install from DVD
That's strange. Probably not a bash bug though. What snapshot is that? I began testing anaconda installs from DVD and CDs last week, and first noticed this problem on Thu.Oct.25. (I create my own install media using pungi, with source from rawhide via mirrors.) After composing three or four DVD and installing them, I tried and was able to re-create the problem just using "bash -c date". But not today. I see. Please, check versions of glibc and bash on the DVD that works and on the DVD that does not. It may be a bug in one of those which have been fixed already. And check, whether tomorrow's compose works. Thanks. Seems to be triggered when LANG + LC_COLLATE are set to different values: | $ env -i LANG=de_DE.utf-8 LC_COLLATE=C /usr/bin/strace /bin/bash -c false | open("/usr/lib/locale/LC.utf-8;LC_NUMERIC=de_DE.utf-8;LC_TIME=de_DE.utf-8;LC_COLLATE=C;LC_MONETARY=de_DE.utf-8;LC_MESSAGES=de_DE.utf-8;LC_PAPER=de_DE.utf-8;LC_NAME=de_DE.utf-8;LC_ADDRESS=de_DE.utf-8;LC_TELEPHONE=de_DE.utf-8;LC_MEASUREMENT=de_DE.utf-8;LC_IDENTIFICATION=de_DE.utf-8/LC_TIME", O_RDONLY) = -1 ENAMETOOLONG (File name too long) | open("/usr/lib/locale/LC.utf8lcnumericdedeutf8lctimededeutf8lccollateclcmonetarydedeutf8lcmessagesdedeutf8lcpaperdedeutf8lcnamededeutf8lcaddressdedeutf8lctelephonededeutf8lcmeasurementdedeutf8lcidentificationdedeutf8/LC_TIME", O_RDONLY) = -1 ENOENT (No such file or directory) Happens both on F-9 and F-8 bash-3.2-22.fc9.x86_64 bash-3.2-20.fc8 It's enough to set LC_COLLATE=C. The problem is in point, where we call setlocale(LC_ALL,""); for getting locale and then we assign this value setlocale(LC_CTYPE,getted_value); hence changing component to glibc. Probably it's issue of setlocale(). (In reply to comment #8) > It's enough to set LC_COLLATE=C. > The problem is in point, where we call setlocale(LC_ALL,""); for getting locale > and then we assign this value setlocale(LC_CTYPE,getted_value); > hence changing component to glibc. Probably it's issue of setlocale(). This is no glibc problem. The value returned by setlocale() is only usable for calls with the same category vlaue. I.e., you can pass the return value of setlocale(LC_ALL, "") only to other calls like setlocale(LC_ALL, str) but not setlocale(LC_CTYPE, str). If you want to get a value for LC_CTYPE then add an explicit setlocale(LC_CTYPE, NULL) call after the successful setlocale(LC_ALL, "") call. Reassigning back to bash. This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle. Changing version to '10'. More information and reason for this action is here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping This message is a reminder that Fedora 10 is nearing its end of life. Approximately 30 (thirty) days from now Fedora will stop maintaining and issuing updates for Fedora 10. It is Fedora's policy to close all bug reports from releases that are no longer maintained. At that time this bug will be closed as WONTFIX if it remains open with a Fedora 'version' of '10'. 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 Fedora version prior to Fedora 10'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 Fedora 10 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 Fedora please change the 'version' of this bug to the applicable version. If you are unable to change the version, please add a comment here and someone will do it for you. 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 Fedora release includes newer upstream software that fixes bugs or makes them obsolete. The process we are following is described here: http://fedoraproject.org/wiki/BugZappers/HouseKeeping Bug persists in (up-to-date) bash-3.2-30.fc10.i386; reproduced via the example in Comment #7. Bug apparently was fixed in bash-4.0-8.fc11. At least, I cannot reproduce it there. |