shunping opened a new pull request, #38455:
URL: https://github.com/apache/beam/pull/38455

   Avoids ValueError during atexit shutdown when a cached subprocess server was 
already cleaned up earlier. Right now, such exception is already ignored 
because it happens at atexit.
   
   Example traceback 
(https://github.com/apache/beam/actions/runs/25705764624/job/75475412939):
   ```
   Exception ignored in atexit callback: <bound method StopOnExitJobServer.stop 
of <apache_beam.runners.portability.job_server.StopOnExitJobServer object at 
0x7f60831f4da0>>
   Traceback (most recent call last):
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/runners/portability/job_server.py",
 line 98, in stop
       self._job_server.stop()
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/runners/portability/job_server.py",
 line 132, in stop
       return self._server.stop()
              ^^^^^^^^^^^^^^^^^^^
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 254, in stop
       self.stop_process()
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 259, in stop_process
       self._cache.purge(self._owner_id)
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 94, in purge
       raise ValueError(f"{owner} not in {self._live_owners}")
   ValueError: 267 not in set()
   Exception ignored in atexit callback: <bound method StopOnExitJobServer.stop 
of <apache_beam.runners.portability.job_server.StopOnExitJobServer object at 
0x7f603aeb8ef0>>
   Traceback (most recent call last):
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/runners/portability/job_server.py",
 line 98, in stop
       self._job_server.stop()
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/runners/portability/job_server.py",
 line 132, in stop
       return self._server.stop()
              ^^^^^^^^^^^^^^^^^^^
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 254, in stop
       self.stop_process()
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 259, in stop_process
       self._cache.purge(self._owner_id)
     File 
"/runner/_work/beam/beam/sdks/python/test-suites/tox/py312/build/srcs/sdks/python/target/.tox-py312/py312/lib/python3.12/site-packages/apache_beam/utils/subprocess_server.py",
 line 94, in purge
       raise ValueError(f"{owner} not in {self._live_owners}")
   ValueError: 2 not in set()
   ```
   


-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to