You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2022/06/04 21:01:59 UTC
[GitHub] [beam] damccorm opened a new issue, #21069: subprocess_server.stop_process fails on Windows
damccorm opened a new issue, #21069:
URL: https://github.com/apache/beam/issues/21069
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)
```
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
```
Imported from Jira [BEAM-12501](https://issues.apache.org/jira/browse/BEAM-12501). Original Jira may contain additional context.
Reported by: bhulette.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [beam] Abhik79 commented on issue #21069: subprocess_server.stop_process fails on Windows
Posted by "Abhik79 (via GitHub)" <gi...@apache.org>.
Abhik79 commented on issue #21069:
URL: https://github.com/apache/beam/issues/21069#issuecomment-1704032170
I am still facing the same issue in Windows PC. PFB the screenshot.
![image](https://github.com/apache/beam/assets/42279338/389fbc81-e7e3-4d54-8ddf-8748ba49f58b)
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@beam.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org