Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Host-Specific Problem: Sockets Connect, Sessions Hang
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
amoebapr
n00b
n00b


Joined: 25 Nov 2003
Posts: 11
Location: Minneapolis, MN

PostPosted: Mon Jun 13, 2011 12:57 pm    Post subject: Host-Specific Problem: Sockets Connect, Sessions Hang Reply with quote

Of all the problems I've seen this may be one of the strangest. I've tossed and turned trying to figure out where this one may lie or what further steps I can do to diagnose it. Any additional suggestions would be warmly welcomed!

This behavior manifested itself recently after a make -up world and a genkernel of 2.6.37-gentoo-r4.

Topology and Configuration

Linux server S is connected to the Internet via router R and to hosts A and B. Server S is doing regular ol' static NAT forwarding for hosts A and B to give them access to the Internet. The hosts interact with the server on the subnet 192.168.42.0/24. The topology resembles this:

Code:

                                               = Host A (Windows 7)
                                              =
                                             =
    ( Internet ) Router R === ( DMZ ) === Server S   (192.168.42.0/24)
                                             =
                                              =
                                               = Host B (Mac OSX)



Various services run on Server S including HTTP (serving a public website) and SSH to a limited set of Internet hosts.

Symptomatology

Connectivity between hosts A and B and the Internet work just fine. Services such as HTTP and SSH work just fine when accessed from the Internet. HTTP and SSH work just fine when accessed from the Windows 7 host Host A. However, when the services of Server B are access from the Mac OSX host Host B they exhibit the following strange borked behavior:

If an ssh session is created from Host B to Server S the socket will connect. Indeed the keys will negotiate and the user will be greeted with a shell from Server S. Some commands returning short bits of output will function correctly (e.g. an "ls" in the home directory or "uname -a"). However other commands will cause the session to appear to hang completely--dmesg is one such command. The session cannot be recovered by ctrl-c, ctrl-z etc.

Additionally when Server S is accessed via HTTP from Mac OSX Host B the socket will connect to the Apache service on Server S, the HTTP 1.1 request will be sent from Host B to Server S (i.e. "GET / HTTP 1.1 ...") but no data will be returned. The socket will hang and the request will never time out. This last point is particularly disturbing.

Attempts in Finding the Root Cause

Here's what has been tried so far. On the empirical side: I've tried disabling the iptables rules and changing all default table behaviors to ACCEPT. I've also done the same and moved Host B into the DMZ (alongside Router R). In either case the symptoms are still the same: sockets connect and sessions hang.

Perhaps the most interesting attempt I've made is to create two ssh sessions by logging into Server S from Host B and from Host A. On the Host A session I've started an strace of the sshd session controlling the shell for Host B. There I can see read() and write() calls proceeding normally. When I cause a hang to occur on Host B (again by running a command like dmesg) I'll see that all of the write() calls for the command complete successfully. As far as sshd is concerned it's sent all the data for the command to the socket connected to the client. Also interestingly enough (and rather disturbingly) if I input characters into Host B I will see the select() call returning for each group of characters on the strace.

A network trace using wireshark on a third host on the subnet with the Hosts A and B has not revealed anything interesting.

Questions

1. Any ready suggestions? Is this a known issue?

2. This behavior occurred after an update to 2.6.37-gentoo-r4, are there any networking features of this kernel that I should check for in the kernel conf?

3. Any kernel versions I should step back to? Rather unfortunately my last kernel built was 2.6.25-gentoo-r8 and I can no longer boot it do to changes in the Gentoo layout.


Thank you for any assistance!
Back to top
View user's profile Send private message
amoebapr
n00b
n00b


Joined: 25 Nov 2003
Posts: 11
Location: Minneapolis, MN

PostPosted: Tue Jun 14, 2011 5:43 am    Post subject: Reply with quote

I updated to 2.6.38-gentoo-r6 this evening, no change in behavior. Any ideas out there on something to try and pin this down?
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum