LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 01-23-2012, 11:08 AM   #1
dcfalog
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Rep: Reputation: Disabled
Fedora 12 Socket hang


Hi all,
I am running 2 apps, 1 client and 1 server, over the localhost:15001 port. Every now and then (1 out of 15 times maybe) both apps hang on the send and the recv and the data appears to be stuck in the SendQ:
# netstat -tnp
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 201216 127.0.0.1:37227 127.0.0.1:15001 ESTABLISHED
tcp 0 0 127.0.0.1:15001 127.0.0.1:37227 ESTABLISHED

The application does the same thing every time sending 700544 bytes 515 times and then exits. Then is started again until it eventually hangs.
I increased wmem_max and rmem_max to 16mb from the default of 131kb but that did not help.
When I break in with gdb the client is sitting on the send() (no flags set) call and the server is sitting on the recv() call (MSG_WAITALL is set).
Any ideas how to debug this and find out why the data is stuck in the Send-Q?

Thanks much,
 
Old 01-24-2012, 09:50 AM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
If the (unnamed?) application supports debugging enable it? If it doesn't then strace it?
 
Old 02-01-2012, 07:58 AM   #3
dcfalog
LQ Newbie
 
Registered: Jan 2012
Posts: 2

Original Poster
Rep: Reputation: Disabled
The application is one that I wrote that sends 700544 bytes 300-500 times to a server that I wrote. When I run with strace it seems to run fine due to the logging over head. Normally it runs over infiniband, but for testing I am running it over the localhost on one box. Over infiniband it runs fine. Using the localhost the send and recv both block and the sendQ indicates that 201616 bytes stuck for some reason.
It only fails on the first send when started. But only fails 2 out of 100 times.

Sorry for the delay. I would like to find out what's going on but it's been put on the back burner at the moment.

Any ideas how to find out why it stopped sending data?

Thanks much!
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
kernel hang on 'connect' to local socket ta0kira Programming 2 12-16-2008 03:47 AM
socket hang up balaji_singh Linux - Newbie 0 12-17-2007 12:30 AM
fedora 8 getting hang often pradeep2002gs Linux - Newbie 15 11-19-2007 11:47 PM
Fedora 3 boot hang bungle3 Fedora - Installation 11 08-25-2005 02:04 PM
My socket aplication often hang indrijo Programming 1 02-04-2005 02:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 01:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration