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

23 wireguard peers hang systemd-networkd #11404

Closed
darkk opened this issue Jan 12, 2019 · 7 comments
Closed

23 wireguard peers hang systemd-networkd #11404

darkk opened this issue Jan 12, 2019 · 7 comments
Labels
bug 🐛 Programming errors, that need preferential fixing network
Milestone

Comments

@darkk
Copy link
Contributor

darkk commented Jan 12, 2019

systemd version the issue has been seen with

239-7ubuntu10.6

Used distribution

Ubuntu 18.10

Expected behaviour you didn't see

systemctl restart systemd-networkd restarts cleanly and applies network configuration

Unexpected behaviour you saw

systemctl restart systemd-networkd hangs for a while and fails to apply network configuration. If the node is rebooted, it can't apply network configuration on boot as well.

Steps to reproduce the problem

  1. launch VM on Linode with Ubuntu 18.04 or 18.10
  2. add wireguard PPA: apt-add-repository ppa:wireguard/wireguard
  3. install wireguard: apt-get install wireguard
  4. download config file generator systemd-wg that reproduces the issue
  5. simulate my VPN concentrator configuration with ./systemd-wg 23

For some reason, 23 is the magic number of peers: 22 peers, 24 peers and 1500 peers work okay, but 23 peers trigger the bug.

The bug also affects systemd-237 from Ubuntu 18.04.

@yuwata yuwata added the network label Jan 12, 2019
@yuwata
Copy link
Member

yuwata commented Jan 13, 2019

Could you provide relevant logs?
Also, could you try v240 or current git snapshot? We have fixed several bugs around wireguard in v240.

@yuwata yuwata added the needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer label Jan 13, 2019
@darkk
Copy link
Contributor Author

darkk commented Jan 13, 2019

@yuwata please, tell me, what logs are relevant in this case? Is there some way to enable verbose logging in systemd?

Launchpad ticket has tgz with syslog & strace from 237, but it's not clear to me if they're useful: syslog is almost silent, but strace is quite chatty and looks like some infinite loop.

@yuwata
Copy link
Member

yuwata commented Jan 13, 2019

please, tell me, what logs are relevant in this case?

$ journalctl -u systemd-networkd.service

Is there some way to enable verbose logging in systemd?

Please set SYSTEMD_LOG_LEVEL=debug environment variable. So, please create the following and restart networkd:

# /etc/systemd/system/systemd-networkd.service.d/override.conf
[Service]
Environment=SYSTEMD_LOG_LEVEL=debug

Note that, at least, the kernel warning in your log is fixed by 7d0b26a.

@yuwata yuwata added the bug 🐛 Programming errors, that need preferential fixing label Jan 13, 2019
@yuwata
Copy link
Member

yuwata commented Jan 13, 2019

Aha, indeed, the issue is reproduced.

yuwata added a commit to yuwata/systemd that referenced this issue Jan 14, 2019
This does not change the behavior except for fixing the issue systemd#11404.

Fixes systemd#11404.
@yuwata yuwata added has-pr ✨ and removed needs-reporter-feedback ❓ There's an unanswered question, the reporter needs to answer labels Jan 14, 2019
@yuwata
Copy link
Member

yuwata commented Jan 14, 2019

I've posted #11418. If possible, please test the PR.

@yuwata yuwata added this to the v241 milestone Jan 14, 2019
@darkk
Copy link
Contributor Author

darkk commented Jan 15, 2019

I'm unsure what's the best way to test it for me as it's still part of init :-)
I tried to apply the patch to 239 from Ubuntu 18.10, but it failed to apply and I don't have a system that ships 240 to patch (I assume, it should apply more-or-less cleanly on top of 240).
I'll try to test it with Debian/testing, but it'll take a while.

@yuwata
Copy link
Member

yuwata commented Jan 15, 2019

@darkk OK. No problem. This is already merged. Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Programming errors, that need preferential fixing network
Development

No branches or pull requests

2 participants