- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- send() function sleeping for tcp socket
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 06:13 PM
06-29-2010 06:13 PM
send() function sleeping for tcp socket
$ truss -p 10591
( Attached to process 10591 ("J_SMPP_Handler 127.0.0.1") [64-bit] )
send(5, 0x9ffffffffff97d60, 59, 0) [sleeping]
Why does send() being blocked?
- Tags:
- send
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 06:50 PM
06-29-2010 06:50 PM
Re: send() function sleeping for tcp socket
Running on what, exactly? (_Who_ has
"truss"?)
Getting an accurate diagnosis of invisible
code running on a mystery system may be more
difficult than you seem to think.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 07:19 PM
06-29-2010 07:19 PM
Re: send() function sleeping for tcp socket
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 07:26 PM
06-29-2010 07:26 PM
Re: send() function sleeping for tcp socket
rc = send(fd, (char*)buffer, byte_to_send, 0);
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 10:17 PM
06-29-2010 10:17 PM
Re: send() function sleeping for tcp socket
What does the return value of 'send()' contain? The manpages for 'send(2)' describe the various expectations including potential 'errno' indicators.
Regards!
...JRF...
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 10:20 PM
06-29-2010 10:20 PM
Re: send() function sleeping for tcp socket
As the client's receive buffer fills up, the client OS will automatically send TCP options to inform your server about the shrinking available space in the client's TCP receive window. Once the receive buffer has been completely filled, the TCP window size will also be reduced to zero.
At that point, the server knows it cannot send anything more to the client until the client processes the data already sent. As no more data can be sent, any further data will remain in the server socket's transmit buffer until the client sends another message telling it can receive more. Once the server socket's transmit buffer is 100% full, the send() function will start blocking.
From the send(2) man page:
----
If no buffer space is available to hold the data to be transmitted, send() blocks unless nonblocking mode is enabled.
----
... and if you had enabled nonblocking mode, the send() function would have failed with errno set to either EAGAIN or EWOULDBLOCK.
MK
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-29-2010 11:08 PM
06-29-2010 11:08 PM
Re: send() function sleeping for tcp socket
I used netstat to view the socket buffer, but there is accumulated data in socket buffer.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-30-2010 03:03 AM
06-30-2010 03:03 AM