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

test: DNS for bare domain fails with fritz.box search domain #9799

Closed
bnoordhuis opened this issue Nov 25, 2016 · 4 comments
Closed

test: DNS for bare domain fails with fritz.box search domain #9799

bnoordhuis opened this issue Nov 25, 2016 · 4 comments
Labels
dns Issues and PRs related to the dns subsystem. good first issue Issues that are suitable for first-time contributors. test Issues and PRs related to the tests.

Comments

@bnoordhuis
Copy link
Member

  • Version: master
  • Platform: Linux localhost.localdomain 4.8.8-300.fc25.x86_64 deps: update openssl to 1.0.1j #1 SMP Tue Nov 15 18:10:06 UTC 2016 x86_64 x86_64 x86_64 GNU/Linux
  • Subsystem: dns

Discovered while on a LAN with a fritz.box search domain.

$ sudo sh -c 'echo "search fritz.box" >> /etc/resolv.conf'

$ out/Release/node test/parallel/test-net-better-error-messages-port-hostname.js
assert.js:85
  throw new assert.AssertionError({
  ^
AssertionError: 'Unknown system error -74' == 'ENOTFOUND'
    at Socket.<anonymous> (/home/bnoordhuis/src/v1.x/test/parallel/test-net-better-error-messages-port-hostname.js:11:10)
    at Socket.<anonymous> (/home/bnoordhuis/src/v1.x/test/common.js:422:15)
    at emitOne (events.js:96:13)
    at Socket.emit (events.js:188:7)
    at connectErrorNT (net.js:1025:8)
    at _combinedTickCallback (internal/process/next_tick.js:74:11)
    at process._tickCallback (internal/process/next_tick.js:98:9)

$ strace -s 512 -fe socket,connect,recvfrom,sendmmsg out/Release/node test/parallel/test-net-better-error-messages-port-hostname.js
[...]
[pid 25161] socket(PF_INET, SOCK_DGRAM|SOCK_NONBLOCK, IPPROTO_IP) = 12
[pid 25161] connect(12, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, 16) = 0
[pid 25161] sendmmsg(12, {{{msg_name(0)=NULL, msg_iov(1)=[{"\3102\1\0\0\1\0\0\0\0\0\0\3***\5fritz\3box\0\0\1\0\1", 31}], msg_controllen=0, msg_flags=MSG_DONTWAIT|MSG_EOR|MSG_SYN|MSG_RST|MSG_CMSG_CLOEXEC|0x1ed80010}, 31}, {{msg_name(0)=NULL, msg_iov(1)=[{"\322 \1\0\0\1\0\0\0\0\0\0\3***\5fritz\3box\0\0\34\0\1", 31}], msg_controllen=0, msg_flags=MSG_OOB|MSG_PEEK|MSG_CTRUNC|MSG_WAITALL|MSG_FIN|MSG_SYN|MSG_CONFIRM|MSG_WAITFORONE|MSG_FASTOPEN|0x85b40000}, 31}}, 2, MSG_NOSIGNAL) = 2
[pid 25161] recvfrom(12, "\3102\201\200\0\1\0\1\0\0\0\0\3***\5fritz\3box\0\0\1\0\1\300\f\0\1\0\1\0\0\t\262\0\4\177\00055", 2048, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, [16]) = 47
[pid 25161] recvfrom(12, "\322 \201\200\0\1\0\0\0\1\0\0\3***\5fritz\3box\0\0\34\0\1\300\26\0\6\0\1\0\0\3\203\0005\1a\3nic\300\26\7support\variservices\3com\0X\37\325\341\0\0\7\10\0\0\1,\0\33\257\200\0\0\7\10", 65536, 0, {sa_family=AF_INET, sin_port=htons(53), sin_addr=inet_addr("8.8.8.8")}, [16]) = 96

Error -74 is EBADMSG. Changing the search domain to something more benign (e.g. domain.local) makes the test pass again. There are more tests with the same issue.

Tests in test/parallel and test/sequential should not need internet access so perhaps it's best to move affected tests to test/internet but that isn't run regularly. Either that or they should be modified to not make actual DNS queries.

@bnoordhuis bnoordhuis added dns Issues and PRs related to the dns subsystem. good first issue Issues that are suitable for first-time contributors. test Issues and PRs related to the tests. labels Nov 25, 2016
@thelostone-mc
Copy link
Contributor

@bnoordhuis / @thefourtheye Is this still a valid use case ?
I was able to run the tests in parallel, sequential without an active internet connection ?

@bnoordhuis
Copy link
Member Author

@adityaanandmc I think this is still relevant. It's not so much about no internet connection as it is about the search domain making non-internet tests fail.

@Marsup
Copy link
Contributor

Marsup commented Nov 6, 2017

I'm not really sure but I think #14781 fixed it, or at least I can't make it fail with your instructions anymore. Would you say it is fixed ?

@bnoordhuis
Copy link
Member Author

@Marsup Yes, looks like it. Thanks, I'll close this out.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dns Issues and PRs related to the dns subsystem. good first issue Issues that are suitable for first-time contributors. test Issues and PRs related to the tests.
Projects
None yet
Development

No branches or pull requests

3 participants