Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core: Avoid several dict OR key is NULL message in brick logs #1909

Closed
mohit84 opened this issue Dec 10, 2020 · 1 comment · Fixed by #1910
Closed

core: Avoid several dict OR key is NULL message in brick logs #1909

mohit84 opened this issue Dec 10, 2020 · 1 comment · Fixed by #1910
Labels

Comments

@mohit84
Copy link
Contributor

mohit84 commented Dec 10, 2020

In recent master codebase brick is throwing warning messages at the time of accessing keys due to dict is NULL.
High number of warning are throwing while running a test case ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t and unnecessary it is taking time

grep -i "dict or key" /var/log/glusterfs/bricks/d-backends-patchy1.log | wc -l
6038
There are total 4 type of warning messages for keys (readdir-filter-directorie,link-count,lkmode,sync_backend_xattrs)

[2020-12-10 06:34:53.244071 +0000] W [dict.c:1532:dict_get_with_ref] (-->/usr/local/lib/glusterfs/2020.12.10/xlator/storage/posix.so(+0x38ae4) [0x7f1f62a23ae4] -->/usr/local/lib/libglusterfs.so.0(dict_get_int32+0x2b) [0x7f1f72a037ab] -->/usr/local/lib/libglusterfs.so.0(dict_get_with_ref+0x8e) [0x7f1f72a031de] ) 0-dict: dict OR key (readdir-filter-directories) is NULL [Invalid argument]

[2020-12-10 06:35:03.824860 +0000] W [dict.c:1532:dict_get_with_ref] (-->/usr/local/lib/glusterfs/2020.12.10/xlator/features/index.so(+0x33d9) [0x7f1f608623d9] -->/usr/local/lib/libglusterfs.so.0(dict_get_str+0x2b) [0x7f1f72a049eb] -->/usr/local/lib/libglusterfs.so.0(dict_get_with_ref+0x8e) [0x7f1f72a031de] ) 1-dict: dict OR key (link-count) is NULL [Invalid argument]

[2020-12-10 06:35:03.863412 +0000] W [dict.c:1532:dict_get_with_ref] (-->/usr/local/lib/glusterfs/2020.12.10/xlator/features/locks.so(+0x269e9) [0x7f1f61b2f9e9] -->/usr/local/lib/libglusterfs.so.0(dict_get_uint32+0x2f) [0x7f1f72a03dff] -->/usr/local/lib/libglusterfs.so.0(dict_get_with_ref+0x8e) [0x7f1f72a031de] ) 0-dict: dict OR key (glusterfs.lk.lkmode) is NULL [Invalid argument]

[2020-12-10 06:35:50.625695 +0000] W [dict.c:1532:dict_get_with_ref] (-->/usr/local/lib/glusterfs/2020.12.10/xlator/storage/posix.so(+0x2dfce) [0x7f1f62a18fce] -->/usr/local/lib/libglusterfs.so.0(dict_get_int8+0x2f) [0x7f1f72a0321f] -->/usr/local/lib/libglusterfs.so.0(dict_get_with_ref+0x8e) [0x7f1f72a031de] ) 6-dict: dict OR key (sync_backend_xattrs) is NULL [Invalid argument]

mohit84 added a commit that referenced this issue Dec 11, 2020
Problem: dict_get_with_ref throw a message "dict or key is NULL"
         if dict or key is NULL.

Solution: Before access a key check if dictionary is valid.

Fixes: #1909
Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
@alaunay
Copy link

alaunay commented Apr 21, 2021

Hello,

We are hit quite hard on gluster 9.1 with that one. From what I can see, this patch didn't make it into 9.0 or 9.1, is there a possibility to push it into 9.2 ? Thanks !

@mohit84 mohit84 reopened this Apr 22, 2021
mohit84 added a commit that referenced this issue Apr 22, 2021
Problem: dict_get_with_ref throw a message "dict or key is NULL"
if dict or key is NULL.

Solution: Before access a key check if dictionary is valid.

> Fixes: #1909
> Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> Cherry picked from commit de1b26d
> Reviewed on upstream link #1910

Fixes: #1909
Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
mohit84 added a commit that referenced this issue May 8, 2021
…#2345)

Problem: dict_get_with_ref throw a message "dict or key is NULL"
         if dict or key is NULL.

Solution: Before access a key check if dictionary is valid.

> Fixes: #1909
> Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> (Cherry picked from commit de1b26d)
> (Reviewed on upstream link #1910)

Fixes: #1909
Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
Signed-off-by: Mohit Agrawal moagrawa@redhat.com
@mohit84 mohit84 closed this as completed May 8, 2021
pranithk pushed a commit to pranithk/glusterfs that referenced this issue May 25, 2021
…r#1910) (gluster#2345)

Problem: dict_get_with_ref throw a message "dict or key is NULL"
         if dict or key is NULL.

Solution: Before access a key check if dictionary is valid.

> Fixes: gluster#1909
> Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
> Signed-off-by: Mohit Agrawal <moagrawa@redhat.com>
> (Cherry picked from commit de1b26d)
> (Reviewed on upstream link gluster#1910)

Fixes: gluster#1909
Change-Id: I50911679142b52f854baf20c187962a2a3698f2d
Signed-off-by: Mohit Agrawal moagrawa@redhat.com
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants