[Bugs] [Bug 1354395] New: rpc-transport: compiler warning format string

bugzilla at redhat.com bugzilla at redhat.com
Mon Jul 11 08:42:31 UTC 2016


https://bugzilla.redhat.com/show_bug.cgi?id=1354395

            Bug ID: 1354395
           Summary: rpc-transport: compiler warning format string
           Product: GlusterFS
           Version: 3.8.0
         Component: rpc
          Keywords: Triaged
          Severity: medium
          Assignee: bugs at gluster.org
          Reporter: moagrawa at redhat.com
                CC: bugs at gluster.org, kkeithle at redhat.com,
                    moagrawa at redhat.com
        Depends On: 1336508
            Blocks: 1354394



+++ 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 at redhat.com)

--- 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 at redhat.com)

--- 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 at redhat.com)

--- 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 at redhat.com)

--- 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 at redhat.com)

--- 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 at redhat.com) 
------
commit 2ee48474be32f6ead2f3834677fee89d88348382
Author: Mohit Agrawal <moagrawa at redhat.com>
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 at redhat.com>
    Change-Id: Ib8f7ec7504ec8f6f74b45ce6719b6fb47f9fdc37
    BUG: 1336508
    Reviewed-on: http://review.gluster.org/14694
    Smoke: Gluster Build System <jenkins at build.gluster.org>
    Reviewed-by: Atin Mukherjee <amukherj at redhat.com>
    CentOS-regression: Gluster Build System <jenkins at build.gluster.org>
    NetBSD-regression: NetBSD Build System <jenkins at build.gluster.org>
    Reviewed-by: Jeff Darcy <jdarcy at redhat.com>


Referenced Bugs:

https://bugzilla.redhat.com/show_bug.cgi?id=1336508
[Bug 1336508] rpc-transport: compiler warning format string
https://bugzilla.redhat.com/show_bug.cgi?id=1354394
[Bug 1354394] rpc-transport: compiler warning format string
-- 
You are receiving this mail because:
You are on the CC list for the bug.
You are the assignee for the bug.


More information about the Bugs mailing list