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

Failed to send hostname reply: Invalid argument #11626

Closed
francoism90 opened this issue Feb 1, 2019 · 16 comments · Fixed by #16898
Closed

Failed to send hostname reply: Invalid argument #11626

francoism90 opened this issue Feb 1, 2019 · 16 comments · Fixed by #16898
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer resolve

Comments

@francoism90
Copy link

systemd version the issue has been seen with

240.34

Used distribution

Arch Linux

Expected behaviour you didn't see

Resume network without any issues on system wake-up

Unexpected behaviour you saw

No working networking for a few mins.

feb 01 15:08:32 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:32 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:32 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:32 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:35 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:35 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:35 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:35 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:39 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument
feb 01 15:08:39 desktop systemd-resolved[827]: Failed to send hostname reply: Invalid argument

Steps to reproduce the problem

  • Suspend system
  • Wakeup system
@yuwata yuwata added the resolve label Feb 2, 2019
@poettering
Copy link
Member

hmm, this is weird. This suggests that some client does a DNS query via resolved, and then when resolved tries to respond to that, the sending of the reply fails.

If you turn on debug loggin in resolved, is there anything interesting in that? set SYSTEMD_LOG_LEVEL=debug in systemd-resolved.service via Environment= for that.

@poettering poettering added the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label Feb 4, 2019
@francoism90
Copy link
Author

$ journalctl --since="2019-02-04 17:25:00" --all -u systemd-resolved.service --until "2 min ago"
feb 04 17:35:28 desktop systemd-resolved[17487]: Sent message type=error sender=n/a destination=:1.237 path=n/a interface=n/a member=n/a cookie=174 reply_cookie=2 signature=s err>
feb 04 17:35:28 desktop systemd-resolved[17487]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DB>
feb 04 17:35:28 desktop systemd-resolved[17487]: Freeing transaction 32685.
feb 04 17:35:28 desktop systemd-resolved[17487]: Got message type=method_call sender=:1.238 destination=org.freedesktop.resolve1 path=/org/freedesktop/resolve1 interface=org.free>
feb 04 17:35:28 desktop systemd-resolved[17487]: idn2_lookup_u8: 2.arch.pool.ntp.org → 2.arch.pool.ntp.org
feb 04 17:35:28 desktop systemd-resolved[17487]: Looking up RR for 2.arch.pool.ntp.org IN A.
feb 04 17:35:28 desktop systemd-resolved[17487]: Looking up RR for 2.arch.pool.ntp.org IN AAAA.
feb 04 17:35:28 desktop systemd-resolved[17487]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DB>
feb 04 17:35:28 desktop systemd-resolved[17487]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DB>
feb 04 17:35:28 desktop systemd-resolved[17487]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.185 path=n/a interface=n/a member=n/a cookie=93 reply_c>
feb 04 17:35:28 desktop systemd-resolved[17487]: Cache miss for 2.arch.pool.ntp.org IN A
feb 04 17:35:28 desktop systemd-resolved[17487]: Transaction 22909 for <2.arch.pool.ntp.org IN A> scope dns on enp0s31f6/*.
feb 04 17:35:28 desktop systemd-resolved[17487]: Using feature level UDP+EDNS0+DO for transaction 22909.
feb 04 17:35:28 desktop systemd-resolved[17487]: Using DNS server 192.168.179.1 for transaction 22909.
feb 04 17:35:28 desktop systemd-resolved[17487]: Sending query packet with id 22909.
feb 04 17:35:28 desktop systemd-resolved[17487]: Got message type=method_return sender=org.freedesktop.DBus destination=:1.185 path=n/a interface=n/a member=n/a cookie=92 reply_c>
feb 04 17:35:28 desktop systemd-resolved[17487]: Match type='signal',sender='org.freedesktop.DBus',path='/org/freedesktop/DBus',interface='org.freedesktop.DBus',member='NameOwner>
feb 04 17:35:31 desktop systemd-resolved[17487]: Connection failure for DNS UDP packet: No route to host
feb 04 17:35:31 desktop systemd-resolved[17487]: Retrying transaction 22909.
feb 04 17:35:31 desktop systemd-resolved[17487]: Cache miss for 2.arch.pool.ntp.org IN A
feb 04 17:35:31 desktop systemd-resolved[17487]: Transaction 22909 for <2.arch.pool.ntp.org IN A> scope dns on enp0s31f6/*.
feb 04 17:35:31 desktop systemd-resolved[17487]: Using feature level UDP+EDNS0+DO for transaction 22909.
feb 04 17:35:31 desktop systemd-resolved[17487]: Sending query packet with id 22909.
feb 04 17:35:31 desktop systemd-resolved[17487]: Transaction 22909 for <2.arch.pool.ntp.org IN A> on scope dns on enp0s31f6/* now complete with <(null)> from none (unsigned).
feb 04 17:35:31 desktop systemd-resolved[17487]: Assertion 'sd_bus_error_is_set(e)' failed at ../systemd-stable/src/libsystemd/sd-bus/bus-convenience.c:169, function sd_bus_reply>
feb 04 17:35:31 desktop systemd-resolved[17487]: Failed to send hostname reply: Invalid argument
feb 04 17:35:31 desktop systemd-resolved[17487]: Sent message type=error sender=n/a destination=:1.238 path=n/a interface=n/a member=n/a cookie=178 reply_cookie=2 signature=s err>
feb 04 17:35:31 desktop systemd-resolved[17487]: Sent message type=method_call sender=n/a destination=org.freedesktop.DBus path=/org/freedesktop/DBus interface=org.freedesktop.DB>
feb 04 17:35:31 desktop systemd-resolved[17487]: Freeing transaction 22909.

This bit repeated in the journal, I can send the full (debug) log if needed.

Thanks for looking at the issue.

@martyg77
Copy link

martyg77 commented Jun 3, 2019

I have been seeing the same behavior on Arch linux for the last couple months.
Current systemd version here is 242.29.
I observe this specific flow when resuming my laptop from suspend.

Jun 03 16:04:54 x360 systemd-resolved[16231]: Assertion 'sd_bus_error_is_set(e)' failed at ../systemd-stable/src/libsystemd/sd-bus/bus-convenience.c:172, function sd_bus_reply_method_error(). Ignoring. Jun 03 16:04:54 x360 systemd-resolved[16231]: Failed to send hostname reply: Invalid argument

@ghost
Copy link

ghost commented Oct 27, 2019

I have the same issue on a laptop running systemd version 243.51. The network will not start at all.

On another laptop with systemd version 242.135, the network is up and running as expected.

EDIT: tried downgrading the systemd packages to 242.84 but this did not help to resolve the problem. Still no network - can't ping the gateway.

@CrawX
Copy link

CrawX commented Nov 10, 2019

I do have the same problem on archlinux-arm (aarch64) running systemd 243.78. I did have the same problem with 242.84 and the upgrade did not fix it. For me it has nothing to do with resuming from suspend. When I restart systemd-resolved it reproducibly stops working after a few minutes. The error I can see in the journal is just as @francoism90 described.

@ivo-a22
Copy link

ivo-a22 commented Dec 13, 2019

Same, I have the same problem with systemd- resolved , anybody knows some solutions ? I have arch linux

@enihcam
Copy link

enihcam commented Mar 1, 2020

same, Archlinux.

@QLaille
Copy link

QLaille commented Mar 9, 2020

Same issue for me, 240-6ubuntu5.8 amd64.

@LDVSOFT
Copy link

LDVSOFT commented Jun 8, 2020

Same error flood here, even not when suspending/resuming.

@jake-arkinstall
Copy link

jake-arkinstall commented Jul 7, 2020

Can confirm this problem is still around on arch, systemd 245.6-7-arch. No suspend/resume involved - it just happens, usually after the network has been up for 3-4 hours, and running on debug logging for such periods of time would be rather problematic for me.

@gauravag99
Copy link

same issue for me, ubuntu 20.04

@Vlek
Copy link

Vlek commented Aug 13, 2020

Same issue, brand new install of Arch Linux.

@gauravag99
Copy link

same issue for me, ubuntu 20.04

I managed to solve this after looking at the congested 2.4ghz band at my place and doing some adjustments to free up some channels to accomodate my wifi. It works fine now for now. If I encounter it again I will post. Suggest you guys to try the same.

poettering added a commit to poettering/systemd that referenced this issue Aug 28, 2020
…he transaction

We must have the error number around when completing the transaction.
Let's hence make sure we always initialize it *first* (we accidentally
did it once after).

Fixes: systemd#11626
peckato1 pushed a commit to peckato1/systemd that referenced this issue Oct 1, 2020
…he transaction

We must have the error number around when completing the transaction.
Let's hence make sure we always initialize it *first* (we accidentally
did it once after).

Fixes: systemd#11626
(cherry picked from commit fd8a301)
vbatts pushed a commit to kinvolk/systemd that referenced this issue Nov 12, 2020
…he transaction

We must have the error number around when completing the transaction.
Let's hence make sure we always initialize it *first* (we accidentally
did it once after).

Fixes: systemd#11626
(cherry picked from commit fd8a301)
(cherry picked from commit 38ae73f)
@zee-bit
Copy link

zee-bit commented Jun 9, 2021

The error is still there for me on Ubuntu 20.04.2, using systemd --version: systemd 245 (245.4-4ubuntu3.6). Why is this closed?

@poettering
Copy link
Member

@zee-bit this is the upstream bug tracker. We close issues when they are fixed in our upstream tree, which this was with version 248. If you run something older, then please ping your distro about it and they might do something about it and backport the fix. But this is not the right place to request such a backport.

@andywaltlova
Copy link

If anyone runs into this issue on Ubuntu 20.04, you can go to https://bugs.launchpad.net/canonical-identity-provider/+bug/1946667 and add yourself as affected user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer resolve