Bug 1749369
Summary: | Segmentation fault occurs while truncate file | |||
---|---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | evangelos <vpolakis> | |
Component: | write-behind | Assignee: | bugs <bugs> | |
Status: | CLOSED UPSTREAM | QA Contact: | ||
Severity: | urgent | Docs Contact: | ||
Priority: | unspecified | |||
Version: | 5 | CC: | bugs, pasik | |
Target Milestone: | --- | |||
Target Release: | --- | |||
Hardware: | All | |||
OS: | All | |||
Whiteboard: | ||||
Fixed In Version: | Doc Type: | If docs needed, set a value | ||
Doc Text: | Story Points: | --- | ||
Clone Of: | ||||
: | 1753592 (view as bug list) | Environment: | ||
Last Closed: | 2020-03-12 12:15:04 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
evangelos
2019-09-05 13:21:22 UTC
Would something like below enough ? diff --git a/libglusterfs/src/mem-pool.c b/libglusterfs/src/mem-pool.c index cff9632..fad6a2c 100644 --- a/libglusterfs/src/mem-pool.c +++ b/libglusterfs/src/mem-pool.c @@ -863,6 +863,13 @@ mem_put(void *ptr) /* Not one of ours; don't touch it. */ return; } + + if(!hdr->pool_list){ + gf_msg_callingfn("mem-pool", GF_LOG_ERROR, EINVAL, LG_MSG_INVALID_ARG, + "invalid argument hdr->pool_list NULL"); + return; + } + pool_list = hdr->pool_list; pt_pool = &pool_list->pools[hdr->power_of_two - POOL_SMALLEST]; this (as far as i understood but please correct me) this allocation is for the inode that shouldn't be released unless kernel send the forget (rm/unlint etc). REVISION POSTED: https://review.gluster.org/23445 (Segmentation fault occurs during truncate) posted (#2) for review on master by Vangelis Polakis This bug is moved to https://github.com/gluster/glusterfs/issues/850, and will be tracked there from now on. Visit GitHub issues URL for further details |