classification
Title: multiprocessing.connection.Listener fails to close with null byte in AF_UNIX socket name.
Type: behavior Stage: resolved
Components: Library (Lib) Versions: Python 3.9, Python 3.8, Python 3.7
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: Nosy List: nmichaels, pablogsal, pitrou
Priority: normal Keywords: patch

Created on 2020-03-04 16:12 by nmichaels, last changed 2020-03-09 14:48 by pablogsal. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 18866 merged pablogsal, 2020-03-09 01:45
PR 18876 merged pablogsal, 2020-03-09 13:51
PR 18877 merged pablogsal, 2020-03-09 13:57
Messages (4)
msg363357 - (view) Author: Nathan Michaels (nmichaels) Date: 2020-03-04 16:16
>>> from multiprocessing.connection import Listener
>>> listener = Listener('\0conntest', family='AF_UNIX')
>>> listener.close()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python3.6/multiprocessing/connection.py", line 466, in close
    listener.close()
  File "/usr/lib64/python3.6/multiprocessing/connection.py", line 604, in close
    unlink()
  File "/usr/lib64/python3.6/multiprocessing/util.py", line 186, in __call__
    res = self._callback(*self._args, **self._kwargs)
ValueError: embedded null byte

Linux has a handy feature where if the first byte of a unix domain socket's name is the null character, it won't put it in the filesystem. The socket interface works fine with it, but when SocketListener is wrapped around a socket, it throws this exception.
msg363730 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-03-09 13:48
New changeset 6012f30beff7fa8396718dfb198ccafc333c565b by Pablo Galindo in branch 'master':
bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866)
https://github.com/python/cpython/commit/6012f30beff7fa8396718dfb198ccafc333c565b
msg363737 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-03-09 14:47
New changeset 2235e04170503673471d5ec2e7c693cdadcbdc65 by Pablo Galindo in branch '3.7':
[3.7] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18877)
https://github.com/python/cpython/commit/2235e04170503673471d5ec2e7c693cdadcbdc65
msg363738 - (view) Author: Pablo Galindo Salgado (pablogsal) * (Python committer) Date: 2020-03-09 14:48
New changeset 3ede1bc794a575a73c6cc74addb5586f4e33a1f5 by Pablo Galindo in branch '3.8':
[3.8] bpo-39850: Add support for abstract sockets in multiprocessing (GH-18866) (GH-18876)
https://github.com/python/cpython/commit/3ede1bc794a575a73c6cc74addb5586f4e33a1f5
History
Date User Action Args
2020-03-09 14:48:23pablogsalsetstatus: open -> closed
resolution: fixed
stage: patch review -> resolved
2020-03-09 14:48:07pablogsalsetmessages: + msg363738
2020-03-09 14:47:55pablogsalsetmessages: + msg363737
2020-03-09 13:57:09pablogsalsetpull_requests: + pull_request18235
2020-03-09 13:51:20pablogsalsetpull_requests: + pull_request18234
2020-03-09 13:48:06pablogsalsetmessages: + msg363730
2020-03-09 01:45:25pablogsalsetkeywords: + patch
nosy: + pablogsal

pull_requests: + pull_request18224
stage: needs patch -> patch review
2020-03-08 12:30:07pitrousetnosy: + pitrou
2020-03-08 12:28:57pitrousetstage: needs patch
type: crash -> behavior
versions: + Python 3.7, Python 3.8, Python 3.9, - Python 3.6
2020-03-04 16:16:13nmichaelssetmessages: + msg363357
2020-03-04 16:12:51nmichaelscreate