Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

out of pty devices error on OSX High Sierra #501

Open
fmina opened this issue Jan 22, 2018 · 2 comments
Open

out of pty devices error on OSX High Sierra #501

fmina opened this issue Jan 22, 2018 · 2 comments

Comments

@fmina
Copy link

fmina commented Jan 22, 2018

System Info

  • Operating System: Darwin fmina-mac.local 17.3.0 Darwin Kernel Version 17.3.0: Thu Nov 9 18:09:22 PST 2017; root:xnu-4570.31.3~1/RELEASE_X86_64 x86_64
  • Python Version: Python 2.7.10
  • Version of catkin_tools: catkin_tools 0.4.4 (C) 2014-2018 Open Source Robotics Foundation
  • ROS Distro: lunar

I just upgraded my OS to High Sierra, now I am facing a strange problem when I compile the catkin workspace. After compiling around 35 packages, I get the following error:

Traceback (most recent call last):
  File "/Library/Python/2.7/site-packages/catkin_tools/execution/executor.py", line 109, in async_job
    **stage.async_execute_process_kwargs))
  File "/Library/Python/2.7/site-packages/trollius/tasks.py", line 259, in _step
    result = coro.send(value)
  File "/Library/Python/2.7/site-packages/osrf_pycommon/process_utils/async_execute_process_trollius.py", line 65, in _async_execute_process_pty
    stdout_master, stdout_slave = pty.openpty()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py", line 29, in openpty
    master_fd, slave_name = _open_terminal()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py", line 70, in _open_terminal
    raise os.error, 'out of pty devices'
OSError: out of pty devices

which simply means the system is running out of pty terminals.

I checked the maximum number of possible pty using the following command:

sysctl -a | grep kern.tty

and it returns 255. If I change this value to something large like 999, the compilation stops with the same error after around 150 packages.

Any idea how to fix this issue?

@wjwwood
Copy link
Member

wjwwood commented Jan 22, 2018

I would have thought increasing the pty's on the system would have helped, but perhaps you need to set it in the system files and reboot (assuming that's not what you did already)?

Otherwise, it's related to osrf/osrf_pycommon#46 (likely the root cause, not something in this repository).

I don't have time to dig in myself, but I'd also suggest trying catkin_tools with Python3, perhaps their openpty implementation is more up-to-date (assuming it's something that changed in high sierra).

@daleworley
Copy link

You likely ran into the same problem I had on High Sierra with Emacs shell windows (https://stackoverflow.com/questions/53531777/cannot-open-pty-under-mac-os-high-sierra/53581958#53581958) -- High Sierra uses a different mechanism for allocating pty's than earlier Mac OS X releases, so if your code isn't reconfigured for it, it will fail to allocate a pty.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants