Closed Bug 758410 Opened 12 years ago Closed 12 years ago

Installs of service should not attempt to clear prefetch as indicated in maintenanceservice-install.log

Categories

(Core :: Widget: Win32, defect)

15 Branch
x86_64
Windows XP
defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla15

People

(Reporter: jsmith, Assigned: bbondy)

References

Details

(Whiteboard: [qa!])

Attachments

(1 file)

Steps:

1. Install the 5/23 Elm Build without the maintenance service previously installed, with a nightly build already installed, with pref set
2. Complete the installation but do not launch the browser
3. Check the maintenance log

Expected:

I'd expect to see no errors in relation to the prefetch service.

Actual:

The prefetch clear service happened on install (thought originally it was supposed to be on launch?). The PF files it targeted were not read only and greater than 0 KB. Log messages in maintenanceservice-install:

Clearing prefetch files...
Error replacing prefetch path FIREFOX.EXE-0196A814.pf (5)
Error replacing prefetch path FIREFOX.EXE-28641590.pf (5)
Done searching prefetch paths. (18)
Blocks: 692255
Also happens with the 5/18 elm build.
Summary: Installing Elm Build 5/23 Starts prefetch service, but fails to clear the prefetch files (even though they already exist) → Installing Elm Build Starts prefetch service, but fails to clear the prefetch files (even though they already exist)
Also occurs with the most recent elm build during an update from 5/18 --> 5/24.
This has no harmful effects but ya I'll provide a patch for only doing this on updates of the service.  The prefetch files would normally not be generated at the point you see in the log.  

Nice find :)

Maybe the access denied errors are because the install doesn't run as the system account in that case.
Additional Notes:

I cleared the pref and launched firefox. The prefetch service isn't even running (been waiting for it to run for 6 minutes right now).
(In reply to Jason Smith [:jsmith] from comment #4)
> Additional Notes:
> 
> I cleared the pref and launched firefox. The prefetch service isn't even
> running (been waiting for it to run for 6 minutes right now).

Oh wait, it finally ran. But that took a while...
The log message pasted in Comment 0 is from maintenanceservice-install.log right? (and not maintenanceservice.log)
oh ya sorry, I'm telling you one minute but this changed to 3 minutes recently.
> Oh wait, it finally ran. But that took a while...

.pf files are 0 bytes and read only right?
(In reply to Brian R. Bondy [:bbondy] from comment #8)
> > Oh wait, it finally ran. But that took a while...
> 
> .pf files are 0 bytes and read only right?

Yes

(In reply to Brian R. Bondy [:bbondy] from comment #6)
> The log message pasted in Comment 0 is from maintenanceservice-install.log
> right? (and not maintenanceservice.log)

Yes
(In reply to Brian R. Bondy [:bbondy] from comment #3)
> Maybe the access denied errors are because the install doesn't run as the
> system account in that case.

That's probably it. The machine I'm on (Windows XP) does not allow deletion of the PF files from the prefetch folder - likely a permissions issue with the account.
OK glad to know the system account running this helps some situations. Could you confirm that upgrades do clear the pf files on that same machine?

I think installs would run as the admin account you're logged in with and upgrades I think would run as the system account so should clear them.
I just confirmed my XP machine also can't delete the prefetch files when I try manually in explorer. I haven't tested with the service though, but per your previous comments I think this works.
(In reply to Brian R. Bondy [:bbondy] from comment #11)
> OK glad to know the system account running this helps some situations. Could
> you confirm that upgrades do clear the pf files on that same machine?

That doesn't work for me. If I update from 5/23 to 5/24 on Win XP, I get the same error produced in this bug with the pref set. Note that I did uninstall the service before installing the 5/23 build.

Does updating from 5/23 --> 5/24 with an elm build having the pref set work for you? My maintenance-install log always is throwing the same error on each update.
I know why, because Windows XP doesn't use the service for installs by default so the operation wouldn't run as system account in that case.   The one time clear would use the system account though.
(In reply to Brian R. Bondy [:bbondy] from comment #14)
> I know why, because Windows XP doesn't use the service for installs by
> default so the operation wouldn't run as system account in that case.   The
> one time clear would use the system account though.

A little confused. So this explains why updating isn't working on Win XP? Or am I missing something to understanding this?
So on Windows XP you can't clear prefetch using the admin account at all. Something I just realized from your findings.

The service command that runs after 3 minutes runs as the system account. Because it issues a command directly to the service.

The code to clear the prefetch that runs on update though on XP doesn't use the service, and so it doesn't use the system account.
I'll post to fix upgrades on XP in a new bug, but it doesn't need to be fixed until after v15.  In particular it would have to be fixed before v16->v17 since that's the first time this code would be hit.
(In reply to Brian R. Bondy [:bbondy] from comment #17)
> I'll post to fix upgrades on XP in a new bug, but it doesn't need to be
> fixed until after v15.  In particular it would have to be fixed before
> v16->v17 since that's the first time this code would be hit.

Could you clarify why? Did a pre-req feature for this get moved to a different firefox release?
The code for the one time run after 3 minutes runs right away, but the code for the update should only run on the next update after this is installed.  For m-c that would be 16-17 and for Aurora that would be 15-16.  So as long as this lands on m-c in 16 then it's fine.
Summary: Installing Elm Build Starts prefetch service, but fails to clear the prefetch files (even though they already exist) → Installs of service should not attempt to clear prefetch as indicated in maintenanceservice-install.log
Re comment 19 and some comments before that, bug 758463 was posted for that.

This bug is being used for the problem confirmed in Comment 3, that an initial install should not attempt to clear prefetch, only updates and the one time only clear after 3 minutes.
Assignee: nobody → netzen
Attached patch Patch v1.Splinter Review
A quick one, we should not try to clear prefetch from installs since we do it already from the one time pref.
Attachment #627058 - Flags: review?(robert.bugzilla)
Attachment #627058 - Flags: review?(robert.bugzilla) → review+
http://hg.mozilla.org/mozilla-central/rev/fb61360eab85
Status: NEW → RESOLVED
Closed: 12 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla15
Whiteboard: [qa+]
Status: RESOLVED → VERIFIED
Whiteboard: [qa+] → [qa!]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: