User Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:54.0) Gecko/20100101 Firefox/54.0 Build ID: 20170301192304 Steps to reproduce: Select a Newsgroup open the context menu (RMC) Properties -> /Synchronization\ => [Download Now] Actual results: TB crashes It does not matter if the checkbox ('Select this newsgroup for offline use') is ticked.
Comm-Central: last good Changeset: 21218 (5f72602f1ff0) Bug 1337865 - Force release of subserver's listener. r=aceman first bat Changeset: 21219 (ef7420896e68) Bug 1337865 - fix some leaking objects in mailnews/news. r=aceman
Created attachment 8846080 [details] [diff] [review] 1346338-fix-crash.patch Thanks for reporting this and thanks for being on the Daily/Aurora channel where the ride can be bumpy, as we see here. Aceman, please keep in mind that 'new' is infallible in Mozilla, if the memory cannot be allocated, control doesn't return to the caller.
Assignee: nobody → jorgk
Status: UNCONFIRMED → ASSIGNED
Ever confirmed: true
Attachment #8846080 - Flags: review?(acelists)
Component: Untriaged → Networking: NNTP
OS: Unspecified → All
Product: Thunderbird → MailNews Core
Hardware: Unspecified → All
There is no crash report in this bug. So how does the fix work? How did we cause this in bug 1337865 ?
And how is RefPtr better than the original code?
Oh, I thought this was a simple review :-( OK, no crash report, but the crash is easily reproducible, just follow the steps. How did we cause this. Easy. There was a new object allocated, which was clearly leaking. So I added a 'delete' in the function that created it. Obviously though, someone else grabbed a reference to the object which was dereferenced later/elsewhere/asynchronously/who-knows. So the obvious Mozilla fix is letting ref-counting do its magic. The object will magically die when the last interested party releases the reference.
Comment on attachment 8846080 [details] [diff] [review] 1346338-fix-crash.patch Review of attachment 8846080 [details] [diff] [review]: ----------------------------------------------------------------- OK, let's try it. But I do not see how can somebody outside keep reference to downloadState .
Attachment #8846080 - Flags: review?(acelists) → review+
It's invisible, like all the workings of software. But seriously: downloadState->DownloadArticles(...) calls nsNewsDownloader::DownloadArticles(). In there we set a bunch of member variables, call DownloadNext(true) and return. Upon return the object is destroyed, way before the async download is finished. Surely I should have know this before causing the crash ;-(
Status: ASSIGNED → RESOLVED
Last Resolved: 2 years ago
status-thunderbird54: --- → affected
status-thunderbird55: --- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Thunderbird 55.0
Comment on attachment 8846080 [details] [diff] [review] 1346338-fix-crash.patch We'll need to fix the crash in Aurora as well. This will go to ESR 52 together with bug 1337865 in due course.
Aurora (TB 54): https://hg.mozilla.org/releases/comm-aurora/rev/39eaa29525624f85ed1bc0fdb7e71be54d4c2b06 Crash will be fixed in Earlybird and Daily tomorrow. Thanks again for reporting it.
status-thunderbird54: affected → fixed
Beta (TB 53): https://hg.mozilla.org/releases/comm-beta/rev/27fd17b01040de8023be9ec3ef4b979d4939b16d
status-thunderbird53: affected → fixed
status-thunderbird_esr52: --- → fixed
tracking-thunderbird_esr52: --- → 53+
Attachment #8846080 - Flags: approval-comm-esr52? → approval-comm-esr52+
You need to log in before you can comment on or make changes to this bug.