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

Fix glusterd crash on startup #4193

Closed
wants to merge 1 commit into from
Closed

Conversation

jengelh
Copy link
Contributor

@jengelh jengelh commented Jul 5, 2023

==4418==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x613000000190 at pc 0x7f028cd2341c bp 0x7ffd9c5ba7e0 sp 0x7ffd9c5ba7d8 WRITE of size 8 at 0x613000000190 thread T0
    f0 in mem_get_pool_list ~/libglusterfs/src/mem-pool.c:786

0x613000000190 is located 0 bytes after 336-byte region [0x613000000040,0x613000000190) allocated by thread T0 here:
    f0 in malloc (/usr/lib64/libasan.so.8+0xdc04f) (BuildId: 44194dcf14c212b57346030492309d59d5379ae1)
    f1 in __gf_default_malloc glusterfs/mem-pool.h:112
    f2 in mem_get_pool_list ~/libglusterfs/src/mem-pool.c:778

NPOOLS-1 is just wrong. per_thread_pool_list_t does not include one free per_thread_pool_t.

Fixes: #4192
Fixes: v11dev-211-g1cfff6e6ec ("Use flexible array members (#3411)")

There may be more of these problems introduced by 1cff6e6ec .

@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

2 similar comments
@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

@gluster-ant
Copy link
Collaborator

Can one of the admins verify this patch?

@mohit84
Copy link
Contributor

mohit84 commented Jul 5, 2023

Can one of the admins verify this patch?

I think you are facing this issue because the patch (#3952) was not revert in release-11. By default mempool is disabled so you would not face this issue. You would face the issue only while compile code with mempool. The ideal fix is we need to revert the patch for release-11 also.

Copy link

stale bot commented Mar 17, 2024

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 stale bot added the wontfix Managed by stale[bot] label Mar 17, 2024
==4418==ERROR: AddressSanitizer: heap-buffer-overflow on address 0x613000000190
at pc 0x7f028cd2341c bp 0x7ffd9c5ba7e0 sp 0x7ffd9c5ba7d8
WRITE of size 8 at 0x613000000190 thread T0
    f0 in mem_get_pool_list ~/libglusterfs/src/mem-pool.c:786

0x613000000190 is located 0 bytes after 336-byte region [0x613000000040,0x613000000190)
allocated by thread T0 here:
    f0 in malloc (/usr/lib64/libasan.so.8+0xdc04f) (BuildId: 44194dcf14c212b57346030492309d59d5379ae1)
    f1 in __gf_default_malloc glusterfs/mem-pool.h:112
    f2 in mem_get_pool_list ~/libglusterfs/src/mem-pool.c:778

``NPOOLS-1`` is just wrong. ``per_thread_pool_list_t`` does not include one free
``per_thread_pool_t``.

Fixes: gluster#4192
Fixes: v11dev-211-g1cfff6e6ec ("Use flexible array members (gluster#3411)")
Signed-off-by: Jan Engelhardt <jengelh@inai.de>
@stale stale bot removed the wontfix Managed by stale[bot] label Mar 20, 2024
@jengelh jengelh closed this Mar 20, 2024
@jengelh jengelh deleted the crash branch March 20, 2024 11:04
@gluster-ant
Copy link
Collaborator

!!! Couldn't read commit file !!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants