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

Doesn't work on Windows #2

Open
nascif opened this issue Aug 29, 2017 · 1 comment
Open

Doesn't work on Windows #2

nascif opened this issue Aug 29, 2017 · 1 comment

Comments

@nascif
Copy link

nascif commented Aug 29, 2017

I tried this tool on Windows and got the following stack trace:

Traceback (most recent call last):
File "c:\home\bin\anaconda2\envs\py3\lib\runpy.py", line 184, in run_module_as_main
"main", mod_spec)
File "c:\home\bin\anaconda2\envs\py3\lib\runpy.py", line 85, in run_code
exec(code, run_globals)
File "C:\home\bin\Anaconda2\envs\py3\Scripts\run_lambda.exe_main
.py", line 9, in
File "c:\home\bin\anaconda2\envs\py3\lib\site-packages\run_lambda_main
.py", line 61, in main
timeout_in_seconds=args.timeout)
File "c:\home\bin\anaconda2\envs\py3\lib\site-packages\run_lambda\call.py", line 53, in run_lambda
signal.alarm(0) # disable any pending alarms
AttributeError: module 'signal' has no attribute 'alarm'

Seems to be related to natekupp/ffx#17, which unfortunately was closed without being addressed.

@ethantkoenig
Copy link
Owner

As far as I can see, the multiprocessing library is the only way I can think to support Windows, while retaining timeout functionality. Unfortunately, this has some downsides:

  • Much harder to estimate memory usage of calls
  • Additional overhead of spawning a new process for each call. This could slow down a large suite of unit tests
  • Running the lambda function in a separate process would have some noticeable repercussions (e.g. updates to global variables inside the handler function would have no effect from the parent process's perspective)

That said, I may be missing something. If you have any other suggestions for how to make run_lambda Windows-compatible, I would be happy to hear them.

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