Uh oh!
There was an error while loading. Please reload this page.
gh-80931: Skip some socket tests while hunting for refleaks on macOS - #114057
Conversation
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
ronaldoussoren
commented
Jan 14, 2024
@vstinner, what's your opinion on this approach?
It might be better to move the |
| except ImportError: | ||
| _socket = None | ||
| def skipForRefleakHuntinIf(condition, issueref): |
There was a problem hiding this comment.
Maybe it's make sense to store it in test.support.refleak_helper (as you said above)? It's can be useful in future in other situations like this
ncoghlan
commented
Jan 21, 2024
I thought I had spotted a potential real FD leak in the "sendAncillaryIfPossible" helper method: cpython/Lib/test/test_socket.py Line 3762 in 8907efc If the message sending fails (or the ancillary data otherwise isn't passed correctly), the included FDs are never passed to SCMRightsTest.registerRecvmsgResult and hence never scheduled for cleanup. However, any FDs allocated by the Is it possible we're provoking a false alarm in the fd leak hunting somehow? |
ronaldoussoren
commented
Jan 21, 2024
Not impossible, but unlikely given that this only is a problem on macOS in a particular scenario. I'll work on a reproducer in C for the issue, that would rule out problems in our code and is needed to file a bug with Apple about this. |
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.11. |
Thanks @ronaldoussoren for the PR 🌮🎉.. I'm working now to backport this PR to: 3.12. |
…macOS (pythonGH-114057) Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems. (cherry picked from commit 5adff3f) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
…macOS (pythonGH-114057) Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems. (cherry picked from commit 5adff3f) Co-authored-by: Ronald Oussoren <ronaldoussoren@mac.com>
GH-114380 is a backport of this pull request to the 3.11 branch. |
GH-114381 is a backport of this pull request to the 3.12 branch. |
…macOS (python#114057) Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems.
…macOS (python#114057) Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems.
ambv
commented
Feb 21, 2024
I don't think this should be backported? |
ronaldoussoren
commented
Feb 22, 2024
TBH I haven't checked if the issue is actually present in 3.11 and 3.12. I'd expect that the issue is present there as well unless the problematic tests are only present on main. I'll check during the weekend. |
…macOS (python#114057) Some socket tests related to sending file descriptors cause a file descriptor leak on macOS, all of them tests that send one or more descriptors than cannot be received on the read end. This appears to be a platform bug. This PR skips those tests when doing a refleak test run to avoid hiding other problems.
Uh oh!
There was an error while loading. Please reload this page.