Closed
Bug 364741
Opened 19 years ago
Closed 18 years ago
nsISocketTransport.isAlive() returns false immediately after successful connect
Categories
(Core :: Networking, defect)
Core
Networking
Tracking
()
RESOLVED
FIXED
mozilla1.9alpha1
People
(Reporter: Gijs, Assigned: Biesinger)
References
()
Details
Attachments
(1 file, 1 obsolete file)
|
1.18 KB,
patch
|
Details | Diff | Splinter Review |
As in summary and URL. Because the event is sent before the socket state is changed, and the networking code runs on a different thread, by the time code started from the event breaks in some cases because it checks isAlive() and then fails.
In ChatZilla's case, this is biting some patches of us because on some older mozilla versions, the socket doesn't throw an error if you go into offline mode, so we tried to check isAlive, which broke the connection sequence completely for the reason stated.
Updated•19 years ago
|
Summary: nsISocketTransport.isAlive() returns false immediately after succesfull connect → nsISocketTransport.isAlive() returns false immediately after successful connect
| Assignee | ||
Comment 1•19 years ago
|
||
Assignee: nobody → cbiesinger
Status: NEW → ASSIGNED
Attachment #249541 -
Flags: superreview?(darin.moz)
Attachment #249541 -
Flags: review?(darin.moz)
| Assignee | ||
Comment 2•19 years ago
|
||
Note that there's an assertion when running the testcase:
###!!! ASSERTION: nsExceptionManager not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()', file /home/chb/mozilla/xpcom/base/nsExceptionService.cpp, line 97
I'd like to fix that before checking the patch in, even though it doesn't actually cause the test to fail.
Target Milestone: --- → mozilla1.9alpha
| Assignee | ||
Comment 3•19 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
something seems to be wrong with this testcase...
Attachment #249541 -
Flags: superreview?(darin.moz)
Attachment #249541 -
Flags: review?(darin.moz)
| Reporter | ||
Comment 4•19 years ago
|
||
Biesi: what exactly is wrong with the testcase? :-)
| Reporter | ||
Comment 5•18 years ago
|
||
Alright, biesi, are you any further with this? :-)
| Assignee | ||
Comment 6•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
I think we should get this in without tests for now, there are thread-related issues with the testcase
Attachment #249541 -
Flags: superreview?(bzbarsky)
Attachment #249541 -
Flags: review?(bzbarsky)
Comment 7•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
r+sr=me, but please make sure to get the test fixed and in...
Attachment #249541 -
Flags: superreview?(bzbarsky)
Attachment #249541 -
Flags: superreview+
Attachment #249541 -
Flags: review?(bzbarsky)
Attachment #249541 -
Flags: review+
| Assignee | ||
Comment 8•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
I'd like to land the code fix now, because it's a pretty obvious fix. I'll land the test as soon as I can get it fixed.
Attachment #249541 -
Flags: approval1.9?
Comment 9•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
a=beltzner, but if the test doesn't land, I'm gonna sic shaver and sayrer on you ;)
Attachment #249541 -
Flags: approval1.9? → approval1.9+
| Assignee | ||
Comment 10•18 years ago
|
||
Attachment #249541 -
Attachment is obsolete: true
| Assignee | ||
Comment 11•18 years ago
|
||
Checking in nsSocketTransport2.cpp;
/cvsroot/mozilla/netwerk/base/src/nsSocketTransport2.cpp,v <-- nsSocketTransport2.cpp
new revision: 1.55; previous revision: 1.54
done
leaving open to get a unit test checked in
| Assignee | ||
Comment 12•18 years ago
|
||
so the unit test problem is:
###!!! ASSERTION: nsExceptionManager not thread-safe: '_mOwningThread.GetThread() == PR_GetCurrentThread()', file /home/chb/mozilla/xpcom/base/nsExceptionService.cpp, line 97
| Assignee | ||
Comment 13•18 years ago
|
||
also PrincipalHolder
and then, nsSimpleURI (held by the null principal which gets cycle collected on the main thread during shutdown. did the null principal create that URI on a background thread??)
Comment 14•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
Clearing approval flag since this bug is still open for unit tests. This patch has landed.
Attachment #249541 -
Flags: approval1.9+
Updated•18 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 18 years ago
Flags: in-testsuite?
Resolution: --- → FIXED
Comment 15•18 years ago
|
||
Comment on attachment 249541 [details] [diff] [review]
patch
adding back an approval.
Attachment #249541 -
Flags: approval1.9+
You need to log in
before you can comment on or make changes to this bug.
Description
•