-
Notifications
You must be signed in to change notification settings - Fork 34
Fixed asynchronous hanging w/truncated SPF record #25
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
base: master
Are you sure you want to change the base?
Conversation
|
Thanks for the fix. However the tests failure on CI seems related |
|
Don't you just love "works for me" issues! The test passes for me, because the test is leading to the DNS exception in my environment, but perhaps the DNS server being used in Github is performing differently. Here's the stacktrace I get with that test: I've tested both using Google (8.8.8.8) and Cloudflare (1.1.1.1) for the DNS resolvers and see the error locally. Could the DNS resolution in Github be the issue? Do you have a better way to test the use case? |
|
Here's the same test, but manually configured to use Cloudflare's DNS as the resolver: For me this is failing too. Do you want me to update the example to the above to see if that works in Github? |
Always! And DNS caching are a great source of them.
s/Github/ Apache CI?g Yes lets have a try. Thanks a lot! |
|
Ok, I've updated the test. Hopefully the test replicates what I'm seeing locally. |
|
So that change did not make a difference. Any thoughts on why I'm getting the error locally, but Github is not triggering it. Is it possible there's a JVM setting that's affecting the max record lookup that's different than the default 10? |
|
Just wanted to follow up on this. Any thoughts on why I'm getting the error locally, but Github is not triggering it. Is it possible there's a JVM setting that's affecting the max record lookup that's different than the default 10? |
|
Hello I'm pretty busy lately, I did not shoot the github notif on purpose so that I remember eventually to take a look at it. Sorry for the delays and best regards... |
|
(Queuing theory: when you are at 99% occupation then latencies skyrockets ^^) |
|
@dswitzer |
|
It's been a few months since I dealt with this, so my memory is a little foggy on the details. I just know that the scenario in the unit test case I provide was running into an infinite loop, because the exception was preventing the continue handler from being triggered, so it would just stall. I believe with this specific DNS record, it was violating the too many DNS lookup policy, but I could be wrong. I know I tried with several different DNS servers in my tests and all had the same problem. Sorry I can't provide more details. |
1 similar comment
|
It's been a few months since I dealt with this, so my memory is a little foggy on the details. I just know that the scenario in the unit test case I provide was running into an infinite loop, because the exception was preventing the continue handler from being triggered, so it would just stall. I believe with this specific DNS record, it was violating the too many DNS lookup policy, but I could be wrong. I know I tried with several different DNS servers in my tests and all had the same problem. Sorry I can't provide more details. |
One more thing... If you were trying to specify other DNS servers with async executor that was not working, the resolver was completely ignored and it was always using the default resolver. It is fixed in this commit: d171bdb. |
This fixes and issue in the
AsynchronousSPFExecutorwhere threads would hang when reading an SPF record that was truncated because there were too many DNS lookups required.This includes a unit test, but I could only figure out a way to implement a test w/a real DNS record, so it could break in the future if the DNS record for the domain gets fixed.
NOTE - I do believe there's a possibility there are other hard DNS exceptions that could cause the same behavior, but since I could only trigger the bug with a live DNS record, could not find a good way to test alternative scenarios.