-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
bpo-34521: Fix tests in test_multiprocessing_spawn to use correctly CMSG_SPACE #9613
Conversation
…MSG_SPACE After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots regarding tests in test_multiprocessing_spawn and after examining similar failures in test_socket, some errors in the calculation of ancillary data buffers were found in multiprocessing.reduction. CMSG_LEN() can often be used as the buffer size for recvmsg() to receive a single item of ancillary data, but RFC 3542 requires portable applications to use CMSG_SPACE() and thus include space for padding, even when the item will be the last in the buffer. The failures we experience are due to the usage of CMSG_LEN instead of CMSG_SPACE.
Tested on the buildbot itself: CURRENT-amd64% uname -a
FreeBSD CURRENT-amd64 12.0-ALPHA6 FreeBSD 12.0-ALPHA6 r338678 amd64
CURRENT-amd64% ./python -m test test_multiprocessing_spawn
Run tests sequentially
0:00:00 load avg: 0.17 [1/1] test_multiprocessing_spawn
test_multiprocessing_spawn passed in 3 min 24 sec
== Tests result: SUCCESS ==
1 test OK.
Total duration: 3 min 24 sec
Tests result: SUCCESS |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Good job, I didn't know that there were two functions for the length!
cc @pitrou
I will wait for the FreeBSD CURRENT buildbot to see if it fixes the issue. If yes, we can backport the change. |
Thanks @pablogsal for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.6. |
Thanks @pablogsal for the PR, and @vstinner for merging it 🌮🎉.. I'm working now to backport this PR to: 3.7. |
…MSG_SPACE (pythonGH-9613) After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots regarding tests in test_multiprocessing_spawn and after examining similar failures in test_socket, some errors in the calculation of ancillary data buffers were found in multiprocessing.reduction. CMSG_LEN() can often be used as the buffer size for recvmsg() to receive a single item of ancillary data, but RFC 3542 requires portable applications to use CMSG_SPACE() and thus include space for padding, even when the item will be the last in the buffer. The failures we experience are due to the usage of CMSG_LEN() instead of CMSG_SPACE(). (cherry picked from commit 077061a) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
GH-9618 is a backport of this pull request to the 3.6 branch. |
GH-9619 is a backport of this pull request to the 3.7 branch. |
…MSG_SPACE (pythonGH-9613) After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots regarding tests in test_multiprocessing_spawn and after examining similar failures in test_socket, some errors in the calculation of ancillary data buffers were found in multiprocessing.reduction. CMSG_LEN() can often be used as the buffer size for recvmsg() to receive a single item of ancillary data, but RFC 3542 requires portable applications to use CMSG_SPACE() and thus include space for padding, even when the item will be the last in the buffer. The failures we experience are due to the usage of CMSG_LEN() instead of CMSG_SPACE(). (cherry picked from commit 077061a) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
…MSG_SPACE (GH-9613) After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots regarding tests in test_multiprocessing_spawn and after examining similar failures in test_socket, some errors in the calculation of ancillary data buffers were found in multiprocessing.reduction. CMSG_LEN() can often be used as the buffer size for recvmsg() to receive a single item of ancillary data, but RFC 3542 requires portable applications to use CMSG_SPACE() and thus include space for padding, even when the item will be the last in the buffer. The failures we experience are due to the usage of CMSG_LEN() instead of CMSG_SPACE(). (cherry picked from commit 077061a) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
…MSG_SPACE (GH-9613) (GH-9619) After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots regarding tests in test_multiprocessing_spawn and after examining similar failures in test_socket, some errors in the calculation of ancillary data buffers were found in multiprocessing.reduction. CMSG_LEN() can often be used as the buffer size for recvmsg() to receive a single item of ancillary data, but RFC 3542 requires portable applications to use CMSG_SPACE() and thus include space for padding, even when the item will be the last in the buffer. The failures we experience are due to the usage of CMSG_LEN() instead of CMSG_SPACE(). (cherry picked from commit 077061a) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Add News entry for the change in multiprocessing.reduction.recvfds made in pythonGH-9613. (cherry picked from commit bd036d3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Add News entry for the change in multiprocessing.reduction.recvfds made in pythonGH-9613. (cherry picked from commit bd036d3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Add News entry for the change in multiprocessing.reduction.recvfds made in pythonGH-9613. (cherry picked from commit bd036d3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
* Add News entry for the change in multiprocessing.reduction.recvfds made in pythonGH-9613. (cherry picked from commit bd036d3) Co-authored-by: Pablo Galindo <Pablogsal@gmail.com>
After some failures in AMD64 FreeBSD CURRENT Debug 3.x buildbots
regarding tests in test_multiprocessing_spawn and after examining
similar failures in test_socket, some errors in the calculation of
ancillary data buffers were found in multiprocessing.reduction.
CMSG_LEN() can often be used as the buffer size for recvmsg() to
receive a single item of ancillary data, but RFC 3542 requires portable
applications to use CMSG_SPACE() and thus include space for padding,
even when the item will be the last in the buffer.
The failures we experience are due to the usage of CMSG_LEN instead of
CMSG_SPACE.
https://bugs.python.org/issue34521