Closed Bug 954748 Opened 11 years ago Closed 11 years ago

Input/output error on quit when closing Instantbird

Categories

(Chat Core :: IRC, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Unassigned)

Details

Attachments

(1 file, 1 obsolete file)

*** Original post on bio 1316 at 2012-03-03 22:51:00 UTC ***

Quite often one sees the JS-IRC quit message "Quit: Input/output error" instead of the default quit message. Circumstantial evidence suggests this occurs when IB quits (as opposed to just the account).

Flo mentioned that probably indicates that we are sending crap to the server at the time we disconnect in some cases.
Attached patch Patch (obsolete) — Splinter Review
*** Original post on bio 1316 as attmnt 1219 at 2012-03-04 22:50:00 UTC ***

This fixes the problem. I'm not sure whether calling this.disconnect instead would be better though.
Attachment #8352972 - Flags: review?(clokep)
Comment on attachment 8352972 [details] [diff] [review]
Patch

*** Original change on bio 1316 attmnt 1219 at 2012-03-04 22:57:21 UTC ***

I'm OK calling this.quit() here instead of this.disconnect() (I think it works better actually). I agree with flo that we should move the comment that method (and the socket disconnection code) together. (and delete the imAccount below that).
Attachment #8352972 - Flags: review?(clokep) → review-
*** Original post on bio 1316 at 2012-03-04 23:11:32 UTC ***

The patch doesn't always solve the problem, though it improves things a bit. It seems the quit message sent to the socket doesn't reach the server as IB can quit before it is transmitted.
Attached patch PatchSplinter Review
*** Original post on bio 1316 as attmnt 1220 at 2012-03-04 23:26:00 UTC ***

As discussed on IRC, a complete solution will additionally require IB to wait until sockets have transmitted all data still in the pipe before quitting.
Attachment #8352973 - Flags: review?(clokep)
Comment on attachment 8352972 [details] [diff] [review]
Patch

*** Original change on bio 1316 attmnt 1219 at 2012-03-04 23:26:43 UTC was without comment, so any subsequent comment numbers will be shifted ***
Attachment #8352972 - Attachment is obsolete: true
Comment on attachment 8352973 [details] [diff] [review]
Patch

*** Original change on bio 1316 attmnt 1220 at 2012-03-04 23:50:24 UTC ***

This one looks good! There seems to be a flush method [1] that maybe we should call on the socket in the quit method?

[1] https://developer.mozilla.org/en/XPCOM_Interface_Reference/nsIOutputStream#flush%28%29
Attachment #8352973 - Flags: review?(clokep) → review+
*** Original post on bio 1316 at 2012-03-05 00:10:15 UTC ***

(In reply to comment #5)
> There seems to be a flush method [1] that maybe we should
> call on the socket in the quit method?

close() in http://lxr.instantbird.org/instantbird/source/chat/modules/socket.jsm#198 already calls flush().
*** Original post on bio 1316 at 2012-03-06 00:41:34 UTC ***

(In reply to comment #4)
> Created attachment 8352973 [details] [diff] [review] (bio-attmnt 1220) [details]
> Patch
> 
> As discussed on IRC, a complete solution will additionally require IB to wait
> until sockets have transmitted all data still in the pipe before quitting.

This is checked in as http://hg.instantbird.org/instantbird/rev/f893c587df9e but I'm going to leave this open for now.
*** Original post on bio 1316 at 2013-08-26 10:42:16 UTC ***

We haven't seen this in a while, so resolving as fixed.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: