You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@beam.apache.org by "Beam JIRA Bot (Jira)" <ji...@apache.org> on 2021/07/31 17:22:02 UTC

[jira] [Updated] (BEAM-12501) subprocess_server.stop_process fails on Windows

     [ https://issues.apache.org/jira/browse/BEAM-12501?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Beam JIRA Bot updated BEAM-12501:
---------------------------------
    Labels: stale-assigned  (was: )

> subprocess_server.stop_process fails on Windows
> -----------------------------------------------
>
>                 Key: BEAM-12501
>                 URL: https://issues.apache.org/jira/browse/BEAM-12501
>             Project: Beam
>          Issue Type: Bug
>          Components: cross-language, sdk-py-core
>    Affects Versions: 2.30.0
>            Reporter: Brian Hulette
>            Assignee: Chamikara Madhusanka Jayalath
>            Priority: P2
>              Labels: stale-assigned
>
> subprocess_server's stop_process method uses send_signal(signal.SIGINT) which is not a cross-platform way to terminate a process. We should probably use [terminate or kill|https://github.com/apache/beam/blob/acc0f76a2f3292276ae144f84c4130c504a334a1/sdks/python/apache_beam/transforms/external.py#L294] here instead.
> This is callled when closing the [context|https://github.com/apache/beam/blob/acc0f76a2f3292276ae144f84c4130c504a334a1/sdks/python/apache_beam/transforms/external.py#L294] in ExternalTransform. From [user@ bug report|https://lists.apache.org/thread.html/rd0e83292391e8d214ffca8eedae7d096b7fb463dc17971472c78c463%40%3Cuser.beam.apache.org%3E]
> {code}
> Traceback (most recent call last):
>   File "beam-sql.py", line 18, in <module>
>     |'sql print' >> beam.Map(print)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\pvalue.py", line 142, in __or__
>     return self.pipeline.apply(ptransform, self)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\pipeline.py", line 641, in apply
>     transform.transform, pvalueish, label or transform.label)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\pipeline.py", line 651, in apply
>     return self.apply(transform, pvalueish)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\pipeline.py", line 694, in apply
>     pvalueish_result = self.runner.apply(transform, pvalueish, self._options)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\runners\runner.py", line 188, in apply
>     return m(transform, input, options)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\runners\runner.py", line 218, in apply_PTransform
>     return transform.expand(input)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\transforms\external.py", line 304, in expand
>     pipeline.local_tempdir)
>   File "c:\users\XXX\appdata\local\programs\python\python37\lib\contextlib.py", line 119, in __exit__
>     next(self.gen)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\transforms\external.py", line 351, in _service
>     yield stub
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\transforms\external.py", line 503, in __exit__
>     self._service_provider.__exit__(*args)
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\utils\subprocess_server.py", line 72, in __exit__
>     self.stop()
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\utils\subprocess_server.py", line 131, in stop
>     self.stop_process()
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\utils\subprocess_server.py", line 181, in stop_process
>     return super(JavaJarServer, self).stop_process()
>   File "C:\Users\XXX\Documents\8-Git\apache_beam\venv\lib\site-packages\apache_beam\utils\subprocess_server.py", line 141, in stop_process
>     self._process.send_signal(signal.SIGINT)
>   File "c:\users\XXX\appdata\local\programs\python\python37\lib\subprocess.py", line 1306, in send_signal
>     raise ValueError("Unsupported signal: {}".format(sig))
> ValueError: Unsupported signal: 2
> {code}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)