Bug 796581
Summary: | server crashes on disconnect because of race in connection destroy | ||
---|---|---|---|
Product: | [Community] GlusterFS | Reporter: | Pranith Kumar K <pkarampu> |
Component: | protocol | Assignee: | Pranith Kumar K <pkarampu> |
Status: | CLOSED CURRENTRELEASE | QA Contact: | Anush Shetty <ashetty> |
Severity: | unspecified | Docs Contact: | |
Priority: | high | ||
Version: | pre-release | CC: | gluster-bugs, jdarcy |
Target Milestone: | --- | ||
Target Release: | --- | ||
Hardware: | Unspecified | ||
OS: | Unspecified | ||
Whiteboard: | |||
Fixed In Version: | glusterfs-3.4.0 | Doc Type: | Bug Fix |
Doc Text: | Story Points: | --- | |
Clone Of: | Environment: | ||
Last Closed: | 2013-07-24 17:16:01 UTC | Type: | --- |
Regression: | --- | Mount Type: | --- |
Documentation: | --- | CRM: | |
Verified Versions: | Category: | --- | |
oVirt Team: | --- | RHEL 7.3 requirements from Atomic Host: | |
Cloudforms Team: | --- | Target Upstream Version: | |
Embargoed: | |||
Bug Depends On: | |||
Bug Blocks: | 817967 |
Description
Pranith Kumar K
2012-02-23 09:03:29 UTC
OK, I see that the lock pointer is null, and that server_connection_cleanup doesn't protect against concurrent calls. Is the race that there might be multiple threads calling server_connection_cleanup from server_submit_reply? The problem is that Even before the reqs that are in transit are replied the conn structure is Destroyed leading to a crash. So the fix is to take refs/unrefs for the conn on receiving/replying req respectively. By the time conn->ref count becomes 0 there should not be anymore reqs in transit. So the connection destroy should just free all the memory. (This last part is where I made a mistake in my previous fix to this issue.) CHANGE: http://review.gluster.com/2806 (protocol/server: Make conn object ref-counted) merged in master by Vijay Bellur (vijay) Verified with release-3.3 |