Bug 1793378 - dht_hash_compute() crashes when it receives a zero length name
Summary: dht_hash_compute() crashes when it receives a zero length name
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: core
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: bugs@gluster.org
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2020-01-21 07:59 UTC by Yaniv Kaul
Modified: 2020-02-25 04:41 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2020-02-25 04:41:22 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)


Links
System ID Private Priority Status Summary Last Updated
Gluster.org Gerrit 24047 0 None Open dht-hashfn.c: ensure we do not try to calculate hash on NULL path 2020-02-05 04:52:57 UTC

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


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