Bug 1354394 - rpc-transport: compiler warning format string
Summary: rpc-transport: compiler warning format string
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: rpc
Version: 3.7.12
Hardware: x86_64
OS: All
medium
medium
Target Milestone: ---
Assignee: Mohit Agrawal
QA Contact:
URL:
Whiteboard:
Depends On: 1336508 1354395
Blocks: 1356942
TreeView+ depends on / blocked
 
Reported: 2016-07-11 08:41 UTC by Mohit Agrawal
Modified: 2016-08-02 07:24 UTC (History)
3 users (show)

Fixed In Version: glusterfs-3.7.14
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1336508
Environment:
Last Closed: 2016-08-02 07:24:32 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)

Description Mohit Agrawal 2016-07-11 08:41:22 UTC
+++ This bug was initially created as a clone of Bug #1336508 +++

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:

--- Additional comment from Vijay Bellur on 2016-06-10 06:16:14 EDT ---

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

--- Additional comment from Vijay Bellur on 2016-06-13 03:11:42 EDT ---

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

--- Additional comment from Vijay Bellur on 2016-06-15 09:13:37 EDT ---

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

--- Additional comment from Vijay Bellur on 2016-06-16 05:10:32 EDT ---

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

--- Additional comment from Vijay Bellur on 2016-06-16 05:12:47 EDT ---

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

--- Additional comment from Vijay Bellur on 2016-06-17 03:41:47 EDT ---

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)

--- Additional comment from Vijay Bellur on 2016-06-17 06:02:22 EDT ---

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)

--- Additional comment from Vijay Bellur on 2016-06-20 03:12:47 EDT ---

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)

--- Additional comment from Vijay Bellur on 2016-06-20 06:56:50 EDT ---

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)

--- Additional comment from Vijay Bellur on 2016-06-21 09:53:53 EDT ---

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)

--- Additional comment from Vijay Bellur on 2016-06-24 09:23:55 EDT ---

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 1 Vijay Bellur 2016-07-11 09:46:42 UTC
REVIEW: http://review.gluster.org/14886 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#1) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

Comment 2 Vijay Bellur 2016-07-12 01:32:11 UTC
REVIEW: http://review.gluster.org/14886 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#2) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

Comment 3 Vijay Bellur 2016-07-12 01:39:06 UTC
REVIEW: http://review.gluster.org/14886 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#3) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

Comment 4 Vijay Bellur 2016-07-21 05:48:53 UTC
REVIEW: http://review.gluster.org/14886 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#4) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

Comment 5 Vijay Bellur 2016-07-21 05:48:56 UTC
REVIEW: http://review.gluster.org/14970 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#1) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

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

Comment 7 Vijay Bellur 2016-07-26 05:42:58 UTC
REVIEW: http://review.gluster.org/14886 (rpc/socket.c: Modify approach to cleanup threads of socket_poller in socket_spawn.) posted (#6) for review on release-3.7 by MOHIT AGRAWAL (moagrawa)

Comment 8 Vijay Bellur 2016-07-26 11:42:21 UTC
COMMIT: http://review.gluster.org/14886 committed in release-3.7 by Raghavendra G (rgowdapp) 
------
commit a0f66d107a29e2db5bdd96dec4bc112330b5f5aa
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.
    
    Backport of commit 2ee48474be32f6ead2f3834677fee89d88348382
    
    > 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>
    
    BUG: 1354394
    Change-Id: I271e83e7a210ecd27a7471c53147ceb837a33cad
    Signed-off-by: Mohit Agrawal <moagrawa>
    Reviewed-on: http://review.gluster.org/14886
    CentOS-regression: Gluster Build System <jenkins.org>
    Smoke: Gluster Build System <jenkins.org>
    NetBSD-regression: NetBSD Build System <jenkins.org>
    Reviewed-by: Raghavendra G <rgowdapp>

Comment 9 Kaushal 2016-08-02 07:24:32 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.14, please open a new bug report.

glusterfs-3.7.14 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] https://www.gluster.org/pipermail/gluster-devel/2016-August/050319.html
[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.