Bug 920916 - non-ssl sockets perform blocking connect()
Summary: non-ssl sockets perform blocking connect()
Keywords:
Status: CLOSED CURRENTRELEASE
Alias: None
Product: GlusterFS
Classification: Community
Component: transport
Version: mainline
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: krishnan parthasarathi
QA Contact:
URL:
Whiteboard:
Depends On:
Blocks: 918917
TreeView+ depends on / blocked
 
Reported: 2013-03-13 04:58 UTC by krishnan parthasarathi
Modified: 2015-11-03 23:05 UTC (History)
5 users (show)

Fixed In Version: glusterfs-3.4.0
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-24 17:23:16 UTC
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Embargoed:


Attachments (Terms of Use)
Regression test script (943 bytes, text/troff)
2013-03-13 06:42 UTC, krishnan parthasarathi
no flags Details

Description krishnan parthasarathi 2013-03-13 04:58:52 UTC
Description of problem:
The socket connect code is blocking. This is undesirable as it would affect QOS of already established connections of the same process.

Version-Release number of selected component (if applicable):
commit-id ac524f5907058f96eb68ffe0503f60a37c0a5dc8

How reproducible:
always

Steps to Reproduce:
Pick a server/node in a cluster and perform the following firewall settings.
1. iptables -N testChain
2. iptables -A INPUT -g testChain
3. iptables -A testChain -p tcp --dport 24007 --syn -j DROP 
4. Try mounting a volume on the above server.

How to remove iptables the iptables rules above:
1. iptables -D INPUT -g testChain
2. iptables -D testChain 1
3. iptables -X testChain
  
Actual results:
The mount command hangs (on connect()).

Expected results:
The mount command should not hang.

Note:
With the firewall settings as prescribed above, the mount is not expected to work. The steps are only aimed to capture the effects of blocking connect call.


Additional info:

Comment 1 krishnan parthasarathi 2013-03-13 06:42:05 UTC
Created attachment 709342 [details]
Regression test script

Comment 2 krishnan parthasarathi 2013-03-14 08:02:40 UTC
The regression test script referred to in comment#1 doesn't do what it was intended for. The script would 'fail' even when the socket is non-blocking. Need to find a way in which we can determine that the epoll thread of the connecting nonblocking client process (be it glusterfs or gluster CLI) is not blocked on connect().

In fact the steps to reproduce is also not useful to verify the correctness/completeness of the fix. Will update the bug once I find a way to test this.

Submitted patch: http://review.gluster.com/4670

Comment 3 Vijay Bellur 2013-03-22 09:08:36 UTC
CHANGE: http://review.gluster.org/4670 (socket: Make non-ssl sockets perform non-blocking connect()) merged in master by Anand Avati (avati)

Comment 4 Anand Avati 2013-04-12 07:21:40 UTC
COMMIT: http://review.gluster.org/4685 committed in release-3.4 by Anand Avati (avati) 
------
commit 432ce7e60fb58d3cbb019ab3159b7d393afaaed6
Author: Niels de Vos <ndevos>
Date:   Wed Apr 10 17:51:37 2013 +0200

    build: really disable fusermount if you say so
    
    There is no logic in configure.ac that provides a $disable_fusermount
    variable. So, use the $enable_fusermount variable instead.
    
    Follow-up-for: http://review.gluster.org/4773
    Change-Id: I81cdbd0045409d0036438d542ca6dc1934f784e4
    BUG: 948205
    Signed-off-by: Niels de Vos <ndevos>
    Reviewed-on: http://review.gluster.org/4803
    Reviewed-by: Kaleb KEITHLEY <kkeithle>
    Reviewed-by: Sachidananda Urs <sacchi>
    Tested-by: Gluster Build System <jenkins.com>


Note You need to log in before you can comment on or make changes to this bug.