common-workflow-language / common-workflow-language/cwltool
cwltool crashes when run by more than one person on the same host
- Dominant language
- Python
- Stars
- 376
- Forks
- 255
- Avg merge
- 2d 7h
- Merged PRs (30d)
- 12
Description
## 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
from cwltool.main import main
File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/cwltool/main.py", line 18, in
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
import avro
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 664, in _load_unlocked
File "", 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
from cwltool.main import main
File "/hpcf/apps/python/install/3.5.2a/lib/python3.5/site-packages/cwltool/main.py", line 18, in
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
import avro
File "", line 969, in _find_and_load
File "", line 958, in _find_and_load_unlocked
File "", line 664, in _load_unlocked
File "", 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 https://github.com/common-workflow-language/cwltool/issues/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.
Contributor guide
Assessment
This issue has not been assessed yet.