Skip to content

cwltool crashes when run by more than one person on the same host #789

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

Open
drjrm3 opened this issue Jun 13, 2018 · 1 comment
Open

cwltool crashes when run by more than one person on the same host #789

drjrm3 opened this issue Jun 13, 2018 · 1 comment

Comments

@drjrm3
Copy link

drjrm3 commented Jun 13, 2018

Expected Behavior

cwltool should run when more than one person on a host have used it.

Actual Behavior

Instead of running it crashes with

[jmichael(BASH)@c-head001]: cwltool
Traceback (most recent call last):
  File "/hpcf/apps/python/install/3.5.2a/bin/cwltool", line 7, in <module>
    from cwltool.main import main
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/cwltool/main.py", line 18, in <module>
    import schema_salad.validate as validate
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/schema_salad/__init__.py", line 38, in <module>
    import avro
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/past/translation/__init__.py", line 396, in load_module
    if detect_python2(source, self.pathname):
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/past/translation/__init__.py", line 222, in detect_python2
    with open('/tmp/original_code.py', 'w') as f:
PermissionError: [Errno 13] Permission denied: '/tmp/original_code.py'
[jmichael(BASH)@c-head001]: 

Workflow Code

N/A. Not even a help message shows.

Full Traceback

[jmichael(BASH)@c-head001]: cwltool
Traceback (most recent call last):
  File "/hpcf/apps/python/install/3.5.2a/bin/cwltool", line 7, in <module>
    from cwltool.main import main
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/cwltool/main.py", line 18, in <module>
    import schema_salad.validate as validate
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/schema_salad/__init__.py", line 38, in <module>
    import avro
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/past/translation/__init__.py", line 396, in load_module
    if detect_python2(source, self.pathname):
  File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/past/translation/__init__.py", line 222, in detect_python2
    with open('/tmp/original_code.py', 'w') as f:
PermissionError: [Errno 13] Permission denied: '/tmp/original_code.py'
[jmichael(BASH)@c-head001]: 

Your Environment

  • cwltool version:
    version is unable to print.

Notes:

This is related to #499. The issue is in https://github.com/PythonCharmers/python-future/blob/master/src/past/translation/__init__.py where hardcoding of /tmp/original_code.py forces multiple users to attempt to overwrite the same file on multi-tenant servers.

@mr-c
Copy link
Member

mr-c commented Jun 13, 2018

Thank you @drjrm3
Looks like it is time to fork python-future and apply PythonCharmers/python-future#335

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

No branches or pull requests

2 participants