-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Race condition #5359
Race condition #5359
Conversation
Fixed race condition, see: eclipse-ee4j#5358
@dtbaum Can you please elaborate on how the race condition happens? |
@jansupol The race condition occurs when multiple independent Jersey client instances, running in parallel threads, make a GET request. When the first GET request is in progress, all parallel requests from other Jersey clients (other client instances, but same SSLContext and same target), in other threads, fail with SSLHandshakeException: PKIX path building failed. If you get any issues getting the example to run, please let me know. I would add it as a broken JUnit test on this jersey branch. |
@jansupol: Did you succeed in reproducing the problem? |
Thank you for the reproducer @dtbaum. The fix breaks |
Related #4815 This bug has a long history. Basically, there is a bug in JDK that we try to workaround, but there seem to be multiple requirements that go against each other. |
@jansupol: As much as I understand (which isn't much :-) ) a deep, reliable equality check, like working .equals() instead of object reference equality, would help, without violating other requirements? |
…cketFactory is created in jersey client. The same issue is opened: eclipse-ee4j/jersey#5359 . patching the HttpUrlConnector may help the problem. Modifying the build only in integration test to use this patch
@jansupol: I think, I have a fix for the race condition, without violating #4757/#4566. |
### What changes were proposed in this pull request? This pr aims upgrade Jersey from 2.40 to 2.41. ### Why are the changes needed? The new version bring some improvements, like: - eclipse-ee4j/jersey#5350 - eclipse-ee4j/jersey#5365 - eclipse-ee4j/jersey#5436 - eclipse-ee4j/jersey#5296 and some bug fix, like: - eclipse-ee4j/jersey#5359 - eclipse-ee4j/jersey#5405 - eclipse-ee4j/jersey#5423 - eclipse-ee4j/jersey#5435 - eclipse-ee4j/jersey#5445 The full release notes as follows: - https://github.com/eclipse-ee4j/jersey/releases/tag/2.41 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass GitHub Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #43490 from LuciferYang/SPARK-45636. Lead-authored-by: YangJie <yangjie01@baidu.com> Co-authored-by: yangjie01 <yangjie01@baidu.com> Signed-off-by: Sean Owen <srowen@gmail.com>
@senivam @jansupol @dtbaum Please note that this change has been having a drastic impact on performance, in particular when using Jersey client for multiple services: Only one connection can be created at a time, across all routes. If the intention had been to just synchronize |
Fixed race condition, see:
#5358