Skip to content

Allow blocking calls in UnixResolverDnsServerAddressStreamProvider#parse#10935

Merged
normanmaurer merged 2 commits into
netty:4.1from
violetagg:resolver-blocking-call
Jan 14, 2021
Merged

Allow blocking calls in UnixResolverDnsServerAddressStreamProvider#parse#10935
normanmaurer merged 2 commits into
netty:4.1from
violetagg:resolver-blocking-call

Conversation

@violetagg
Copy link
Copy Markdown
Member

Motivation:

Internally UnixResolverDnsServerAddressStreamProvider#parse calls FileInputStream.read(...)
when parsing the etcResolverFiles.
This will cause the error below when BlockHound is enabled

reactor.blockhound.BlockingOperationError: Blocking call! java.io.FileInputStream#readBytes
     	at java.io.FileInputStream.readBytes(FileInputStream.java)
     	at java.io.FileInputStream.read(FileInputStream.java:255)

Modifications:

  • Add whitelist entry to BlockHound configuration
  • Add test

Result:

Fixes #10925

Motivation:

Internally UnixResolverDnsServerAddressStreamProvider#parse calls FileInputStream.read(...)
when parsing the etcResolverFiles.
This will cause the error below when BlockHound is enabled
reactor.blockhound.BlockingOperationError: Blocking call! java.io.FileInputStream#readBytes
     	at java.io.FileInputStream.readBytes(FileInputStream.java)
     	at java.io.FileInputStream.read(FileInputStream.java:255)

Modifications:

- Add whitelist entry to BlockHound configuration
- Add test

Result:

Fixes #10925
@normanmaurer normanmaurer added this to the 4.1.59.Final milestone Jan 14, 2021
@normanmaurer normanmaurer merged commit 5b699b7 into netty:4.1 Jan 14, 2021
@normanmaurer
Copy link
Copy Markdown
Member

@violetagg thanks a lot!

normanmaurer pushed a commit that referenced this pull request Jan 14, 2021
…rse (#10935)

Motivation:

Internally UnixResolverDnsServerAddressStreamProvider#parse calls FileInputStream.read(...)
when parsing the etcResolverFiles.
This will cause the error below when BlockHound is enabled
reactor.blockhound.BlockingOperationError: Blocking call! java.io.FileInputStream#readBytes
     	at java.io.FileInputStream.readBytes(FileInputStream.java)
     	at java.io.FileInputStream.read(FileInputStream.java:255)

Modifications:

- Add whitelist entry to BlockHound configuration
- Add test

Result:

Fixes #10925
ZzxyNn pushed a commit to ZzxyNn/netty that referenced this pull request Jan 29, 2021
…rse (netty#10935)


Motivation:

Internally UnixResolverDnsServerAddressStreamProvider#parse calls FileInputStream.read(...)
when parsing the etcResolverFiles.
This will cause the error below when BlockHound is enabled
reactor.blockhound.BlockingOperationError: Blocking call! java.io.FileInputStream#readBytes
     	at java.io.FileInputStream.readBytes(FileInputStream.java)
     	at java.io.FileInputStream.read(FileInputStream.java:255)

Modifications:

- Add whitelist entry to BlockHound configuration
- Add test

Result:

Fixes netty#10925
@violetagg violetagg deleted the resolver-blocking-call branch February 9, 2021 07:21
raidyue pushed a commit to raidyue/netty that referenced this pull request Jul 8, 2022
…rse (netty#10935)


Motivation:

Internally UnixResolverDnsServerAddressStreamProvider#parse calls FileInputStream.read(...)
when parsing the etcResolverFiles.
This will cause the error below when BlockHound is enabled
reactor.blockhound.BlockingOperationError: Blocking call! java.io.FileInputStream#readBytes
     	at java.io.FileInputStream.readBytes(FileInputStream.java)
     	at java.io.FileInputStream.read(FileInputStream.java:255)

Modifications:

- Add whitelist entry to BlockHound configuration
- Add test

Result:

Fixes netty#10925
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.

Blocking call in UnixResolverDnsServerAddressStreamProvider.parse

2 participants