Bug 1117951 - [HC] - Use C-locale for numerics (strtod and friends)
Summary: [HC] - Use C-locale for numerics (strtod and friends)
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: pre-release
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Anders Blomdell
QA Contact:
URL:
Whiteboard:
: 1175641 (view as bug list)
Depends On:
Blocks: 1122902 1157107 oVirt_Hosted_Engine_GlusterFS
TreeView+ depends on / blocked
 
Reported: 2014-07-09 17:07 UTC by Anders Blomdell
Modified: 2015-05-14 17:42 UTC (History)
6 users (show)

Fixed In Version: glusterfs-3.7.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2015-05-14 17:26:15 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)
Patch to explicitly set LC_NUMERIC to C-locale (532 bytes, patch)
2014-07-09 17:07 UTC, Anders Blomdell
no flags Details | Diff

Description Anders Blomdell 2014-07-09 17:07:55 UTC
Created attachment 916897 [details]
Patch to explicitly set LC_NUMERIC to C-locale

Description of problem:

Commit 040319d8bced2f25bf25d8f6b937901c3a40e34b added a 

  setlocale(LC_ALL, "");

libglusterfs/src/logging.c. For some locales [i,.e. sv_SE.utf8] this will mean that the decimal separator is not '.', but somethhing else (',' in the
sv_SE.utf8 case), causing _gf_string2double will fail due to strtod ('1.0', &tail) will give the tail '.0'.


Version-Release number of selected component (if applicable):


How reproducible:

Always with the wrong locale.


Steps to Reproduce:
1. env -i LC_NUMERIC=sv_SE.utf8 /usr/sbin/glusterfs ...

Comment 1 Anand Avati 2014-07-11 17:21:54 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string routines (strtod, ...) or config file parsing might fail.) posted (#2) for review on master by Anders Blomdell (anders.blomdell@control.lth.se)

Comment 2 Anand Avati 2014-07-15 10:37:57 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string conversion routines) posted (#6) for review on master by Anders Blomdell (anders.blomdell@control.lth.se)

Comment 3 Anand Avati 2014-07-15 13:40:07 UTC
REVIEW: http://review.gluster.org/8299 (Use C-locale for numeric/string conversion routines) posted (#7) for review on master by Anders Blomdell (anders.blomdell@control.lth.se)

Comment 4 Anand Avati 2014-07-19 21:16:09 UTC
COMMIT: http://review.gluster.org/8299 committed in master by Vijay Bellur (vbellur@redhat.com) 
------
commit 5b8de971a4b81bc2bd6de0ffc6386587226295c6
Author: Anders Blomdell <anders.blomdell@control.lth.se>
Date:   Fri Jul 11 19:10:21 2014 +0200

    Use C-locale for numeric/string conversion routines
    
    (strtod, ...) or config file parsing might fail.
    
    
    Change-Id: I649f29bbf87222399a0c2d1ed5a3bf136c613b9b
    BUG: 1117951
    Signed-off-by: Anders Blomdell <anders.blomdell@control.lth.se>
    Reviewed-on: http://review.gluster.org/8299
    Tested-by: Gluster Build System <jenkins@build.gluster.com>
    Reviewed-by: Prashanth Pai <ppai@redhat.com>
    Reviewed-by: Vijay Bellur <vbellur@redhat.com>

Comment 5 Sandro Bonazzola 2014-12-19 12:29:25 UTC
Still an issue in 3.6.1, please set target release.

Comment 6 Sandro Bonazzola 2014-12-19 12:30:06 UTC
*** Bug 1175641 has been marked as a duplicate of this bug. ***

Comment 7 Anders Blomdell 2015-01-12 12:24:16 UTC
(In reply to Sandro Bonazzola from comment #5)
> Still an issue in 3.6.1, please set target release.

> Flags: needinfo?(anders.blomdell@control.lth.se)
What info is need from me?

Comment 8 Anders Blomdell 2015-01-19 14:45:55 UTC
(In reply to Anders Blomdell from comment #7)
> (In reply to Sandro Bonazzola from comment #5)
> > Still an issue in 3.6.1, please set target release.
> 
> > Flags: needinfo?(anders.blomdell@control.lth.se)
> What info is need from me?
Since I got no resonse, I'll clear the needinfo flag.

Comment 9 Niels de Vos 2015-05-14 17:26:15 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 10 Niels de Vos 2015-05-14 17:35:28 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 11 Niels de Vos 2015-05-14 17:37:50 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user

Comment 12 Niels de Vos 2015-05-14 17:42:31 UTC
This bug is getting closed because a release has been made available that should address the reported issue. In case the problem is still not fixed with glusterfs-3.7.0, please open a new bug report.

glusterfs-3.7.0 has been announced on the Gluster mailinglists [1], packages for several distributions should become available in the near future. Keep an eye on the Gluster Users mailinglist [2] and the update infrastructure for your distribution.

[1] http://thread.gmane.org/gmane.comp.file-systems.gluster.devel/10939
[2] http://thread.gmane.org/gmane.comp.file-systems.gluster.user


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