Bug 1336508

Summary: rpc-transport: compiler warning format string
Product: [Community] GlusterFS Reporter: Kaleb KEITHLEY <kkeithle>
Component: rpcAssignee: Mohit Agrawal <moagrawa>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, moagrawa, nbalacha
Target Milestone: ---Keywords: Triaged
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: glusterfs-3.9.0 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
: 1354394 1354395 (view as bug list) Environment:
Last Closed: 2017-03-27 18:25:08 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:    
Bug Blocks: 1336371, 1354394, 1354395, 1387960    

Description Kaleb KEITHLEY 2016-05-16 16:49:14 UTC
Description of problem:



Making all in rpc-transport
Making all in socket
Making all in src
  CC       socket.lo
  CC       name.lo
In file included from ../../../../libglusterfs/src/common-utils.h:35:0,
                 from ../../../../libglusterfs/src/dict.h:18,
                 from ../../../../rpc/rpc-lib/src/rpc-transport.h:61,
                 from socket.h:25,
                 from socket.c:11:
socket.c: In function '_socket_reap_own_threads':
socket.c:220:33: warning: format '%zu' expects argument of type 'size_t', but argument 2 has type 'pthread_t {aka long unsigned int}' [-Wformat=]
                                 "own-thread: failed to join thread (tid: %zu)",
                                 ^
../../../../libglusterfs/src/logging.h:208:46: note: in definition of macro 'FMT_WARN'
 #define FMT_WARN(fmt...) do { if (0) printf (fmt); } while (0)
                                              ^~~
socket.c:219:25: note: in expansion of macro 'gf_log'
                         gf_log (THIS->name, GF_LOG_ERROR,
                         ^~~~~~
socket.c:220:33: warning: format '%zu' expects argument of type 'size_t', but argument 7 has type 'pthread_t {aka long unsigned int}' [-Wformat=]
                                 "own-thread: failed to join thread (tid: %zu)",
                                 ^
../../../../libglusterfs/src/logging.h:259:34: note: in definition of macro 'gf_log'
                          levl, ##fmt);                                  \
                                  ^~~
  CCLD     socket.la
Making all in rdma




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


How reproducible:


Steps to Reproduce:
1.
2.
3.

Actual results:


Expected results:


Additional info:

Comment 1 Vijay Bellur 2016-06-10 10:16:14 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c In socket_spawn function it creates thread for socket_poller    And also start reaper thread to avoid thread leakup.    Same can be achieve by after enable detach flag at the time of creation of threads.    It is simple and no need to maintain any queue for store thread ids.) posted (#1) for review on master by Anonymous Coward

Comment 2 Vijay Bellur 2016-06-13 07:11:42 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#2) for review on master by Anonymous Coward

Comment 3 Vijay Bellur 2016-06-15 13:13:37 UTC
REVIEW: http://review.gluster.org/14694 (;rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#3) for review on master by Anonymous Coward

Comment 4 Vijay Bellur 2016-06-16 09:10:32 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#4) for review on master by Anonymous Coward

Comment 5 Vijay Bellur 2016-06-16 09:12:47 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#5) for review on master by Anonymous Coward

Comment 6 Vijay Bellur 2016-06-17 07:41:47 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#6) for review on master by MOHIT AGRAWAL (moagrawa)

Comment 7 Vijay Bellur 2016-06-17 10:02:22 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#7) for review on master by MOHIT AGRAWAL (moagrawa)

Comment 8 Vijay Bellur 2016-06-20 07:12:47 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#8) for review on master by MOHIT AGRAWAL (moagrawa)

Comment 9 Vijay Bellur 2016-06-20 10:56:50 UTC
REVIEW: http://review.gluster.org/14694 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#9) for review on master by MOHIT AGRAWAL (moagrawa)

Comment 10 Vijay Bellur 2016-06-21 13:53:53 UTC
REVIEW: http://review.gluster.org/14694 (    rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#10) for review on master by MOHIT AGRAWAL (moagrawa)

Comment 11 Vijay Bellur 2016-06-24 13:23:55 UTC
COMMIT: http://review.gluster.org/14694 committed in master by Jeff Darcy (jdarcy) 
------
commit 2ee48474be32f6ead2f3834677fee89d88348382
Author: Mohit Agrawal <moagrawa>
Date:   Mon Jun 13 12:41:15 2016 +0530

        rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.
    
        Problem: Current approach to cleanup threads of socket_poller is not appropriate.
    
        Solution: Enable detach flag at the time of thread creation in socket_spawn.
    
        Fix: Write a new wrapper(gf_create_detach_thread) to create detachable thread
             instead of store thread ids in a queue.
    
        Test: Fix is verfied on gluster process, To test the patch followed below procedure
              Enable the client.ssl and server.ssl option on the volume
              Start the volume and count anon segment in pmap output for glusterd process
              pmap -x <glusterd-pid> | grep "\[ anon \]" | wc -l
              Stop the volume and check again count of anon segment it should not increase.
    
    Signed-off-by: Mohit Agrawal <moagrawa>
    Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37
    BUG: 1336508
    Reviewed-on: http://review.gluster.org/14694
    Smoke: Gluster Build System <jenkins.org>
    Reviewed-by: Atin Mukherjee <amukherj>
    CentOS-regression: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Jeff Darcy <jdarcy>

Comment 12 Shyamsundar 2017-03-27 18:25:08 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.9.0, please open a new bug report.

glusterfs-3.9.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://lists.gluster.org/pipermail/gluster-users/2016-November/029281.html
[2] https://www.gluster.org/pipermail/gluster-users/