Skip to content

Add retry on EINTR. #291

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

Closed
wants to merge 1 commit into from
Closed

Add retry on EINTR. #291

wants to merge 1 commit into from

Conversation

rgbyrnes
Copy link

Fixes #242.

@codecov
Copy link

codecov bot commented May 24, 2019

Codecov Report

Merging #291 into master will increase coverage by 0.06%.
The diff coverage is 100%.

@@            Coverage Diff            @@
##           master    #291      +/-   ##
=========================================
+ Coverage   71.04%   71.1%   +0.06%     
=========================================
  Files          49      49              
  Lines        4817    4828      +11     
  Branches      812     813       +1     
=========================================
+ Hits         3422    3433      +11     
+ Misses       1061    1060       -1     
- Partials      334     335       +1
Impacted Files Coverage Δ
Lib/ldap/ldapobject.py 76.89% <100%> (+0.5%) ⬆️
Lib/ldap/controls/deref.py 57.14% <0%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 44a593d...ab2097e. Read the comment docs.

@dmulder
Copy link
Contributor

dmulder commented Jun 17, 2019

FYI, I was getting this error:
ldap.SERVER_DOWN: {'desc': "Can't contact LDAP server", 'errno': 4, 'info': 'Interrupted system call'}
I think my server really is unreachable, and applying this patch now causes an infinite loop in my code.
So the while True probably should give up at some point.

@rgbyrnes
Copy link
Author

I'm surprised that you're seeing consistent, repeated errno == EINTR with ldap.SERVER_DOWN ... why would that happen? We've been running with this patch for > 9 months and have never seen that.

I suppose it couldn't hurt to terminate the loop after some finite number of retries, but that sorta feels like it's covering up some other issue. If you can reproduce the behavior, it would be interesting to strace. Are you using OpenLDAP?

@encukou
Copy link
Member

encukou commented Sep 20, 2019

@dmulder Which server are you using?

@encukou
Copy link
Member

encukou commented Jan 29, 2020

No response :(
@rgbyrnes, would you mind terminating the loop? An exception is better than infinite loop – especially since this code has no tests.

@encukou
Copy link
Member

encukou commented May 27, 2020

Still no response :(
Please re-open this if you have any additional information.

@encukou encukou closed this May 27, 2020
@mit-da mit-da mentioned this pull request Jun 14, 2023
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.

Retry on EINTR
3 participants