FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

test: PyPy fixes by tiran · Pull Request #543 · python-ldap/python-ldap · GitHub

test: PyPy fixes - #543

Closed
tiran wants to merge 1 commit into
python-ldap:mainfrom
tiran:pypy-fix
Closed

test: PyPy fixes#543
tiran wants to merge 1 commit into
python-ldap:mainfrom
tiran:pypy-fix

Conversation

tiran commented Oct 30, 2023

Copy link
Copy Markdown
Member

On PyPy 3.9 sock.close() sometimes fails with Bad file descriptor, because the fd is already closed. Silence the exception. The problem is not a bug in python-ldap.

Really use PyPy 3.9 in tox.ini.

On PyPy 3.9 `sock.close()` sometimes fails with `Bad file descriptor`,
because the fd is already closed. Silence the exception. The problem is
not a bug in python-ldap.

Really use PyPy 3.9 in `tox.ini`.

Signed-off-by: Christian Heimes <cheimes@redhat.com>

Copy link
Copy Markdown
Contributor

-1 on this: we should really figure out why the socket was closed already to an authoritative reason.

Being opportunistic and then masking the error risks hiding hard to diagnose high severity bugs which we've had a hard time with using heimdal etc. in the past (a library closes its file descriptor, the fd # is reused by independent code and the library closes that one too).

tiran commented Oct 30, 2023

Copy link
Copy Markdown
Member Author

Be my guest and good luck figuring it out... The problem only occurs with PyPy 3.9 on GitHub Actions and only every few test runs. It's rather random. I have not been able to reproduce the issue locally either.

In the mean time, I can work around the issue by restarting the failed test manually.

Copy link
Copy Markdown
Contributor

Ok, I've had a try and can reproduce this quite reliably (even with --jit off, I think). Indeed close() is called several times on the same fd in Test03_SimpleLDAPObjectWithFileno, however trying to debug this in gdb, I cannot see who is calling the close() in each instance. Unlike with CPython I can't seem to be able to extract the python stack at the time of that call. Have you had any success/do you have hints on how that could be achieved?

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants


Back | FazBrowse Home | New Git URL