`_Py_HashRandomization_Init` Python error at the end of every mach invocation
Categories
(Firefox Build System :: General, defect, P1)
Tracking
(firefox-esr91 unaffected, firefox95 unaffected, firefox96 unaffected, firefox97 fixed)
| Tracking | Status | |
|---|---|---|
| firefox-esr91 | --- | unaffected |
| firefox95 | --- | unaffected |
| firefox96 | --- | unaffected |
| firefox97 | --- | fixed |
People
(Reporter: mossop, Assigned: janerik)
References
(Blocks 1 open bug, Regression)
Details
(Keywords: regression)
Attachments
(2 files)
On Windows every time I do a build or package or something the command appears to work but the last line logged is this:
Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
Also hitting this. I didn't realize it was non fatal until finding this bug. Seeing Fatal Python error after mach commands had me assuming stuff was busted.
On top of looking scary, it can also make prompts confusing when running commands that require interaction:
Paste API Token from that page: Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
though this also seems to have worked okay with if I ignore the error and just respond to the prompt.
Comment 2•4 years ago
|
||
I'm going to tentatively mark this as "regressed by" the glean update, because one-off error messages at the end of Mach processes (even those as simple as, say, ./mach python -c pass) are generally associated with Glean behaviour in a background thread.
If that indeed wasn't the cause, I'll be able to investigate more closely tomorrow.
Updated•4 years ago
|
| Assignee | ||
Comment 3•4 years ago
|
||
After a quick web search I think I know what's going on:
We recently landed a Glean patch to set PYTHONPATH in the launched subprocess, but they way we're doing it overrides all other environment variables.
It seems for the RNG to work it needs SYSTEMROOT to be set. That's something I can fix in Glean.
| Assignee | ||
Comment 4•4 years ago
|
||
Verified a fix, gonna send that soon.
Comment 5•4 years ago
|
||
| Assignee | ||
Comment 6•4 years ago
|
||
Updated•4 years ago
|
Comment 8•4 years ago
|
||
Set release status flags based on info from the regressing bug 1744674
Updated•4 years ago
|
Comment 9•4 years ago
|
||
| bugherder | ||
Description
•