Closed
Bug 86880
Opened 24 years ago
Closed 24 years ago
NSPR 3.5.1 and 4.1 do not recognize ECONNABORTED
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
4.1.2
People
(Reporter: Mark.Wahl, Assigned: wtc)
Details
Attachments
(2 files)
638 bytes,
patch
|
Details | Diff | Splinter Review | |
1018 bytes,
patch
|
Details | Diff | Splinter Review |
On Solaris and presumably other UNIXes like AIX the accept() system
call can return ECONNABORTED. On Solaris see the man page for accept in
section 3xn for a full list of errors (not the one in 3n). In unix_errors.c
I see that ECONNRESET and ECONNREFUSED are handled but not ECONNABORTED.
When ECONNABORTED is returned by accept(), PR_Accept says it is an unknown
error. This occurs with iDS 5.0 and will also affect iDAR.
Assignee | ||
Updated•24 years ago
|
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Priority: -- → P1
Target Milestone: --- → 4.1.2
Assignee | ||
Comment 1•24 years ago
|
||
Assignee | ||
Comment 2•24 years ago
|
||
Assignee | ||
Comment 3•24 years ago
|
||
I checked in patch #1 (mapping ECONNABORTED to PR_CONNECT_ABORTED_ERROR)
on the trunk and NSPRPUB_RELEASE_4_1_BRANCH of NSPR. This fix will be
in NSPR 4.1.2.
Assignee | ||
Comment 4•24 years ago
|
||
Marked the bug fixed.
Looping in PR_Accept() after getting ECONNABORTED
(patch #2) will be done in NSPR 4.2 and will be
tracked as a separate bug.
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 5•24 years ago
|
||
I don't believe that looping in PR_Accept is the correct behavior.
In what bug number is that proposed change being tracked?
Assignee | ||
Comment 6•24 years ago
|
||
See W. Richard Stevens, Unix Network Programming, 2nd Ed., Vol. 1,
Section 5.11 "Connection Abort before accept Returns" on page 129.
(Bug #87493)
Comment 7•24 years ago
|
||
Imagine an application that uses PR_Poll to determine when a socket is
ready to accept. When PR_Poll says it's ready, the application calls
PR_Accept. Now imagine that the only connection read to be accepted
aborts. If PR_Accept loops, the call will hang until the next connection
is received, no?
Assignee | ||
Comment 8•24 years ago
|
||
Yes, the PR_Accept call will hang. The Berkeley socket
version of this problem is described in Stevens's book.
PR_Poll should only be used with non-blocking sockets.
You need to log in
before you can comment on or make changes to this bug.
Description
•