Skip to content

Commit

Permalink
core: The brick process is getting crash during upcall event (#4256)
Browse files Browse the repository at this point in the history
A brick process may crash while it try to send upcall notification
to the client and client disconnect is being process.

Solution: Avoid upcall event notification to the client if disconnect
        is being process for the same client.

Fixes: #4255
Change-Id: I80478d7f4a038b04a10fb21a1290b4309e9fe4dd

Signed-off-by: Mohit Agrawal <[email protected]>
  • Loading branch information
mohit84 authored Nov 6, 2023
1 parent 650ab3a commit 8e2fd0b
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions xlators/protocol/server/src/server.c
Original file line number Diff line number Diff line change
Expand Up @@ -1469,6 +1469,12 @@ server_process_event_upcall(xlator_t *this, void *data)
if (!client || strcmp(client->client_uid, client_uid))
continue;

/* Avoid upcall notification to client if disconnect is in
progress
*/
if (GF_ATOMIC_GET(xprt->disconnect_progress))
continue;

xprt_found = _gf_true;
rpc_transport_ref(xprt);
break;
Expand Down

0 comments on commit 8e2fd0b

Please sign in to comment.