A developer encountered an AccessDenied exception today on a Mac

Review Request #2951 - Created Oct. 8, 2015 and submitted

Information
Eric Ayers
pants
zundle/handle-access-denied
2343
53423b1...
Reviewers
pants-reviews
jsirois, kwlzn

Catch AccessDenied error in two other places in process_manager.py

A developer encountered an AccessDenied exception today on a Mac

 File "/Users/pantsman/.pex/install/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl.d5493d74c62f5a977c5119c97760061ccd69069a/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl/pants/java/nailgun_executor.py", line 180, in _get_nailgun_client
    running, updated = self._check_nailgun_state(new_fingerprint)
  File "/Users/pantsman/.pex/install/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl.d5493d74c62f5a977c5119c97760061ccd69069a/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl/pants/java/nailgun_executor.py", line 169, in _check_nailgun_state
    old_fp=self.fingerprint, new_fp=new_fingerprint,
  File "/Users/toby/.pex/install/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl.d5493d74c62f5a977c5119c97760061ccd69069a/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl/pants/java/nailgun_executor.py", line 111, in fingerprint
    if self.cmdline:
  File "/Users/pantsman/.pex/install/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl.d5493d74c62f5a977c5119c97760061ccd69069a/pantsbuild.pants-0.0.49_square_20150924_01-py2-none-any.whl/pants/pantsd/process_manager.py", line 97, in cmdline
    return process.cmdline()
  File "/Users/pantsman/.pex/install/psutil-3.1.1-py2.7-macosx-10.4-x86_64.egg.35468d99e847e571301799156d9472c88ad8b757/psutil-3.1.1-py2.7-macosx-10.4-x86_64.egg/psutil/__init__.py", line 584, in cmdline
    return self._proc.cmdline()
  File "/Users/pantsman/.pex/install/psutil-3.1.1-py2.7-macosx-10.4-x86_64.egg.35468d99e847e571301799156d9472c88ad8b757/psutil-3.1.1-py2.7-macosx-10.4-x86_64.egg/psutil/_psosx.py", line 210, in wrapper
    raise AccessDenied(self.pid, self._name)
Exception message: psutil.AccessDenied (pid=19752, name='hdiejectd')

A simpler patch (adding an extra catch of AccessDenied exception) solved the problem for the user.

Kris Wilson
Eric Ayers
Review request changed

Status: Closed (submitted)

Change Summary:

Thanks Kris, Commit c01a668

Loading...