glusterfs icon indicating copy to clipboard operation
glusterfs copied to clipboard

iobuf: Call iobuf_get_from_small to allocate buffer by iobuf_get_from…

Open mohit84 opened this issue 3 years ago • 29 comments

…_stdalloc

The function iobuf_get_from_stdalloc call while a buffer_size is greater than 1M and the function iobuf_get_from_small call while size is less than 128k the only difference is iobuf_get_from_small does not aligned the buffer so call iobuf_get_from_small to allocate a buffer and realigned the buffer separately

Fixes: #2850 Signed-off-by: Mohit Agrawal [email protected]

mohit84 avatar Oct 07 '21 16:10 mohit84

/run regression

mohit84 avatar Oct 07 '21 16:10 mohit84

I have a different idea - check the size you need to allocate. If it's large, align ptr. If not, don't. I think we could easily get rid of the whole fake arena this way.

mykaul avatar Oct 07 '21 16:10 mykaul

1 test(s) failed ./tests/basic/afr/granular-esh/replace-brick.t

0 test(s) generated core

4 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/afr/granular-esh/replace-brick.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/1693/

gluster-ant avatar Oct 07 '21 17:10 gluster-ant

I have a different idea - check the size you need to allocate. If it's large, align ptr. If not, don't. I think we could easily get rid of the whole fake arena this way.

done

mohit84 avatar Oct 08 '21 12:10 mohit84

/run regression

mohit84 avatar Oct 08 '21 12:10 mohit84

If you got rid of the fake arena, I think this line:

    for (i = 0; i <= IOBUF_ARENA_MAX_INDEX; i++) {

should be:

    for (i = 0; i < IOBUF_ARENA_MAX_INDEX; i++) {

(in iobuf_pool_new() code)

mykaul avatar Oct 08 '21 15:10 mykaul

If you got rid of the fake arena, I think this line:

    for (i = 0; i <= IOBUF_ARENA_MAX_INDEX; i++) {

should be:

    for (i = 0; i < IOBUF_ARENA_MAX_INDEX; i++) {

(in iobuf_pool_new() code)

done

mohit84 avatar Oct 08 '21 16:10 mohit84

/run regression

mohit84 avatar Oct 08 '21 16:10 mohit84

/run regression

mohit84 avatar Oct 09 '21 10:10 mohit84

/run regression

mohit84 avatar Oct 09 '21 12:10 mohit84

/run full regression

mohit84 avatar Oct 09 '21 12:10 mohit84

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

0 test(s) generated core

15 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

14 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1700/

gluster-ant avatar Oct 09 '21 13:10 gluster-ant

/run regression

mohit84 avatar Oct 11 '21 07:10 mohit84

1 test(s) failed ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

0 test(s) generated core

15 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/00-geo-rep/00-georep-verify-non-root-setup.t

14 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/basic_changelog_changelog-snapshot.t ./tests/000-flaky/basic_distribute_rebal-all-nodes-migrate.t ./tests/000-flaky/basic_ec_ec-quorum-count-partial-failure.t ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_core_multiplex-limit-issue-151.t ./tests/000-flaky/bugs_distribute_bug-1117851.t ./tests/000-flaky/bugs_distribute_bug-1122443.t ./tests/000-flaky/bugs_glusterd_bug-857330/normal.t ./tests/000-flaky/bugs_glusterd_bug-857330/xml.t ./tests/000-flaky/bugs_glusterd_quorum-value-check.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/features_lock-migration_lkmigration-set-option.t ./tests/000-flaky/glusterd-restart-shd-mux.t https://build.gluster.org/job/gh_centos7-regression/1703/

gluster-ant avatar Oct 11 '21 08:10 gluster-ant

/run regression

mohit84 avatar Oct 18 '21 12:10 mohit84

/run regression

mohit84 avatar Oct 18 '21 12:10 mohit84

CLANG-FORMAT FAILURE: Before merging the patch, this diff needs to be considered for passing clang-format

index a6fd3eca1..b7f7f64e2 100644
--- a/libglusterfs/src/iobuf.c
+++ b/libglusterfs/src/iobuf.c
@@ -304,7 +304,7 @@ iobuf_create_stdalloc_arena(struct iobuf_pool *iobuf_pool)
     iobuf_arena->page_size = 0x7fffffff;
 
     list_add_tail(&iobuf_arena->list,
-                  &iobuf_pool->arenas[IOBUF_ARENA_MAX_INDEX-1]);
+                  &iobuf_pool->arenas[IOBUF_ARENA_MAX_INDEX - 1]);
 
 err:
     return;

gluster-ant avatar Oct 18 '21 12:10 gluster-ant

Why do we even need iobuf_create_stdalloc_arena()? we are allocating fine without this arena.

mykaul avatar Oct 18 '21 12:10 mykaul

/run regression

mohit84 avatar Oct 18 '21 15:10 mohit84

1 test(s) failed ./tests/bugs/gfapi/bug-1319374-THIS-crash.t

0 test(s) generated core

4 test(s) needed retry ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/bugs/gfapi/bug-1319374-THIS-crash.t

2 flaky test(s) marked as success even though they failed ./tests/000-flaky/basic_mount-nfs-auth.t ./tests/000-flaky/bugs_nfs_bug-1116503.t https://build.gluster.org/job/gh_centos7-regression/1734/

gluster-ant avatar Oct 18 '21 17:10 gluster-ant

/run regression

mohit84 avatar Oct 19 '21 01:10 mohit84

1 test(s) failed ./tests/bugs/gfapi/bug-1319374-THIS-crash.t

0 test(s) generated core

3 test(s) needed retry ./tests/000-flaky/basic_afr_split-brain-favorite-child-policy.t ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/bugs/gfapi/bug-1319374-THIS-crash.t https://build.gluster.org/job/gh_centos7-regression/1735/

gluster-ant avatar Oct 19 '21 04:10 gluster-ant

@Saju We can't consider this patch for today release build because bug-1319374-THIS-crash.t is crashing, though crash is not specific to above patch but with this patch the gfapi program is crashing easily during ssl_library loading.Once we will find the correct way to load ssl library then we can consider this patch.

0x00007f19db7c5016 in __strcmp_sse42 () from /lib64/libc.so.6 #1 0x00007f19d9895f09 in getrn () from /lib64/libcrypto.so.10 #2 0x00007f19d98961f0 in lh_insert () from /lib64/libcrypto.so.10 #3 0x00007f19d97e235f in OBJ_NAME_add () from /lib64/libcrypto.so.10 #4 0x00007f19cecca6e9 in SSL_library_init () from /lib64/libssl.so.10 #5 0x00007f19ceef7555 in init_openssl_mt () at socket.c:4125 #6 init (this=0x2f05058) at socket.c:4677 #7 0x00007f19db24cf7e in rpc_transport_load (ctx=ctx@entry=0x2ed84a0, options=options@entry=0x2eff278, trans_name=trans_name@entry=0x2f24408 "gfapi") at rpc-transport.c:345 #8 0x00007f19db250921 in rpc_clnt_connection_init (name=0x2f24408 "gfapi", options=0x2eff278, ctx=0x2ed84a0, clnt=0x2f29258) at rpc-clnt.c:1030 #9 rpc_clnt_new (options=options@entry=0x2eff278, owner=, name=name@entry=0x2f24408 "gfapi", reqpool_size=, reqpool_size@entry=8) at rpc-clnt.c:1119 #10 0x00007f19dba61dd3 in glfs_mgmt_init (fs=fs@entry=0x2ed8310) at glfs-mgmt.c:1016 #11 0x00007f19dba5c885 in glfs_volumes_init (fs=fs@entry=0x2ed8310) at glfs.c:260 #12 0x00007f19dba5e249 in glfs_init_common (fs=0x2ed8310) at glfs.c:1093 #13 0x00007f19dba5e36f in pub_glfs_init (fs=0x2ed8310) at glfs.c:1135 #14 0x0000000000400c5e in main (argc=4, argv=0x7ffd1d8ffdb8) at ./tests/bugs/gfapi/bug-1319374.c:114

mohit84 avatar Oct 19 '21 06:10 mohit84

Need to validate which libraries and versions we are using (see https://community.developers.refinitiv.com/questions/12997/the-rfa-application-crashed-in-ssl-library-init-af.html )

mykaul avatar Oct 19 '21 06:10 mykaul

Need to validate which libraries and versions we are using (see https://community.developers.refinitiv.com/questions/12997/the-rfa-application-crashed-in-ssl-library-init-af.html )

The current installed library is (openssl-1.0.2k-16.el7.x86_64), i don't think it is a library issue as we can see symbols are correctly represents on the core dump.

mohit84 avatar Oct 19 '21 06:10 mohit84

/run full regression

mohit84 avatar Oct 19 '21 13:10 mohit84

1 test(s) failed ./tests/bugs/gfapi/bug-1319374-THIS-crash.t

0 test(s) generated core

4 test(s) needed retry ./tests/000-flaky/glusterd-restart-shd-mux.t ./tests/basic/volume-snapshot-clone.t ./tests/bugs/gfapi/bug-1319374-THIS-crash.t ./tests/bugs/glusterfs/bug-866459.t

1 flaky test(s) marked as success even though they failed ./tests/000-flaky/glusterd-restart-shd-mux.t

gluster-ant avatar Oct 19 '21 20:10 gluster-ant

/run regression

mohit84 avatar Nov 24 '21 07:11 mohit84

Thank you for your contributions. Noticed that this issue is not having any activity in last ~6 months! We are marking this issue as stale because it has not had recent activity. It will be closed in 2 weeks if no one responds with a comment here.

stale[bot] avatar Sep 20 '22 19:09 stale[bot]

Closing this issue as there was no update since my last update on issue. If this is an issue which is still valid, feel free to open it.

stale[bot] avatar Oct 16 '22 03:10 stale[bot]