Closed
Bug 684758
Opened 13 years ago
Closed 13 years ago
pt_ConnectContinue should also check for PR_POLL_HUP
Categories
(NSPR :: NSPR, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
4.9
People
(Reporter: flo, Assigned: flo)
Details
Attachments
(1 file, 1 obsolete file)
933 bytes,
patch
|
Details | Diff | Splinter Review |
On FreeBSD when you try to connect to a Host/Port where nothing listens, i.e. the webserver is down, firefox goes into a loop and uses 100% CPU. This can easily be reproduced by connecting to http://localhost:randomport, where randomport is a port where no service is listening.
Andriy Gapon tracked this down to pt_ConnectContinue in ptio.c of nspr. It should also check for PR_POLL_HUP. A patch is attached. With the attached patch we are not able to reproduce the problem anymore.
Updated•13 years ago
|
Attachment #558348 -
Attachment is patch: true
Attachment #558348 -
Flags: review?(wtc)
Comment 1•13 years ago
|
||
Thanks for the patch. NSPR expects poll() to report
POLLOUT in this case, indicating the socket is writable.
(The expected behavior is that a socket becomes both
readable and writable if the connect failed.) I guess
FreeBSD uses POLLHUP only to report that the socket is
writable when the connect failed in this way.
Patch checked in on the NSPR trunk (NSPR 4.9).
Checking in ptio.c;
/cvsroot/mozilla/nsprpub/pr/src/pthreads/ptio.c,v <-- ptio.c
new revision: 3.117; previous revision: 3.116
done
Attachment #558348 -
Attachment is obsolete: true
Attachment #558348 -
Flags: review?(wtc)
Updated•13 years ago
|
Assignee: wtc → flo
Status: UNCONFIRMED → RESOLVED
Closed: 13 years ago
Priority: -- → P1
Resolution: --- → FIXED
Target Milestone: --- → 4.9
Comment 2•13 years ago
|
||
Pushed to mozilla-central in the latest NSPR update: https://hg.mozilla.org/mozilla-central/rev/7e25caedd620
You need to log in
before you can comment on or make changes to this bug.
Description
•