{"action":"created","issue":{"url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/46","repository_url":"https://api.github.com/repos/osrf/osrf_pycommon","labels_url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/46/labels{/name}","comments_url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/46/comments","events_url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/46/events","html_url":"https://github.com/osrf/osrf_pycommon/issues/46","id":288060533,"number":46,"title":"Running out of pty devices when building workspace","user":{"login":"kdhansen","id":1905784,"avatar_url":"https://avatars2.githubusercontent.com/u/1905784?v=4","gravatar_id":"","url":"https://api.github.com/users/kdhansen","html_url":"https://github.com/kdhansen","followers_url":"https://api.github.com/users/kdhansen/followers","following_url":"https://api.github.com/users/kdhansen/following{/other_user}","gists_url":"https://api.github.com/users/kdhansen/gists{/gist_id}","starred_url":"https://api.github.com/users/kdhansen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kdhansen/subscriptions","organizations_url":"https://api.github.com/users/kdhansen/orgs","repos_url":"https://api.github.com/users/kdhansen/repos","events_url":"https://api.github.com/users/kdhansen/events{/privacy}","received_events_url":"https://api.github.com/users/kdhansen/received_events","type":"User","site_admin":false},"labels":[{"id":98196827,"url":"https://api.github.com/repos/osrf/osrf_pycommon/labels/bug","name":"bug","color":"fc2929","default":true},{"id":98196830,"url":"https://api.github.com/repos/osrf/osrf_pycommon/labels/help%20wanted","name":"help wanted","color":"159818","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2018-01-12T09:43:02Z","updated_at":"2018-03-05T13:37:36Z","closed_at":null,"author_association":"NONE","body":"I am installing Lunar on my Mac using [Mike Purvis' OSX install script](https://github.com/mikepurvis/ros-install-osx). When executing `catkin build`, this error pops up after a while, and with different packages. It seems like my computer is running out of pty's.\r\n```\r\nErrors     << control_msgs:install /Users/kdh/ros-install-osx/lunar_desktop_full_ws/logs/control_msgs/build.install.001.log\r\nTraceback (most recent call last):\r\n  File \"/usr/local/lib/python2.7/site-packages/catkin_tools/execution/executor.py\", line 109, in async_job\r\n    **stage.async_execute_process_kwargs))\r\n  File \"/usr/local/lib/python2.7/site-packages/trollius/tasks.py\", line 259, in _step\r\n    result = coro.send(value)\r\n  File \"/usr/local/lib/python2.7/site-packages/osrf_pycommon/process_utils/async_execute_process_trollius.py\", line 69, in _async_execute_process_pty\r\n    stderr_master, stderr_slave = pty.openpty()\r\n  File \"/usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py\", line 29, in openpty\r\n    master_fd, slave_name = _open_terminal()\r\n  File \"/usr/local/Cellar/python/2.7.14_2/Frameworks/Python.framework/Versions/2.7/lib/python2.7/pty.py\", line 70, in _open_terminal\r\n    raise os.error, 'out of pty devices'\r\nOSError: out of pty devices\r\n```\r\n\r\nI would suggest to check whether there is available pty's before opening a new. I will not try and fix it my self as I have no idea what the code does :)\r\n\r\nThe problem might also be that the code is leaking pty's; that the OS is waiting for the code to close them. In the code [line 65](https://github.com/osrf/osrf_pycommon/blob/ad507593063ca0abb18f7961eec9c9244395eab9/osrf_pycommon/process_utils/async_execute_process_trollius.py#L65) to 69 I can see that `stdout_master` and `stderr_master` is opened but never closed. I guess that is because they would close upon termination of the process, but the process might be hanging?"},"comment":{"url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/comments/370421048","html_url":"https://github.com/osrf/osrf_pycommon/issues/46#issuecomment-370421048","issue_url":"https://api.github.com/repos/osrf/osrf_pycommon/issues/46","id":370421048,"user":{"login":"jonfink","id":131946,"avatar_url":"https://avatars3.githubusercontent.com/u/131946?v=4","gravatar_id":"","url":"https://api.github.com/users/jonfink","html_url":"https://github.com/jonfink","followers_url":"https://api.github.com/users/jonfink/followers","following_url":"https://api.github.com/users/jonfink/following{/other_user}","gists_url":"https://api.github.com/users/jonfink/gists{/gist_id}","starred_url":"https://api.github.com/users/jonfink/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jonfink/subscriptions","organizations_url":"https://api.github.com/users/jonfink/orgs","repos_url":"https://api.github.com/users/jonfink/repos","events_url":"https://api.github.com/users/jonfink/events{/privacy}","received_events_url":"https://api.github.com/users/jonfink/received_events","type":"User","site_admin":false},"created_at":"2018-03-05T13:37:36Z","updated_at":"2018-03-05T13:37:36Z","author_association":"NONE","body":"Quick note to confirm I'm also seeing this issue now... \r\n\r\n* OSX High Sierria (10.13.3)\r\n* Homebrew python 3.6.3\r\n* catkin_tools (0.4.4)\r\n* catkin (0.7.6) (did just realize there are newer versions of this, will try one later today)"}}
{"actor":{"display_login":"jonfink"}}