Closed Bug 929310 Opened 11 years ago Closed 10 years ago

mach build can fail on Windows when psutil fails to find a disk

Categories

(Firefox Build System :: General, defect)

x86_64
Windows 7
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 1013730

People

(Reporter: ziga.seilnacht, Unassigned, Mentored)

Details

(Whiteboard: [lang=python])

User Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:27.0) Gecko/20100101 Firefox/27.0 (Beta/Release)
Build ID: 20131021030203

Steps to reproduce:

$ mach build



Actual results:

Error running mach:

    ['build']

The error occurred in code that was called by the mach command. This is either
a bug in the called code itself or in the way that mach is calling it.

You should consider filing a bug for this issue.

If filing a bug, please include the full output of mach, including this error
message.

The details of the failure are as follows:

RuntimeError: couldn't find any physical disk

  File "python/mozbuild/mozbuild/mach_commands.py", line 306, in build
    monitor.init(warnings_path)
  File "python/mozbuild\mozbuild\controller\building.py", line 278, in init
    self.resources = SystemResourceMonitor(poll_interval=1.0)
  File "testing/mozbase/mozsystemmonitor\mozsystemmonitor\resourcemonitor.py", line 179, in __init__
    io = psutil.disk_io_counters()
  File "python/psutil\psutil\__init__.py", line 1229, in disk_io_counters
    raise RuntimeError("couldn't find any physical disk")


Expected results:

It should be possible to build with mach even when running from a non-administrator account.
At first, I was like "there's no way this could be an issue." But then I thought: "you know, given the audience that builds Firefox, chances are most of them have Administrator access, so this could be legit."

I suppose we should just trap all exceptions when instantiating the resource monitor from the location identified in the stack trace.
Whiteboard: [mentor=gps][lang=python]
Ugh, I was wrong, it is not related to non-administrator account.

On that machine the same failure also happens when run from an Administrator account. The machine is slightly unusual, running Windows Server 2012 with one of the drives using Intel's RAID and a ReFS partition. Still, it would be nice if mach worked there.
Summary: mach build fails on Windows when run from a non-administrator account → mach build can fail on Windows when psutil fails to find a disk
(In reply to Gregory Szorc [:gps] from comment #1)
> At first, I was like "there's no way this could be an issue." But then I
> thought: "you know, given the audience that builds Firefox, chances are most
> of them have Administrator access, so this could be legit."

Of course I have an administrator account on my computer, but I'm usually using non-administrator account for my regular work. Why do I have to switch the account and give an extra privilege to build Firefox? It's annoying and contrary to the fundamental principle of least privilege.
Mentor: gps
Whiteboard: [mentor=gps][lang=python] → [lang=python]
Status: UNCONFIRMED → RESOLVED
Closed: 10 years ago
Resolution: --- → DUPLICATE
Product: Core → Firefox Build System
You need to log in before you can comment on or make changes to this bug.