Closed Bug 1404857 Opened 7 years ago Closed 7 years ago

Spawning the pingsender must not block shutdown if permission dialog is displayed on Windows 7

Categories

(Toolkit :: Telemetry, defect, P1)

All
Windows 7
defect

Tracking

()

RESOLVED WORKSFORME
Tracking Status
firefox58 --- affected

People

(Reporter: Dexter, Assigned: Dexter)

References

(Blocks 1 open bug)

Details

As found in bug 1315306 comment 16, on Windows 7 Firefox is blocking shutdown the first time a new version of Firefox/pingsender is deployed because a permission dialog is displayed [1].

If the user waits more than 60s to authorize the execution of the pingsender, Firefox automatically terminates itself (crash).

We should find a way to make ShellExecuteEx not fail/return:

(In reply to :Ehsan Akhgari (needinfo please, extremely long backlog) from bug 1315306  comment #13)
> Based on comment 12, I think what happens here is when the dialog is shown,
> ShellExecuteExW here fails
> <https://searchfox.org/mozilla-central/rev/
> 6326724982c66aaeaf70bb7c7ee170f7a38ca226/xpcom/threads/nsProcessCommon.
> cpp#500> and as a result the caller in
> https://searchfox.org/mozilla-central/rev/
> 6326724982c66aaeaf70bb7c7ee170f7a38ca226/toolkit/components/telemetry/
> TelemetrySend.jsm#1323 throws an exception which somehow messes up the state
> of the async shutdown code.
> 
> Does this sound plausible?



[1] - https://bugzilla.mozilla.org/attachment.cgi?id=8892443
Blocks: 1315306
OS: All → Windows 7
Priority: -- → P1
Is it possible to "inherit" the UAC permissions from the main Firefox binary?
Does this happen with every Firefox update, or just those where pingsender is updated?
Assignee: nobody → alessio.placitelli
Also:
Does this happen once per install or on subsequent updates?
Does it happen when using the proper installer or just when running Fx from a zip archive?
(In reply to Georg Fritzsche [:gfritzsche] [away Sep 19 - Oct 3] from comment #2)
> Also:
> Does this happen once per install or on subsequent updates?
> Does it happen when using the proper installer or just when running Fx from
> a zip archive?

Emil, any chance you could help us answering these questions and the last one from comment 1?
Flags: needinfo?(emil.ghitta)
I managed to reproduce this issue only on Fx that is run from the zip archive. It seems that running Fx from the installer doesn't pop up the pingsender Windows notification.

It seems that this issue occurs every time I close Firefox.

I had some hard time trying to reproduce this issue on Fx 58 (latest Nightly) but I managed to reproduce this issue with ease on Fx 57 (beta 6).
Flags: needinfo?(emil.ghitta)
(In reply to Emil Ghitta, QA [:emilghitta] from comment #4)
> I managed to reproduce this issue only on Fx that is run from the zip
> archive. It seems that running Fx from the installer doesn't pop up the
> pingsender Windows notification.

Ehsan, do you have any idea on how common is for user to install Firefox using the zip archives? Or who I can ask?
Flags: needinfo?(ehsan)
(In reply to Emil Ghitta, QA [:emilghitta] from comment #4)
> I had some hard time trying to reproduce this issue on Fx 58 (latest
> Nightly) but I managed to reproduce this issue with ease on Fx 57 (beta 6).

Thanks Emil! So, just to confirm, this doesn't happen with Nightly 58 on Windows 7, out of a zip file?
Flags: needinfo?(emil.ghitta)
Yes, I didn't managed to reproduce this issue on the latest Firefox 58(BuildId:20171009220104).

I tried to find the fix for this issue since the last time that this issue was reproducible on Nightly was on 58.0a1 (BuildId:20171002100134).

I found the following pushlog:
https://hg.mozilla.org/integration/autoland/pushloghtml?startdate=2017-10-02&enddate=2017-10-03

After searching a little more, I found that ,maybe, the patch for Bug 1396855 fixed this issue as well since this was no longer reproducible with the autoland build that contained the patch.

I am not sure about my finding, can you have a look into this? 

Thanks a lot!
Flags: needinfo?(emil.ghitta) → needinfo?(alessio.placitelli)
(In reply to Emil Ghitta, QA [:emilghitta] from comment #7)
> Yes, I didn't managed to reproduce this issue on the latest Firefox
> 58(BuildId:20171009220104).
> 
> I tried to find the fix for this issue since the last time that this issue
> was reproducible on Nightly was on 58.0a1 (BuildId:20171002100134).
> 
> I found the following pushlog:
> https://hg.mozilla.org/integration/autoland/pushloghtml?startdate=2017-10-
> 02&enddate=2017-10-03
> 
> After searching a little more, I found that ,maybe, the patch for Bug
> 1396855 fixed this issue as well since this was no longer reproducible with
> the autoland build that contained the patch.
> 
> I am not sure about my finding, can you have a look into this? 

Thank you very much for the pointers! Bug 1396855 is definitely not related to this.
I'll try to take a closer look at the pushlog, but nothing really stood out.
Flags: needinfo?(alessio.placitelli)
(In reply to Emil Ghitta, QA [:emilghitta] from comment #7)
> Yes, I didn't managed to reproduce this issue on the latest Firefox
> 58(BuildId:20171009220104).

Ha! This buildId was very, very helpful: looks like bug 1400294 landed around that date and might have affected this.
Emil, sorry if I keep abusing your patience, any chance you could verify if bug 1400294 fixed that problem?
Flags: needinfo?(emil.ghitta)
(In reply to Alessio Placitelli [:Dexter] from comment #5)
> (In reply to Emil Ghitta, QA [:emilghitta] from comment #4)
> > I managed to reproduce this issue only on Fx that is run from the zip
> > archive. It seems that running Fx from the installer doesn't pop up the
> > pingsender Windows notification.
> 
> Ehsan, do you have any idea on how common is for user to install Firefox
> using the zip archives? Or who I can ask?

I have no idea, sorry.
Flags: needinfo?(ehsan)
No problem, I'm glad to help.

I can confirm that this issue is not reproducible with the 58.0a1 (BuildId:20171003100226)autoland build that contained the fix for bug 1400294.
Flags: needinfo?(emil.ghitta)
See Also: → 1400294
(In reply to Emil Ghitta, QA [:emilghitta] from comment #11)
> No problem, I'm glad to help.
> 
> I can confirm that this issue is not reproducible with the 58.0a1
> (BuildId:20171003100226)autoland build that contained the fix for bug
> 1400294.

Thanks Emil! Out of curiosity, is the pingsender running *at all* when shutting down, on Windows 7, when getting Firefox from a zip archive?

That's the very last question, I promise. I can't verify myself as I don't have a Windows 7 machine around :-)

Thank you for your patience and efforts so far.
Flags: needinfo?(emil.ghitta)
I can see that the pingsender.exe process is running for a short period of time upon closing Firefox (Latest Nightly opened from a zip archive). 

Please needinfo me without hesitation if you have any questions.

Glad to help.
Flags: needinfo?(emil.ghitta)
(In reply to Emil Ghitta, QA [:emilghitta] from comment #13)
> I can see that the pingsender.exe process is running for a short period of
> time upon closing Firefox (Latest Nightly opened from a zip archive). 

Thank you Emil, that's all I needed!
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → WORKSFORME
You need to log in before you can comment on or make changes to this bug.