Bug 1335187

Summary: tier: uninitialized memory use
Product: [Community] GlusterFS Reporter: Kaleb KEITHLEY <kkeithle>
Component: tieringAssignee: bugs <bugs>
Status: CLOSED WONTFIX QA Contact: bugs <bugs>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, hgowtham
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-11-08 06:51:49 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On: 1332219, 1376663    
Bug Blocks:    

Description Kaleb KEITHLEY 2016-05-11 13:55:49 UTC
Description of problem:

  CC       tier.lo
tier.c:1922:13: warning: variable 'promote_thread' is used uninitialized whenever 'if' condition is true [-Wsometimes-uninitialized]
        if (ret) {
            ^~~
tier.c:1949:23: note: uninitialized use occurs here
        pthread_join (promote_thread, NULL);
                      ^~~~~~~~~~~~~~
tier.c:1922:9: note: remove the 'if' if its condition is always false
        if (ret) {
        ^~~~~~~~~~
tier.c:1897:33: note: initialize the variable 'promote_thread' to silence this warning
        pthread_t promote_thread;



also release-3.8 and release-3.7


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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Kaleb KEITHLEY 2016-05-11 13:58:57 UTC
see http://download.gluster.org/pub/gluster/glusterfs/static-analysis/master/glusterfs-clang/2016-05-10-3887804d/clang-master.txt

correction, warning does not exist in release-3.7

Comment 2 Vijay Bellur 2016-05-11 18:18:29 UTC
REVIEW: http://review.gluster.org/14297 (Fix uninitialized memory use for clang error for variables pthread_promote and pthread_demote in function tier_start().) posted (#1) for review on master by Dan Lambright (dlambrig)

Comment 3 Vijay Bellur 2016-05-11 18:59:42 UTC
REVIEW: http://review.gluster.org/14297 (cluster/tier: Fix uninitialized memory use for clang error.) posted (#2) for review on master by Dan Lambright (dlambrig)

Comment 4 Vijay Bellur 2016-05-12 00:00:18 UTC
REVIEW: http://review.gluster.org/14297 (cluster/tier: Fix uninitialized memory use for clang error.) posted (#3) for review on master by Dan Lambright (dlambrig)

Comment 6 hari gowtham 2018-11-08 06:51:49 UTC
Patch https://review.gluster.org/#/c/glusterfs/+/21331/ removes tier
functionality from GlusterFS.

https://bugzilla.redhat.com/show_bug.cgi?id=1642807 is used as the tracking bug
for this. Recommendation is to convert your tier volume to regular volume
(either replicate, ec, or plain distribute) with "tier detach" command before
upgrade, and use backend features like dm-cache etc to utilize the caching from
backend to provide better performance and functionality.