path: root/rpc
diff options
authorMohit Agrawal <>2017-02-01 15:17:51 +0530
committerVijay Bellur <>2017-02-01 14:22:53 -0500
commitd7077bca4b372a056d23416294e729637e9af94e (patch)
tree359d673f08819e85f7e4aed04e9a0b7a84049cc1 /rpc
parent12f4db5742b334e2364afeb69a64eeeac4e6c147 (diff)
rpc/socket.c : Bonnie++ hangs during rewrites in ganesha + SSL
Problem: Bonnie++ rewrite operation hangs in ganesha + SSL environment Solution: Bonnie++ hangs during execution of rewrite operation in ganesha + SSL environment.It was hanged due to blocking on poll call in ssl_do because no POLLOUT event was getting on socket. Socket is not getting POLLOUT event because all other threads are waiting to get lock and lock is not released ssl_do because it is not getting any event on poll.To correct it update the condition in ssl_do as same in getting error SSL_ERROR_WANT_READ. Test: To test the patch followed below procedure 1) Setup 2X2 Ganesha + SSL environment. 2) Run bonnie from 3 nfs client parallely 3) After run "Rewwrite operation" by bonnie it is hanged. 4) After apply the patch it is not hanged. BUG: 1418213 Change-Id: I5985cbbc4cfdac5d287268d791e31c274abc3c8d Signed-off-by: Mohit Agrawal <> Reviewed-on: Smoke: Gluster Build System <> NetBSD-regression: NetBSD Build System <> Reviewed-by: Jeff Darcy <> CentOS-regression: Gluster Build System <> Reviewed-by: Vijay Bellur <>
Diffstat (limited to 'rpc')
1 files changed, 5 insertions, 0 deletions
diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c
index b881577..4b1505c 100644
--- a/rpc/rpc-transport/socket/src/socket.c
+++ b/rpc/rpc-transport/socket/src/socket.c
@@ -263,6 +263,11 @@ ssl_do (rpc_transport_t *this, void *buf, size_t len, SSL_trinary_func *func)
+ if ((func == (SSL_trinary_func *)SSL_read)
+ || (func == (SSL_trinary_func *) SSL_write)) {
+ errno = EAGAIN;
+ return r;
+ }
pfd.fd = priv->sock; = POLLOUT;
if (poll(&pfd,1,-1) < 0) {