Closed Bug 954888 Opened 8 years ago Closed 8 years ago

IRC accounts connected through SSL cause random hangs

Categories

(Chat Core :: General, defect)

defect
Not set
major

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: florian)

References

()

Details

(Whiteboard: [1.2-blocking])

Attachments

(1 file)

*** Original post on bio 1455 at 2012-05-21 21:52:00 UTC ***

STR
1) Make new profile (-P), start with -jsconsole -purgecaches
2) Add IRC account (I used irc.mozilla.org)
3) Tick 'SSL' (aside: Why does that not affect the default port setting? Bad for newbies or when not paying close attention)
4) Change port to 6697 or leave it as is (makes no difference)
5) Two "this._proxyCancel is null" errors show in Error console (socket.jsm line 197) 
5) Account manager shows "Disconnecting...", IB freezes altogether and must be manually killed.

Step 3) is required.
*** Original post on bio 1455 at 2012-05-21 22:06:11 UTC ***

Confirmed by Mic on Windows.
OS: Linux → All
Hardware: x86 → All
*** Original post on bio 1455 at 2012-05-21 23:56:52 UTC ***

So the disconnect method gets called for some reason with the following stack:

resource:///modules/socket.jsm (184)
file:///C:/Users/clokep/instantbird/objdir-ib-release/mozilla/dist/bin/components/irc.js (1073)
file:///C:/Users/clokep/instantbird/objdir-ib-release/mozilla/dist/bin/components/irc.js (900)
file:///C:/Users/clokep/instantbird/objdir-ib-release/mozilla/dist/bin/components/imAccounts.js (635)
file:///C:/Users/clokep/instantbird/objdir-ib-release/mozilla/dist/bin/components/imAccounts.js (366)
*** Original post on bio 1455 at 2012-05-22 00:01:04 UTC ***

So you end up at http://lxr.instantbird.org/instantbird/source/chat/components/src/imAccounts.js#366, it seems the IRC bit is working as expected (the IRC code's disconnect method is being called directly).
*** Original post on bio 1455 at 2012-05-23 11:13:27 UTC ***

So, the hang is caused by https://bugzilla.mozilla.org/show_bug.cgi?id=711786

The first disconnect call on the account (causing the first "this._proxyCancel is null" error) is caused by a bug in the implementation of _connectionInfoChanged in imAccounts.js

I don't have any explanation to offer for why we see that error message twice.
Whiteboard: [1.2-blocking]
*** Original post on bio 1455 at 2012-05-24 12:27:13 UTC ***

The isAlive calls were added in bug 954843 (bio 1409).
Blocks: 954843
*** Original post on bio 1455 at 2012-05-24 12:49:38 UTC ***

After talking on IRC, the plan is to avoid the isAlive call altogether by keeping track of our own state [1]:
> I think we can add an isConnected variable to socket.jsm, which we flip to true
> on http://lxr.instantbird.org/instantbird/source/chat/modules/socket.jsm#408
> and false at http://lxr.instantbird.org/instantbird/source/chat/modules/socket.jsm#369

[1] http://log.bezut.info/instantbird/120524/#m196
*** Original post on bio 1455 as attmnt 1522 at 2012-05-24 13:33:00 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8353275 - Flags: review?(clokep)
Summary: Instantbird with fresh profile hangs on attempting to add IRC account → IRC accounts connected through SSL cause random hangs
Comment on attachment 8353275 [details] [diff] [review]
Stop using isAlive

*** Original change on bio 1455 attmnt 1522 at 2012-05-24 13:37:42 UTC ***

Thanks for fixing this so we can get it into the next nightly.
Attachment #8353275 - Flags: review?(clokep) → review+
*** Original post on bio 1455 at 2012-05-24 14:27:19 UTC ***

(In reply to comment #0)

> 5) Two "this._proxyCancel is null" errors show in Error console (socket.jsm
> line 197) 

Filed bug 954897 (bio 1464) to fix this error.
Blocks: 954897
Depends on: 954898
*** Original post on bio 1455 at 2012-05-24 17:43:10 UTC ***

Committed as http://hg.instantbird.org/instantbird/rev/de2e74f15128 thanks for fixing this Florian!
Assignee: nobody → florian
Status: NEW → RESOLVED
Closed: 8 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.