Last Comment Bug 770899 - Prefetch clearing should be repurposed to delete 0 sized read only .pf files only
: Prefetch clearing should be repurposed to delete 0 sized read only .pf files ...
Status: VERIFIED FIXED
[qa!]
:
Product: Core
Classification: Components
Component: Widget: Win32 (show other bugs)
: Trunk
: x86_64 Windows 7
: -- normal (vote)
: mozilla16
Assigned To: Brian R. Bondy [:bbondy]
: Jason Smith [:jsmith]
Mentors:
Depends on: 770883
Blocks: 770911
  Show dependency treegraph
 
Reported: 2012-07-04 08:05 PDT by Brian R. Bondy [:bbondy]
Modified: 2012-07-23 15:53 PDT (History)
3 users (show)
See Also:
Crash Signature:
(edit)
QA Whiteboard:
Iteration: ---
Points: ---
Has Regression Range: ---
Has STR: ---


Attachments
Patch v1. (9.69 KB, patch)
2012-07-04 08:36 PDT, Brian R. Bondy [:bbondy]
taras.mozilla: review+
Details | Diff | Splinter Review

Description Brian R. Bondy [:bbondy] 2012-07-04 08:05:18 PDT
Once Bug 770883 lands on Nightly (currently v16) and gets uplifted to Aurora (currently v15), we should land a new patch from this bug on Nightly (currently v16) that will delete the prefetch files only if they are readonly and 0 bytes.  This patch will not get manually uplifted to Aurora, but will land there naturally on the next migration. 

This will effectively undo anyone's prefetch that is currently disabled.  This bug will NOT be requested to go onto Aurora (v15)
Comment 1 Brian R. Bondy [:bbondy] 2012-07-04 08:36:23 PDT
Created attachment 639110 [details] [diff] [review]
Patch v1.
Comment 2 (dormant account) 2012-07-05 11:18:28 PDT
Comment on attachment 639110 [details] [diff] [review]
Patch v1.

This looks ok
Comment 3 Brian R. Bondy [:bbondy] 2012-07-10 07:44:01 PDT
I tested this on Oak and it's working as it should.  I'll push this out in a couple days.
Comment 4 Brian R. Bondy [:bbondy] 2012-07-14 06:16:16 PDT
http://hg.mozilla.org/integration/mozilla-inbound/rev/d00ae2e9b92a
Comment 5 Ryan VanderMeulen [:RyanVM] 2012-07-14 16:18:37 PDT
https://hg.mozilla.org/mozilla-central/rev/d00ae2e9b92a
Comment 6 Jason Smith [:jsmith] 2012-07-16 01:08:37 PDT
On a 7/15 inbound build, this isn't working for me on my home laptop (Win 7 32-bit). Info:

- In C:\Windows\Prefetch, there is one FIREFOX.PF file that is 0 KB and read only
- I've been running my browser for more than 20 minutes
- Maintenance service log only shows no activity by the prefetch service (no prefetch-like statements in the logs)
- The pref "app.update.service.lastVersionPrefetchCleared" is set to 16.0a1

Any ideas? I'll test on another machine tomorrow to confirm.
Comment 7 Jason Smith [:jsmith] 2012-07-16 01:21:31 PDT
(In reply to Jason Smith [:jsmith] from comment #6)
> On a 7/15 inbound build, this isn't working for me on my home laptop (Win 7
> 32-bit). Info:
> 
> - In C:\Windows\Prefetch, there is one FIREFOX.PF file that is 0 KB and read
> only
> - I've been running my browser for more than 20 minutes
> - Maintenance service log only shows no activity by the prefetch service (no
> prefetch-like statements in the logs)
> - The pref "app.update.service.lastVersionPrefetchCleared" is set to 16.0a1
> 
> Any ideas? I'll test on another machine tomorrow to confirm.

Oh wait, I figured out the issue I hit. Resetting the pref caused the prefetch service to activate, resulting in removing the one Firefox PF 0 KB read only file.
Comment 8 Jason Smith [:jsmith] 2012-07-16 01:35:07 PDT
So that verifies then for Windows 7 on inbound for the basic sanity test (wipe pref and see if prefetch file is wiped that is read only). Others to test:

- Windows XP - Basic sanity test for wiping prefetch files that are 0 KB and read only
- Windows Vista - Basic sanity test for wiping prefetch files that are 0 KB and read only
- Windows 7 - Update from FF 16 Nightly (prefetch enabled) to FF 17 Nightly (prefetch removal enabled), ensure wiping occurs
- Windows 7 - Switch from FF 16 Nightly (prefetch enabled) to FF 16 Aurora (prefetch removal enabled), ensure wiping occurs
- Windows 7 - Install FF 17 Nightly with prefetch files that > 0 KB, not read only, ensure that they are not wiped when prefetch service turns on
Comment 9 Brian R. Bondy [:bbondy] 2012-07-16 01:41:50 PDT
Cool, ya this won't auto trigger for people until the migration.
Comment 10 Jason Smith [:jsmith] 2012-07-16 17:34:12 PDT
Random question since we're doing cleanup tasks in these bugs - what are we going to do about the registry key that's created? Specifically:

HKEYLOCALMACHINE\SOFTWARE\Mozilla\MaintenanceService\FFPrefetchDisabled
Comment 11 Brian R. Bondy [:bbondy] 2012-07-16 18:01:07 PDT
My plan was nothing :) If you uninstall the service it will be removed.  But if you want you can post for that and I'll implement something to handle it.
Comment 12 Jason Smith [:jsmith] 2012-07-16 18:16:16 PDT
Tests Passed:

- Windows 7 - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows XP - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows Vista - Basic sanity test for wiping prefetch files that are 0 KB and read only (pass)
- Windows XP - Install FF 16 Nightly with prefetch files that > 0 KB, not read only, ensure that they are not wiped when prefetch service turns on (pass)
- Windows Vista - Update from FF 16 Nightly (prefetch enabled) to FF 17 Nightly (prefetch removal enabled), ensure wiping occurs (pass)

Tests still need to be run (will be done when next FF 16 Aurora build is available):

- Windows 7 - Switch from FF 16 Nightly (prefetch enabled) to FF 16 Aurora (prefetch removal enabled), ensure wiping occurs
Comment 13 Jason Smith [:jsmith] 2012-07-23 15:53:14 PDT
Last test passes. Marking as verified. Will file a followup for the cleaning up registry issue.

Note You need to log in before you can comment on or make changes to this bug.