Closed Bug 343371 Opened 20 years ago Closed 20 years ago

page with ftp:// URLs and javascript crashes firefox [@ nsFtpState::StopProcessing]

Categories

(Core Graveyard :: Networking: FTP, defect)

1.8 Branch
defect
Not set
critical

Tracking

(Not tracked)

VERIFIED FIXED
mozilla1.8.1

People

(Reporter: dogcow+mozilla, Assigned: Biesinger)

References

()

Details

(Keywords: crash, verified1.8.0.9, verified1.8.1)

Crash Data

Attachments

(1 file, 1 obsolete file)

The specified page on archive.org, presumably due to the javascript trying to do something with fetching the nonexistent URLs, causes firefox to crash. This happens not only on Bon Echo, but on Deer Park 1.5.0.4 as well, regardless of OS.
WFM on Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a3) Gecko/20060701 BonEcho/2.0a3 ID:2006070113 You give no specifics on what builds you are using, which means your description is completely useless.
If it's reproducible it'd be nice to have a Talkback ID for the crash. http://kb.mozillazine.org/Talkback
Severity: normal → critical
Keywords: crash
Talkback incident ID TB20496473Y. However, the crash occurs on NetBSD FireFox 1.5.0.4, WinXP FireFox 1.5.0.4, and WinXP Bon Echo 2.0a2 Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1a2) Gecko/20060512 BonEcho/2.0a2
Incident ID: 20496473 Stack Signature nsFtpState::StopProcessing 75945868 Product ID Firefox15 Build ID 2006050817 Trigger Time 2006-07-01 20:22:17.0 Platform Win32 Operating System Windows NT 5.1 build 2600 Module firefox.exe + (000903d2) URL visited http://web.archive.org/web/20041011002607/http://vax.sevensages.org/swdist/bsd/bdc/VAX-netboot-HOWTO-3.html User Comments Just loading the page. See https://bugzilla.mozilla.org/show_bug.cgi?id=343371 Since Last Crash 589 sec Total Uptime 589 sec Trigger Reason Access violation Source File, Line No. c:/builds/tinderbox/Fx-Mozilla1.8.0-Release/WINNT_5.2_Depend/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp, line 2441 Stack Trace nsFtpState::StopProcessing [c:/builds/tinderbox/Fx-Mozilla1.8.0-Release/WINNT_5.2_Depend/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp, line 2441] nsFtpState::Process [c:/builds/tinderbox/Fx-Mozilla1.8.0-Release/WINNT_5.2_Depend/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp, line 751]
Component: General → Networking: FTP
Product: Firefox → Core
QA Contact: general → networking.ftp
Summary: page with ftp:// URLs and javascript crashes firefox → page with ftp:// URLs and javascript crashes firefox [@ nsFtpState::StopProcessing]
Version: 2.0 Branch → 1.8 Branch
OS: Windows XP → All
And the Bon Echo 2.0a3 crash: TB20801560H (still line 2441, as in comment #4)
This works for me on current trunk. (It looks like there's been some major reworking in that part of the tree.) mChannel is null for some reason when we try to use it, but I guess it was non-null when we used it earlier in this function to give the alert you're seeing. http://bonsai.mozilla.org/cvsblame.cgi?file=mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp&rev=1.296.8.1&mark=2402,2441#2400
Aaaaaand 2.0b1: TB21254682M
*** Bug 351239 has been marked as a duplicate of this bug. ***
Attached patch patch (obsolete) — — Splinter Review
So is this acceptable to fix the crash on branches?
Attachment #236784 - Flags: review?(cbiesinger)
Assignee: nobody → martijn.martijn
Target Milestone: --- → mozilla1.8.1
OK, I only crash if I wait for a while while the dialog is up until I press OK.
some debug output: FTP 0x8a2ea80: Alerting '550 Failed to change directory. ' FTP 0x8a2ea80: Alerting '550 Failed to change directory. ' (the same nsFtpState!) Here I click OK in one dialog FTP 0x8a2ea80: Calling OnStatus FTP 0x8a2ea80: Releasing chan (output from other ftpstates trimmed) And then I click OK in the second dialog, and here's the crash: WARNING: NS_ENSURE_TRUE(observer) failed, file ../../../../mozilla/netwerk/base/src/nsRequestObserverProxy.cpp, line 296 FTP 0x8a2ea80: Calling OnStatus ###!!! ASSERTION: You can't dereference a NULL nsRefPtr with operator->().: 'mRawPtr != 0', file ../../../../dist/include/xpcom/nsAutoPtr.h, line 1063
the stack trace is quite awesome here. The second dialog is caused by this: While the dialog is up, we process events. That causes a timer to fire, which causes GC. That destroys a DOM node, which calls imgRequestProxy::Cancel, and here we call the FTP channel's cancel method again, which calls nsFtpState::Cancel, which reenters StopProcessing. Cool, isn't it?
Comment on attachment 236784 [details] [diff] [review] patch that means that this patch is wrong because it still shows two dialogs where we should show only one.
Attachment #236784 - Flags: review?(cbiesinger) → review-
not an issue on trunk because StopProcessing ensures early that it can't be reentered I'm working on another version of the branch patch
Attached patch patch v2 — — Splinter Review
So this patch does two things: - make this function set mKeepRunning to false at the beginning (like trunk) - moves showing the dialog to the end of the function, after updating the member variables I felt it was safer to do both of those.
Attachment #236784 - Attachment is obsolete: true
Attachment #236873 - Flags: review?(darin)
Attachment #236873 - Flags: review?(darin) → review+
Comment on attachment 236873 [details] [diff] [review] patch v2 this is a branch-only patch, so it can't land on trunk, but it makes the branch look a bit more like trunk it only moves code around a bit, it should be pretty low risk, and fixes a crash.
Attachment #236873 - Flags: approval1.8.1?
Assignee: martijn.martijn → cbiesinger
Status: NEW → ASSIGNED
Hardware: PC → All
Comment on attachment 236873 [details] [diff] [review] patch v2 a=schrep for drivers for crash fix.
Attachment #236873 - Flags: approval1.8.1? → approval1.8.1+
Maybe we could get a unit test in netwerk/ using Martijn's testcase in attachment 236642 [details].
Hm... there are a few problems with making this a unit test: the testcase as written depends on having a DOM and also on having UI; and it depends on having an FTP server available. that's all not so nice for a unit test... fixed on MOZILLA_1_8_BRANCH: Checking in nsFtpConnectionThread.cpp; /cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v <-- nsFtpConnectionThread.cpp new revision: 1.296.8.2; previous revision: 1.296.8.1 done
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Keywords: fixed1.8.1
Resolution: --- → FIXED
*** Bug 352815 has been marked as a duplicate of this bug. ***
Comment on attachment 236873 [details] [diff] [review] patch v2 since this fixes a crash, I think it would be good on the 1.8.0 branch as well. It's been on the 1.8 branch for 9 days now and no regressions have been reported. As described in comment 17, the risk should be pretty low.
Attachment #236873 - Flags: approval1.8.0.8?
Comment on attachment 236873 [details] [diff] [review] patch v2 approved for 1.8.0 branch, a=dveditz for drivers
Attachment #236873 - Flags: approval1.8.0.9? → approval1.8.0.9+
Checking in nsFtpConnectionThread.cpp; /cvsroot/mozilla/netwerk/protocol/ftp/src/nsFtpConnectionThread.cpp,v <-- nsFtpConnectionThread.cpp new revision: 1.296.8.1.2.2; previous revision: 1.296.8.1.2.1 done
Keywords: fixed1.8.0.9
Making a testcase for this is much more viable now that we have the mochitest framework. The only additional thing we'd need is an FTP server running on the machine that runs the tests, I think.
Flags: in-testsuite?
Verified fixed for 1.8.0.9 and 1.8.1.1. No crash on URL with Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.1.1pre) Gecko/20061129 BonEcho/2.0.0.1pre Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.8.0.9pre) Gecko/20061130 Firefox/1.5.0.9pre also on Vista and on Fedora FC 6
Status: RESOLVED → VERIFIED
Crash Signature: [@ nsFtpState::StopProcessing]
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: