Closed Bug 741179 Opened 8 years ago Closed 4 years ago

crash in nsDiskCacheBlockFile::Write

Categories

(Core :: Networking: Cache, defect, critical)

12 Branch
x86
Windows 7
defect
Not set
critical

Tracking

()

RESOLVED WONTFIX
Tracking Status
firefox12 + ---

People

(Reporter: scoobidiver, Assigned: michal)

Details

(Keywords: crash, Whiteboard: [startupcrash])

Crash Data

It's #123 top crasher in 11.0, #12 in 12.0b3, #72 in 13.0a2, and #400 in 14.0a1.
It occurs almost only on startup.

Signature 	nsDiskCacheBlockFile::Write(int, void const*, int) More Reports Search
UUID	2347205d-e5c5-418b-89f2-11e412120401
Date Processed	2012-04-01 09:17:42
Uptime	374
Last Crash	5.5 days before submission
Install Age	10.1 hours since version was first installed.
Install Time	2012-03-31 23:12:13
Product	Firefox
Version	12.0
Build ID	20120328051619
Release Channel	beta
OS	Windows NT
OS Version	6.1.7601 Service Pack 1
Build Architecture	x86
Build Architecture Info	GenuineIntel family 6 model 23 stepping 10
Crash Reason	EXCEPTION_ACCESS_VIOLATION_READ
Crash Address	0xd635000
App Notes 	
AdapterVendorID: 0x10de, AdapterDeviceID: 0x0873, AdapterSubsysID: 1c521043, AdapterDriverVersion: 8.16.11.8881
D3D10 Layers? D3D10 Layers- D3D9 Layers? D3D9 Layers- 
EMCheckCompatibility	True	
Total Virtual Memory	2147352576
Available Virtual Memory	1835151360
System Memory Use Percentage	39
Available Page File	3209719808
Available Physical Memory	1305694208

Frame 	Module 	Signature 	Source
0 		@0x88deb 	
1 		@0x88c54 	
2 		@0x71d1d 	
3 	xul.dll 	nsDiskCacheBlockFile::Write 	netwerk/cache/nsDiskCacheBlockFile.cpp:406
4 	xul.dll 	nsDiskCacheBlockFile::WriteBlocks 	netwerk/cache/nsDiskCacheBlockFile.cpp:240
5 	xul.dll 	nsDiskCacheMap::WriteDataCacheBlocks 	netwerk/cache/nsDiskCacheMap.cpp:970
6 	xul.dll 	nsDiskCacheStreamIO::Flush 	netwerk/cache/nsDiskCacheStreams.cpp:549
7 	xul.dll 	nsDiskCacheOutputStream::Close 	netwerk/cache/nsDiskCacheStreams.cpp:243
8 	xul.dll 	nsCacheEntryDescriptor::nsOutputStreamWrapper::~nsOutputStreamWrapper 	netwerk/cache/nsCacheEntryDescriptor.h:192
9 	xul.dll 	nsCacheEntryDescriptor::nsOutputStreamWrapper::`vector deleting destructor' 	
10 	xul.dll 	nsCacheEntryDescriptor::nsOutputStreamWrapper::Release 	netwerk/cache/nsCacheEntryDescriptor.cpp:761
11 	xul.dll 	nsProxyReleaseEvent::Run 	obj-firefox/xpcom/build/nsProxyRelease.cpp:52
12 	xul.dll 	nsThread::ProcessNextEvent 	xpcom/threads/nsThread.cpp:657
13 	xul.dll 	nsThreadStartupEvent::Run 	xpcom/threads/nsThread.cpp:218
14 	nspr4.dll 	_PR_NativeRunThread 	nsprpub/pr/src/threads/combined/pruthr.c:426
15 	msvcr80.dll 	_getptd_noexit 	
16 	msvcr80.dll 	_endthreadex 	
17 	msvcr80.dll 	_endthreadex 	
18 	kernel32.dll 	BaseThreadInitThunk 	
19 	ntdll.dll 	__RtlUserThreadStart 	
20 	ntdll.dll 	_RtlUserThreadStart 	

Here are today's correlations per extension in 12.0 (many adware):
  nsDiskCacheBlockFile::Write(int, void const*, int)|EXCEPTION_ACCESS_VIOLATION_EXEC (63 crashes)
     17% (11/63) vs.   1% (182/29708) {75656794-AB59-4712-BFBC-5D816D56F3BC} (DealBulldog/Splitcam/HyperCam/PicPick/AnyVideo To DVD/FaceSmooch/Converter DB/Burn4FreeDB Toolbar)
     17% (11/63) vs.   3% (787/29708) bbrs_002@blabbers.com (Browser Companion Helper)
     14% (9/63) vs.   3% (798/29708) {EB9394A3-4AD6-4918-9537-31A1FD8E8EDF} (DealPly)

More reports at:
https://crash-stats.mozilla.com/report/list?signature=nsDiskCacheBlockFile%3A%3AWrite%28int%2C+void+const*%2C+int%29
We need to track all top crashers (especially startup crashers) for release.

Adding qawanted since we should try to reproduce with some of the adware that shows up in the correlations.
Keywords: qawanted
So far I've been unable to reproduce any crash. I started Firefox 12.0b3 with a new profile and systematically installed each piece of software listed in comment 0, one-by-one, restarting Firefox between installs.

Build: Firefox 12.0b3 on Windows 7 64-bit
Software listed in Control Panel > Programs:
 * Anti-phishing Domain Advisor v1.0.0.0
 * Any Video Convertor v3.3.5
 * Babylon
 * Burn4Free DVD Burning v5.9.0.0
 * DealBulldog Toolbar
 * DealPly
 * FaceSmooch Smileys
 * FlipToast v1.0.0
 * Hypercam v2.25.01
 * I Want This
 * PicPick v3.1.3
 * Spam Free Searchbar v1.0.0.12
 * SplitCam v5.4.6.0
 * SweetIM for Messenger v3.6
 * YonToo v1.0.2

Add-ons in About:Addons:
 * Babylon 1.1.8
 * Blabbers 1.0.3
 * I Want This 0.78.15
 * Incredibar 1.5.0
 * Spam Free Search Bar 1.0
 * Sweet IM toolbar for Firefox 1.4.0.0
 * YonToo 1.20.00

All of this makes everything kind of slow, not just Firefox. I've tried restarting Firefox several times and have yet to see a startup crash. I've done some browsing smokestests as well and everything works (in spite of the bloat).
Josh - any ideas on other angles we can take here (code/change inspection, etc.)? QA has been unable to reproduce.
Assignee: nobody → joshmoz
(In reply to Alex Keybl [:akeybl] from comment #3)
> Josh - any ideas on other angles we can take here (code/change inspection,
> etc.)? QA has been unable to reproduce.

No ideas, maybe Nick or Michal can come up with something.
down a bit in the stack this code changed back in Jan.

d16983821d2f
2012-01-12 16:13 +0100	Michal Novotny - Bug 716289 - crash in nsCacheService::SearchCacheDevices
Now #20 on 11.0 and #13 on 12.0b3 in the last week.
I spent some time trying to reproduce this with some of the top correlated extensions on Windows XP but so far I haven't had any luck. Will try some additional scenarios today.
Assignee: joshmoz → michal.novotny
Here are some updated manual correlations:

nsDiskCacheBlockFile::Write(int, void const*, int)|EXCEPTION_ACCESS_VIOLATION_EXEC (83 crashes)
     37% (31/83) vs.   1% (496/36739) ffxtlbr@Facemoods.com
     36% (30/83) vs.   0% (128/36739) {0a452a47-c5a8-4854-a237-4b9b06b376f0}
     36% (30/83) vs.   0% (131/36739) {90b49673-5506-483e-b92b-ca0265bd9ca8}
     36% (30/83) vs.   0% (146/36739) {a1e75a0e-4397-4ba8-bb50-e19fb66890f4}
     36% (30/83) vs.   1% (200/36739) {872b5b88-9db5-4310-bdd0-ac189557e5f5}
     42% (35/83) vs.   7% (2563/36739) ffxtlbr@babylon.com
     86% (71/83) vs.  79% (28940/36739) testpilot@labs.mozilla.com (Mozilla Labs - Test Pilot, https://addons.mozilla.org/addon/13661)
This bug seems to be similar to bug #656758 (see comment #12 and #13). Either there is some serious problem with NSPR, or the crash is caused by some malware or virus. The code that creates a new cache block file (where the crash happens) is really simple. In nsDiskCacheBlockFile::Open() we create the file and in nsDiskCacheBlockFile::Write() we simply write buffer of 16k, 4k or 1k data to that file. And this all happens under the cache lock, so I really don't think this is a problem in the cache code.

We should probably try to reproduce it in an infected virtual machine. Is it possible to find out which virus is the most active within a certain date range? The crash happens almost only when the disk cache is being created. So please make sure to delete the cache directory when trying to reproduce it. This is the "Cache Directory" in "Disk cache device" section on about:cache page.
Because so many of the comments are non-English we should try testing with some of the localized builds.
Also unsuccesfull while trying to reproduce. Used Firefox 12 beta 4 (portuguese locale) on Windows XP. Installed the Alot Appbar as some comments were explicitly referring to the add-on. Deleted cache directory, added some apps in the toolbar, played a bit with the toolbar, loaded different pages with different plugins. Also made sure the last used tabs are remebered so that they load at startup.
I also tried reproducing with a Portuguese (Brazilian) localized build, using Mozilla/5.0 (Windows NT 5.1; rv:11.0) Gecko/20100101 Firefox/11.0 and all of these addons with no luck:

        Adblock Plus
        2.0.3
        true
        {d10d0bf8-f5b5-c8b4-a8b2-2b9879e08c5d}

        Add-on Compatibility Reporter
        1.1
        true
        compatibility@addons.mozilla.org

        Bing Search for Firefox
        1
        true
        bing.search.for.firefox@firefox.bing

        Cache Status
        0.7.10
        true
        cache@status.org

        DealPly
        2.0
        true
        {EB9394A3-4AD6-4918-9537-31A1FD8E8EDF}

        DownloadHelper
        4.9.9
        true
        {b9db16a4-6edc-47ec-a1f4-b86292ed211d}

        FlashGot
        1.4.1
        true
        {19503e42-ca3c-4c27-b1e2-9cdb2170ee34}

        Gossiper Community Toolbar
        3.10.0.1
        true
        {0a452a47-c5a8-4854-a237-4b9b06b376f0}

        IMVU Inc Community Toolbar
        3.10.0.1
        true
        {90b49673-5506-483e-b92b-ca0265bd9ca8}

        MyAshampoo Community Toolbar
        3.10.0.1
        true
        {a1e75a0e-4397-4ba8-bb50-e19fb66890f4}

        Searchqu Toolbar
        4.6.1.01
        true
        {99079a25-328f-4bd4-be04-00955acaa0a7}

        Test Pilot
        1.2.1
        true
        testpilot@labs.mozilla.com

        Java Quick Starter
        1.0
        false
        jqs@sun.com

        Microsoft .NET Framework Assistant
        0.0.0
        false
        {20a82645-c095-46ed-80e3-08825760534b}
Mozilla/5.0 (Windows NT 6.1; rv:12.0) Gecko/20100101 Firefox/12.0

Tried the following combination of add-ons with upgrade from F 11 to F12 beta 4 on Windows 7. No luck yet.

Add-on Compatibility Reporter 1.1
Babylon 1.1.9
Babylon Spelling and Proofreading 1.0.0.1
Babylon Translation Activation1.1
Cache Status 0.7.10
DealPly 2.0 
DownloadHelper 4.9.9
Feedback 1.1.2
FlashGot 1.4.1
MyAshampoo Community Toolbar 3.10.0.1

FTR, one comment mentions a Trojan: Trojan.Win32.Generic!BT
https://crash-stats.mozilla.com/report/index/f27b6577-4ac6-43bd-bdc0-7de952120404
Doesn't look like there's anything left for QA to test right now. Michal, if you can get an infected virtual machine to reproduce then hopefully we can get STR on this. If anyone can answer his questions about what viruses to try, that might be helpful here.
Keywords: qawanted
qawanted
assf
qawanted
(In reply to hayvevoianh_261085 from comment #17)
> qawanted
See comment 14.
It's #132 top browser crasher in 13.0.1, #88 in 14.0b7.
Keywords: topcrash
Crash Signature: [@ nsDiskCacheBlockFile::Write(int, void const*, int)] → [@ nsDiskCacheBlockFile::Write(int, void const*, int)] [@ @0x0 | nsDiskCacheBlockFile::Write(int, void const*, int) ]
Crash Signature: [@ nsDiskCacheBlockFile::Write(int, void const*, int)] [@ @0x0 | nsDiskCacheBlockFile::Write(int, void const*, int) ] → [@ nsDiskCacheBlockFile::Write(int, void const*, int)] [@ @0x0 | nsDiskCacheBlockFile::Write(int, void const*, int) ] [@ nsDiskCacheBlockFile::Write] [@ @0x0 | nsDiskCacheBlockFile::Write ]
deprecated code and very close to non-existant in crash stats
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → WONTFIX
You need to log in before you can comment on or make changes to this bug.