Note: This bug is displayed in read-only format because the product is no longer active in Red Hat Bugzilla.

Bug 1793378

Summary: dht_hash_compute() crashes when it receives a zero length name
Product: [Community] GlusterFS Reporter: Yaniv Kaul <ykaul>
Component: coreAssignee: bugs <bugs>
Status: CLOSED CURRENTRELEASE QA Contact:
Severity: high Docs Contact:
Priority: unspecified    
Version: mainlineCC: bugs, moagrawa
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2020-02-25 04:41:22 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:

Description Yaniv Kaul 2020-01-21 07:59:19 UTC
Description of problem:

From https://build.gluster.org/job/centos7-regression/9167/console :

Thread 1 (Thread 0x7f8816b9f700 (LWP 28623)):
#0  0x00007f882324e641 in __strlen_sse2_pminub () from /lib64/libc.so.6
No symbol table info available.
#1  0x00007f8815b86c14 in dht_hash_compute (this=0x7f8810017a00, type=0, name=0x0, hash_p=0x7f8816b9d30c) at /home/jenkins/root/workspace/centos7-regression/xlators/cluster/dht/src/dht-hashfn.c:81
        rsync_friendly_name = 0x0
        priv = 0x7f881004eb50
        len = 0
        munged = 0
        __FUNCTION__ = "dht_hash_compute"
#2  0x00007f8815b777b6 in dht_selfheal_layout_alloc_start (this=0x7f8810017a00, loc=0x7f87f80195a8, layout=0x7f880802d6c0) at /home/jenkins/root/workspace/centos7-regression/xlators/cluster/dht/src/dht-selfheal.c:1566
        start = 0
        hashval = 0
        ret = 0
        str = 0x0
        conf = 0x7f881004eb50
        buf = '\000' <repeats 36 times>
#3  0x00007f8815b7865d in dht_selfheal_layout_new_directory (frame=0x7f87f800f408, loc=0x7f87f80195a8, layout=0x7f880802d6c0) at /home/jenkins/root/workspace/centos7-regression/xlators/cluster/dht/src/dht-selfheal.c:1921
        this = 0x7f8810017a00
        chunk = 839516.67220484756
        i = 1
        start = 0
        bricks_to_use = 2
        err = -1
        start_subvol = 0
        curr_size = 2558
        range_size = 32648
        total_size = 5116
        real_i = 32648
        priv = 0x7f881004eb50
        weight_by_size = true
        bricks_used = 2
        __PRETTY_FUNCTION__ = "dht_selfheal_layout_new_directory"
        __FUNCTION__ = "dht_selfheal_layout_new_directory"



Might be related to the change I've made via https://review.gluster.org/#/c/glusterfs/+/23842/ ?

Comment 1 Worker Ant 2020-01-21 08:19:04 UTC
REVIEW: https://review.gluster.org/24047 (dht-hashfn.c: ensure we do not try to calculate hash on NULL path) posted (#1) for review on master by Yaniv Kaul

Comment 2 Worker Ant 2020-02-05 04:52:58 UTC
REVIEW: https://review.gluster.org/24047 (dht-hashfn.c: ensure we do not try to calculate hash on NULL path) merged (#2) on master by Susant Palai