- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- RST on Socket Listener caused
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
07-06-2009 09:10 AM
07-06-2009 09:10 AM
Actually we begin to see some new errors in traces, which are the ENOBUFS, ECONRESET (after calling recv() with MSG_PEEK flag) and a POLLERR (after calling poll()).
We understood that we can have the error ENOBUFS if we call an accept on an already closed connection and our process can continue working without any problem, BUT for the ECONRESET error that we got on the listener, we tried to just ignore this error but at the next iteration after ignoring ECONNRESET on listener, the poll on the same channel led to the setting of POLLERR in revent bit mask indicating “An error has occurred on the file descriptor”
Our first concern, is to enforce our process availability and guarantee its coherence. What we would like to understand :
1 - How could a ReSeT be sent on a listening FD? who could have sent this packet on a listening socket? Any scenario could be set for this situation? And do you think that setting the tcp parameter tcp_fin_wait_2_timeout to 0 (infinite) could avoid sending this RST packet?
2 - Do you have any suggestions concerning how we should deal with the situation we described? We think about a final solution of re-initializing the listener, do you have any hints for possible drawbacks?
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2009 09:20 AM
07-06-2009 09:20 AM
Re: RST on Socket Listener caused
thanks and best regards
Lassaad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2009 11:43 AM
07-06-2009 11:43 AM
Re: RST on Socket Listener caused
Do you mean that you do a recv() from a listening socket?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2009 12:21 PM
07-06-2009 12:21 PM
Re: RST on Socket Listener caused
Yes, we needed to call recvf with MSG_PEEK flag on all opened socket file descriptors including the listener. do you think that it's the origin of the problem ?
regards
Lassaad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2009 12:59 PM
07-06-2009 12:59 PM
Re: RST on Socket Listener caused
But this can only be confirmed by hp support.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-06-2009 04:26 PM
07-06-2009 04:26 PM
Re: RST on Socket Listener caused
To your point 1, the ReSet isn't sent on a listening FD, it was sent by the remote client, presumably for some connection still queued to the listen endpoint. tcp_fin_wait_2_timeout would have nothing to do with that.
If you reinitialize the listener - which I take to mean you close the listen endpoint and make another set of socket/bind/listen calls, the downside is that connections queued to the listen endpoint when you close() it will be dropped, and there will be a window between the close() call and the subsequent listen() call where connection attempts by clients will fail. If the clients can deal with that, it may not be a very large drawback.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 12:41 AM
07-07-2009 12:41 AM
Re: RST on Socket Listener caused
This is what we call a grey zone. Nothing is defined on what should occur when doing a recv() on an accepting socket. It just mess up that socket, and not all the sockets.
Is this out of spec or should be fixed can only be defined and discussed with HP support.
11.31 shouldn't have this behavior.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 02:38 AM
07-07-2009 02:38 AM
Re: RST on Socket Listener caused
Thanks for you answers, the described problem happened also on one of our customer having 11.31
what we are going to do is to avoid the recv on socket listner and call the accept whatever we have in the buffer, the question is: if we call the accept and in the buffer there's a RST, can we continue calling poll() on this socket listner without having POLLERR?
Regards
Lassaad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 02:59 AM
07-07-2009 02:59 AM
Re: RST on Socket Listener caused
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 08:42 AM
07-07-2009 08:42 AM
Re: RST on Socket Listener caused
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 08:58 AM
07-07-2009 08:58 AM
Re: RST on Socket Listener caused
I cannot recall if POLLERR is "edge
triggered" or "level triggered" to
know if there is more than one pending
connection that was reset by the remote
if a single recv() would clear it.
"
in fact it is both, but moreover is is final.
In usual time you don't get a POLLERR on an accepting socket.
- on 11.31 it can be due to a none patched system , since there is a xport patch which fixes some strange errors in accept().
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 03:13 PM
07-07-2009 03:13 PM
Re: RST on Socket Listener caused
Thank you very much for your comments, but I did not catch the meaning of "edge triggered" or "level triggered".
Actually our application has an infinite loop in which we call poll(), then we call recv() with MSG_PEEK on all file descriptors related to socket and returned by poll() and if no problem we call accept() if the socket is listener.
So when the recv() returned the error ECONNRESET we just ignored it without doing the accept() and thus the next poll returned the file descriptor of the listener (on which we got the RST) but with the revent bit mask with POLLERR.
Based on your recommendation we updated the application by avoiding the call of recv() with MSG_PEEK for file descriptors related to socket listener and we call directly accept().
The other problem is that we are unable to reproduce the issue, we played with tcp parameters, we added breakpoints before the accept in server..etc but never got the RST on the socket listener, the issue happened only on customer machine which are overloaded. So any clue to duplicate this RST and test the modification will be very much appreciated.
Best regards
Lassaad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-07-2009 03:33 PM
07-07-2009 03:33 PM
Re: RST on Socket Listener caused
"Edge triggered" vs "level triggered" might best be addressed via a web search :)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2009 03:34 AM
07-14-2009 03:34 AM
Re: RST on Socket Listener caused
We finally succeeded to reproduce the issue with the scenario that you indicated (thank you !), but only in 5% percent cases and not systematically.
We installed also wireshak to control the packet types exchanged and as you said when the queue is full there are systematically the RST packets, but when we unfreeze our application it did not handle this packet in all cases (just 5% of all cases), it seems like the RST packet has a very small life time and we should unfreeze our application before that time expires, I am may be wrong in my observations, but can you please help me to make this tests systematic.
Thanks and best regards
Lassaad
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
07-14-2009 08:54 AM
07-14-2009 08:54 AM
SolutionAs for how to make it more systematic, that really depends on more things than I can think of at this time. You might find some way to shorten the length of time before the client abandons all hope. How will be client-stack-specific.