[New-bugs-announce] [issue36368] server process of shared_memory shuts down if KeyboardInterrupt

Pierre Glaser report at bugs.python.org
Tue Mar 19 12:38:01 EDT 2019


New submission from Pierre Glaser <pierreglaser at msn.com>:

When starting a SharedMemoryManager in an interactive session, any KeyboardInterrupt event will be transmitted to the (sub)process running the shared memory server, which causes the Manager to be unusable thereafter:

>>> from multiprocessing.managers import SharedMemoryManager
>>> smm = SharedMemoryManager()
>>> smm.start()
>>> start typing something wrong
KeyboardInterrupt
>>> sl = smm.ShareableList(range(10))
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/managers.py", line 1342, in ShareableList
    with self._Client(self._address, authkey=self._authkey) as conn:
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/connection.py", line 502, in Client
    c = SocketClient(address)
  File "/home/pierreglaser/repos/cpython/Lib/multiprocessing/connection.py", line 629, in SocketClient
    s.connect(address)
FileNotFoundError: [Errno 2] No such file or directory


I suggest ignoring SIGINT in the server process.

----------
files: 0001-FIX-protect-shared_memory-server-from-SIGINT.patch
keywords: patch
messages: 338380
nosy: davin, pierreglaser, pitrou
priority: normal
severity: normal
status: open
title: server process of shared_memory shuts down if KeyboardInterrupt
type: crash
versions: Python 3.8
Added file: https://bugs.python.org/file48222/0001-FIX-protect-shared_memory-server-from-SIGINT.patch

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue36368>
_______________________________________


More information about the New-bugs-announce mailing list