Bug 209651 - startkde fails to start - testing for /tmp free space is wrong when non-English locale is used
startkde fails to start - testing for /tmp free space is wrong when non-Engli...
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 4
Classification: Red Hat
Component: kdebase (Show other bugs)
4.4
All Linux
medium Severity medium
: ---
: ---
Assigned To: Ngo Than
desktop-bugs@redhat.com
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2006-10-06 13:23 EDT by Aleksey Nogin
Modified: 2009-05-18 16:22 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
* when KDE starts, it uses df to verify that there is enough free disk space available for it in the /tmp directory. However, the method that KDE used to parse the output from df assumed that the output would be in a language like English where the word df uses for "filesystem" is one word. In languages (like Russian, for example) where the word used by df for "filesystem" is not one word, kde parsed the output from df incorrectly, and would read the number of free blocks as the number of used blocks. Therefore, if /tmp was empty, KDE would read it as full and fail to start, printing the error message "Not enough free disk space on /tmp". KDE now uses the LANG=C locale when it runs df and therefore parses the output correctly.
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-05-18 16:22:24 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Aleksey Nogin 2006-10-06 13:23:08 EDT
Reproducible: 100%

To reproduce:
With LANG=ru_RU.UTF-8 and /tmp completely empty, run startkde.

Expected: KDE starts

Actual: Prints "Not enough free disk space on /tmp" and quits.

The problem is that the /usr/bin/startkde script (as of kdebase-3.3.1-5.13) has
the following line 
space_tmp=`df /tmp | xargs | cut -d" " -f11`

The -f11 part would only work correctly if the field names in the df output have
the expected numnber of spaces in them. However, the Russian translation of df's
messages has "Fylesystem" translated as "Файловая система", adding an extra
space. This results in space_tmp getting the number of _used_ blocks instead of
the number of _free_ blocks it was supposed to get. Hence, if the filesystem is
completely free, it mistakenly thinks it's completely full!
Comment 2 RHEL Product and Program Management 2008-09-05 13:17:22 EDT
This request was evaluated by Red Hat Product Management for inclusion in a Red
Hat Enterprise Linux maintenance release.  Product Management has requested
further review of this request by Red Hat Engineering, for potential
inclusion in a Red Hat Enterprise Linux Update release for currently deployed
products.  This request is not yet committed for inclusion in an Update
release.
Comment 5 Ruediger Landmann 2009-01-27 00:07:53 EST
Release note added. If any revisions are required, please set the 
"requires_release_notes" flag to "?" and edit the "Release Notes" field accordingly.
All revisions will be proofread by the Engineering Content Services team.

New Contents:
* when KDE starts, it uses df to verify that there is enough free disk space available for it in the /tmp directory. However, the method that KDE used to parse the output from df assumed that the output would be in a language like English where the word df uses for "filesystem" is one word. In languages (like Russian, for example) where the word used by df for "filesystem" is not one word, kde parsed the output from df incorrectly, and would read the number of free blocks as the number of used blocks. Therefore, if /tmp was empty, KDE would read it as full and fail to start, printing the error message "Not enough free disk space on /tmp". KDE now uses the LANG=C locale when it runs df and therefore parses the output correctly.
Comment 8 errata-xmlrpc 2009-05-18 16:22:24 EDT
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-2009-0992.html

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