Bug 1482804 - Negative Test: glusterd crashes for some of the volume options if set at cluster level
Summary: Negative Test: glusterd crashes for some of the volume options if set at clus...
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: glusterd
Version: 3.12
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Atin Mukherjee
QA Contact:
URL:
Whiteboard:
Depends On: 1482344
Blocks: 1477250
TreeView+ depends on / blocked
 
Reported: 2017-08-18 06:42 UTC by Atin Mukherjee
Modified: 2017-10-26 14:36 UTC (History)
7 users (show)

Fixed In Version: glusterfs-3.12.0
Doc Type: If docs needed, set a value
Doc Text:
Clone Of: 1482344
Environment:
Last Closed: 2017-09-05 17:39:07 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:


Attachments (Terms of Use)

Comment 1 Worker Ant 2017-08-18 06:43:34 UTC
REVIEW: https://review.gluster.org/18060 (glusterd: disallow volume specific options to be set with all as volume name) posted (#1) for review on release-3.12 by Atin Mukherjee (amukherj@redhat.com)

Comment 2 Atin Mukherjee 2017-08-18 06:44:57 UTC
Description of problem:
====================
It was suggested to set the value of transport.listen-backlog  to a value of 128. I tried to set it at cluster level, and this led to glusterd crash. The same is seen even with performance.parallel-readdir. Although it is a volume level, it leads to crash


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

How reproducible:
===========
always

Steps to Reproduce:
1.have a cluster
2. try to set performance.parallel-readdir  or ":transport.listen-backlog"  at cluster level as below
gluster v set all transport.listen-backlog 128

(or)
gluster v set all performance.parallel-readdir on



Actual results:
============
glusterd crashes

Expected results:
============
glusterd must exit and throw an error gracefully, if it is not the way of setting an option




core information:

Core was generated by `/usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO'.
Program terminated with signal 11, Segmentation fault.
#0  glusterd_is_tier_daemon_running (volinfo=volinfo@entry=0x0) at glusterd-utils.c:6948
6948	        if (volinfo->type != GF_CLUSTER_TYPE_TIER)
Missing separate debuginfos, use: debuginfo-install bzip2-libs-1.0.6-13.el7.x86_64 device-mapper-event-libs-1.02.140-8.el7.x86_64 device-mapper-libs-1.02.140-8.el7.x86_64 elfutils-libelf-0.168-8.el7.x86_64 elfutils-libs-0.168-8.el7.x86_64 glibc-2.17-196.el7.x86_64 keyutils-libs-1.5.8-3.el7.x86_64 krb5-libs-1.15.1-8.el7.x86_64 libattr-2.4.46-12.el7.x86_64 libblkid-2.23.2-43.el7.x86_64 libcap-2.22-9.el7.x86_64 libcom_err-1.42.9-10.el7.x86_64 libgcc-4.8.5-16.el7.x86_64 libselinux-2.5-11.el7.x86_64 libsepol-2.5-6.el7.x86_64 libuuid-2.23.2-43.el7.x86_64 libxml2-2.9.1-6.el7_2.3.x86_64 lvm2-libs-2.02.171-8.el7.x86_64 openssl-libs-1.0.2k-8.el7.x86_64 pcre-8.32-17.el7.x86_64 systemd-libs-219-42.el7.x86_64 userspace-rcu-0.7.9-2.el7rhgs.x86_64 xz-libs-5.2.2-1.el7.x86_64 zlib-1.2.7-17.el7.x86_64
(gdb) bt
#0  glusterd_is_tier_daemon_running (volinfo=volinfo@entry=0x0) at glusterd-utils.c:6948
#1  0x00007effa612eb39 in glusterd_is_defrag_on (volinfo=volinfo@entry=0x0) at glusterd-utils.c:6970
#2  0x00007effa61b1c00 in validate_parallel_readdir (volinfo=0x0, dict=<optimized out>, key=0x7eff8c003630 "performance.parallel-readdir", value=<optimized out>, op_errstr=0x7eff94212d40)
    at glusterd-volume-set.c:1041
#3  0x00007effa610d943 in glusterd_op_stage_set_volume (dict=dict@entry=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40) at glusterd-op-sm.c:1083
#4  0x00007effa6111e8b in glusterd_op_stage_validate (op=op@entry=GD_OP_SET_VOLUME, dict=dict@entry=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40, rsp_dict=rsp_dict@entry=0x7eff98007b60)
    at glusterd-op-sm.c:5940
#5  0x00007effa61ae2ca in gd_stage_op_phase (op=<optimized out>, op_ctx=op_ctx@entry=0x7eff8c002f40, req_dict=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40, 
    txn_opinfo=txn_opinfo@entry=0x7eff94212d60) at glusterd-syncop.c:1307
#6  0x00007effa61afdde in gd_sync_task_begin (op_ctx=op_ctx@entry=0x7eff8c002f40, req=req@entry=0x7eff94012620) at glusterd-syncop.c:1935
#7  0x00007effa61b0120 in glusterd_op_begin_synctask (req=req@entry=0x7eff94012620, op=op@entry=GD_OP_SET_VOLUME, dict=0x7eff8c002f40) at glusterd-syncop.c:2008
#8  0x00007effa60f805f in __glusterd_handle_set_volume (req=req@entry=0x7eff94012620) at glusterd-handler.c:2121
#9  0x00007effa60fbf7e in glusterd_big_locked_handler (req=0x7eff94012620, actor_fn=0x7effa60f7a40 <__glusterd_handle_set_volume>) at glusterd-handler.c:81
#10 0x00007effb1689f02 in synctask_wrap (old_task=<optimized out>) at syncop.c:375
#11 0x00007effafccdd40 in ?? () from /lib64/libc.so.6
#12 0x0000000000000000 in ?? ()
(gdb) t a  a bt

Thread 8 (Thread 0x7effa845c700 (LWP 11823)):
#0  0x00007effb04ba371 in sigwait () from /lib64/libpthread.so.0
#1  0x0000563b8d79101b in glusterfs_sigwaiter (arg=<optimized out>) at glusterfsd.c:2069
#2  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#3  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 7 (Thread 0x7effa2142700 (LWP 12102)):
#0  0x00007effb04b6945 in pthread_cond_wait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007effa61b138b in hooks_worker (args=<optimized out>) at glusterd-hooks.c:531
#2  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#3  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 6 (Thread 0x7effa1941700 (LWP 12103)):
#0  0x00007effafd7f923 in epoll_wait () from /lib64/libc.so.6
#1  0x00007effb16adfd2 in event_dispatch_epoll_worker (data=0x563b8dbec1f0) at event-epoll.c:638
#2  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#3  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 5 (Thread 0x7effb1b2e780 (LWP 11821)):
#0  0x00007effb04b3f57 in pthread_join () from /lib64/libpthread.so.0
#1  0x00007effb16ae490 in event_dispatch_epoll (event_pool=0x563b8db7dfd0) at event-epoll.c:732
#2  0x0000563b8d78deb3 in main (argc=5, argv=<optimized out>) at glusterfsd.c:2479

Thread 4 (Thread 0x7effa8c5d700 (LWP 11822)):
#0  0x00007effb04b9e4d in nanosleep () from /lib64/libpthread.so.0
#1  0x00007effb1660cfe in gf_timer_proc (data=0x563b8db85840) at timer.c:176
#2  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#3  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 3 (Thread 0x7effa6c59700 (LWP 11826)):
#0  0x00007effb04b6cf2 in pthread_cond_timedwait@@GLIBC_2.3.2 () from /lib64/libpthread.so.0
#1  0x00007effb168c438 in syncenv_task (proc=proc@entry=0x563b8db86450) at syncop.c:603
#2  0x00007effb168d280 in syncenv_processor (thdata=0x563b8db86450) at syncop.c:695
#3  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#4  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 2 (Thread 0x7effa7c5b700 (LWP 11824)):
#0  0x00007effafd461ad in nanosleep () from /lib64/libc.so.6
#1  0x00007effafd46044 in sleep () from /lib64/libc.so.6
#2  0x00007effb167a1cd in pool_sweeper (arg=<optimized out>) at mem-pool.c:464
#3  0x00007effb04b2e25 in start_thread () from /lib64/libpthread.so.0
#4  0x00007effafd7f34d in clone () from /lib64/libc.so.6

Thread 1 (Thread 0x7effa745a700 (LWP 11825)):
#0  glusterd_is_tier_daemon_running (volinfo=volinfo@entry=0x0) at glusterd-utils.c:6948
#1  0x00007effa612eb39 in glusterd_is_defrag_on (volinfo=volinfo@entry=0x0) at glusterd-utils.c:6970
#2  0x00007effa61b1c00 in validate_parallel_readdir (volinfo=0x0, dict=<optimized out>, key=0x7eff8c003630 "performance.parallel-readdir", value=<optimized out>, op_errstr=0x7eff94212d40)
    at glusterd-volume-set.c:1041
#3  0x00007effa610d943 in glusterd_op_stage_set_volume (dict=dict@entry=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40) at glusterd-op-sm.c:1083
#4  0x00007effa6111e8b in glusterd_op_stage_validate (op=op@entry=GD_OP_SET_VOLUME, dict=dict@entry=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40, rsp_dict=rsp_dict@entry=0x7eff98007b60)
    at glusterd-op-sm.c:5940
#5  0x00007effa61ae2ca in gd_stage_op_phase (op=<optimized out>, op_ctx=op_ctx@entry=0x7eff8c002f40, req_dict=0x7eff8c002f40, op_errstr=op_errstr@entry=0x7eff94212d40,

--- Additional comment from Worker Ant on 2017-08-17 01:52:02 EDT ---

REVIEW: https://review.gluster.org/18052 (glusterd: disallow volume specific options to be set with all as volume name) posted (#1) for review on master by Atin Mukherjee (amukherj@redhat.com)

--- Additional comment from Worker Ant on 2017-08-18 02:36:38 EDT ---

COMMIT: https://review.gluster.org/18052 committed in master by Atin Mukherjee (amukherj@redhat.com) 
------
commit 01abf7ee37702407403afcf9aa6c9019a0316e1d
Author: Atin Mukherjee <amukherj@redhat.com>
Date:   Thu Aug 17 10:54:02 2017 +0530

    glusterd: disallow volume specific options to be set with all as volume name
    
    All the .validate_fn defined in volume map entry table refers to volinfo
    object. And if we end up in trying to set a volume level option cluster
    wide glusterd results into a crash.
    
    Change-Id: I7c877aee0ff5c8c1d8c95662fdc8c8923355ae7b
    BUG: 1482344
    Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
    Reviewed-on: https://review.gluster.org/18052
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Prashanth Pai <ppai@redhat.com>
    Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
    Reviewed-by: Gaurav Yadav <gyadav@redhat.com>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>

Comment 3 Worker Ant 2017-08-21 14:28:14 UTC
COMMIT: https://review.gluster.org/18060 committed in release-3.12 by Shyamsundar Ranganathan (srangana@redhat.com) 
------
commit 80774b1a9cc17f8c7c9e7e59251cf98029d1b42f
Author: Atin Mukherjee <amukherj@redhat.com>
Date:   Thu Aug 17 10:54:02 2017 +0530

    glusterd: disallow volume specific options to be set with all as volume name
    
    All the .validate_fn defined in volume map entry table refers to volinfo
    object. And if we end up in trying to set a volume level option cluster
    wide glusterd results into a crash.
    
    >Reviewed-on: https://review.gluster.org/18052
    >Smoke: Gluster Build System <jenkins@build.gluster.org>
    >Reviewed-by: Prashanth Pai <ppai@redhat.com>
    >Reviewed-by: mohammed rafi  kc <rkavunga@redhat.com>
    >Reviewed-by: Gaurav Yadav <gyadav@redhat.com>
    >CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    >(cherry picked from commit 01abf7ee37702407403afcf9aa6c9019a0316e1d)
    
    Change-Id: I7c877aee0ff5c8c1d8c95662fdc8c8923355ae7b
    BUG: 1482804
    Signed-off-by: Atin Mukherjee <amukherj@redhat.com>
    Reviewed-on: https://review.gluster.org/18060
    Reviewed-by: Prashanth Pai <ppai@redhat.com>
    Smoke: Gluster Build System <jenkins@build.gluster.org>
    CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
    Reviewed-by: Shyamsundar Ranganathan <srangana@redhat.com>

Comment 4 Shyamsundar 2017-09-05 17:39:07 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.12.0, please open a new bug report.

glusterfs-3.12.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/announce/2017-September/000082.html
[2] https://www.gluster.org/pipermail/gluster-users/


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