Skip to content
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

DefaultDnsResolver in Nima can throw exception #6206

Closed
spericas opened this issue Feb 15, 2023 · 0 comments
Closed

DefaultDnsResolver in Nima can throw exception #6206

spericas opened this issue Feb 15, 2023 · 0 comments
Assignees
Labels
bug Something isn't working webclient
Milestone

Comments

@spericas
Copy link
Member

The DefaultDnsResolver used by WebClient is not thread safe and can throw ConcurrentModificationException when a WebClient is used by multiple threads. Needs to use a ConcurrentHashMap.

Caused by: java.util.ConcurrentModificationException
        at java.base/java.util.HashMap.computeIfAbsent(HashMap.java:1229)
        at io.helidon.nima.webclient.DefaultDnsResolver.resolveAddress(DefaultDnsResolver.java:32)
        at io.helidon.nima.webclient.http1.Http1ClientConnection.connect(Http1ClientConnection.java:118)
        at io.helidon.nima.webclient.http1.ClientRequestImpl.getConnection(ClientRequestImpl.java:347)
        at io.helidon.nima.webclient.http1.ClientRequestImpl.submit(ClientRequestImpl.java:158)
        at io.helidon.nima.webclient.http1.ClientRequestImpl.request(ClientRequestImpl.java:145)
        at io.helidon.nima.webclient.http1.ClientRequestImpl.request(ClientRequestImpl.java:58)
        at io.helidon.nima.webclient.ClientRequest.request(ClientRequest.java:135)
        at io.examples.helidon.nima.BlockingService.callRemote(BlockingService.java:109)
        at io.examples.helidon.nima.BlockingService.lambda$parallel$0(BlockingService.java:78)
        at java.base/java.util.concurrent.ThreadPerTaskExecutor$ThreadBoundFuture.run(ThreadPerTaskExecutor.java:352)
        ... 4 more
@spericas spericas self-assigned this Feb 15, 2023
@spericas spericas added webclient bug Something isn't working labels Feb 15, 2023
@spericas spericas added this to the 4.0.0 milestone Feb 15, 2023
@barchetta barchetta modified the milestones: 4.0.0, 4.0.0-ALPHA5 Feb 15, 2023
@m0mus m0mus added this to Backlog Aug 12, 2024
@m0mus m0mus moved this to Closed in Backlog Aug 12, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working webclient
Projects
Archived in project
Development

No branches or pull requests

2 participants