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

test mode (satpy_launcher -m) fails instantly with ValueError when a plugin with a timeout is used. #144

Open
gerritholl opened this issue Mar 21, 2022 · 0 comments

Comments

@gerritholl
Copy link
Member

Describe the bug

Running satpy_launcher -m ... fails instantly with ValueError

To Reproduce

satpy_launcher.py -m /tmp/test-message /opt/pytroll/pytroll_inst/config/trollflow2-viirs-direkt.yaml

The configuration files has timeouts configured. It seems attempting to set the timeout is triggering the failure.

Expected behavior

I expect trollflow2 to process the message in the test file as it would if this message were received with posttroll in normal operating mode.

Actual results

[WARNING: 2022-03-21 16:29:35 : satpy_launcher] Launching Satpy-based runner.
[INFO: 2022-03-21 16:29:35 : trollflow2.launcher] Launching trollflow2 with threads
[DEBUG: 2022-03-21 16:29:35 : trollflow2.launcher] Distributed processing not configured, using default scheduler
[ERROR: 2022-03-21 16:29:35 : trollflow2.launcher] Process crashed
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/site-packages/trollflow2/launcher.py", line 370, in process
    signal.signal(signal.SIGALRM, _timeout_handler)
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter
[DEBUG: 2022-03-21 16:29:35 : trollflow2.launcher] Cleaning up
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/threading.py", line 973, in _bootstrap_inner
    self.run()
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/threading.py", line 910, in run
    self._target(*self._args, **self._kwargs)
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/site-packages/trollflow2/launcher.py", line 370, in process
    signal.signal(signal.SIGALRM, _timeout_handler)
  File "/opt/pytroll/pytroll_inst/mambaforge/envs/py39/lib/python3.9/signal.py", line 47, in signal
    handler = _signal.signal(_enum_to_int(signalnum), _enum_to_int(handler))
ValueError: signal only works in main thread of the main interpreter
[INFO: 2022-03-21 16:29:35 : trollflow2.launcher] All 0 files produced nominally in 0:00:00.145675

Environment Info:

  • Trollflow2 Version: 0.13.5.dev8+gde82238
  • Satpy Version: 0.35.1.dev14+gc5ea104c
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

1 participant