Bug 209651

Summary: startkde fails to start - testing for /tmp free space is wrong when non-English locale is used
Product: Red Hat Enterprise Linux 4 Reporter: Aleksey Nogin <aleksey>
Component: kdebaseAssignee: Than Ngo <than>
Status: CLOSED ERRATA QA Contact: desktop-bugs <desktop-bugs>
Severity: medium Docs Contact:
Priority: medium    
Version: 4.4CC: llim, pknirsch
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
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 20:22:24 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:

Description Aleksey Nogin 2006-10-06 17:23:08 UTC
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 Program Management 2008-09-05 17:17:22 UTC
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 05:07:53 UTC
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 20:22:24 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-2009-0992.html