Closed
Bug 1509277
Opened 6 years ago
Closed 6 years ago
"Invalid Parameter" when launching firefox.exe from cmd.exe /C
Categories
(Firefox :: General, defect, P1)
Tracking
()
VERIFIED
FIXED
Firefox 65
Tracking | Status | |
---|---|---|
firefox65 | --- | verified |
People
(Reporter: ccorcoran, Assigned: bugzilla)
References
Details
Attachments
(1 file)
Steps to reproduce: Launch firefox from a cmd.exe shell as follows:
> cmd.exe /C start firefox.exe
I see a message box saying "Invalid Parameter". Clicking OK will continue normal execution.
A quick debug, it's failing on OpenProcess() because the parent PID (which was the child cmd.exe) is no longer running.
I reproduced this on mozilla-central rev 28497e7f30ae
Assignee | ||
Comment 1•6 years ago
|
||
Oh crap, I've seen this before, but before I changed everything over to mozilla::Result, the launcher would end up doing the right thing (TM) and away we would go. It's simply a race with the fact that our launching process might not exist anymore.
Assignee | ||
Comment 2•6 years ago
|
||
https://treeherder.mozilla.org/#/jobs?repo=try&revision=85c44fea967bd1ca0e5f8708d781f6596b6bcd92
Assignee | ||
Comment 3•6 years ago
|
||
If the launcher process's parent process was ephemeral, the parent may have terminated before the launcher has a chance to open a handle to it. If so, OpenProcess will fail with ERROR_INVALID_PARAMETER, as the pid is now invalid. This is a common case, so instead of erroring out, IsSameBinaryAsParentProcess should treat this case as, "No, our parent was not a Firefox binary" and just return false. This eliminated the intermittent xpcshell failures on try.
Pushed by aklotz@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/c8e66d503efd Handle ERROR_INVALID_PARAMETER from OpenProcess differently from other errors in launcher process startup; r=cpearce
Comment 5•6 years ago
|
||
bugherder |
https://hg.mozilla.org/mozilla-central/rev/c8e66d503efd
Status: ASSIGNED → RESOLVED
Closed: 6 years ago
status-firefox65:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → Firefox 65
Updated•5 years ago
|
Flags: qe-verify+
Comment 10•5 years ago
|
||
[testday-20181221]
User Agent: Mozilla/5.0 (Windows NT 6.1; Win64; x64; rv:65.0) Gecko/20100101 Firefox/65.0
OS: Windows 7 (64bit)
Status: Fixed & Verified
Steps to reproduce:
1) Press Windows Key + R
2) Type the following command in run box
> cmd.exe /C start firefox.exe
3) Firefox Launched without any error messages.
I have Reproduced the bug & The bug has been fixed in Firefox 65.0b6.
Comment 11•5 years ago
|
||
Thank you very much for verifying the issue. Changing bug flags to verified fixed.
You need to log in
before you can comment on or make changes to this bug.
Description
•