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

[Ubuntu 18.04] systemd-logind crashed with SIGABRT in __libc_connect() #9431

Closed
jcormier opened this Issue Jun 26, 2018 · 8 comments

Comments

4 participants
@jcormier
Copy link

jcormier commented Jun 26, 2018

systemd version the issue has been seen with
v237
https://launchpad.net/ubuntu/+source/systemd/237-3ubuntu10

Used distribution
Ubuntu 18.04
Ubuntu bug: https://bugs.launchpad.net/ubuntu/+source/systemd/+bug/1745664

Unexpected behaviour you saw
I am running an i7-7820X on a msi x299 sli plus motherboard with a nvidia gtx 1050 card.

So far this occurs without much warning. My system will lock up and reboot on its own. Then the following boot, I will be using various applications and the desktop will go away and I'll be returned to the login screen. Then the ubuntu bug report will report this crash and an xorg crash. Sometimes these crashes happen soon after first boot and sometimes after I've been using the computer most of the day.

I've also seen this on a different machine running an AMD Ryzen 7 1800X and Nvida GT 710.

Steps to reproduce the problem
This problem occurs randomly, sometimes immediately after boot and sometimes after its been on a while. So far I have not been able to effect how often this occurs.

If there are steps I could take to gather more information let me know.

Downgrading to Ubuntu 17.10, Systemd v234-2ubuntu12.4. This problem has not appeared in this older version.

@filbranden

This comment has been minimized.

Copy link
Member

filbranden commented Jun 26, 2018

Looks like a duplicate of #7074.

If you're using NIS, you should disable systemd-logind's IP sandbox, since it will otherwise prevent it from opening network connections to your NIS server.

Quick way to work around this is to create a drop-in for systemd-logind.service and add IPAddressDeny= (empty) to disable the sandbox. A few more details here.

Another option is to run nscd, in which case logind will talk to nscd (on the local machine, so allowed) and nscd will talk to the NIS server.

I hope that helps!
Filipe

@jcormier

This comment has been minimized.

Copy link
Author

jcormier commented Jun 26, 2018

How can I test to see if this is triggered by NIS? And why would this hang be so random in how long it takes to trigger?

@filbranden

This comment has been minimized.

Copy link
Member

filbranden commented Jun 26, 2018

The bug at Ubuntu Launchpad says "configured system to use nis. seems to be crashing when I attempt to use a NIS user account", so...

You can use the workaround suggested above (clearing IPAddressDeny= for systemd-logind) or start running nscd, either of those should fix this.

Not sure why this seems to be random in how long it takes to trigger... Not sure how to trigger an operation that will always trigger a NIS lookup... But maybe try those and see if you still have crashes after a few days, perhaps that's enough confirmation?

@poettering

This comment has been minimized.

Copy link
Member

poettering commented Jun 26, 2018

The stack trace in the bug shows the SIGABRT being triggered in the portmapper code, and that means NIS is causing this. Hence, yupp, please turn off the IP sandboxing stuff for logind and it should work again. Also see the NEWS file about this.

Consider asking your distro to include a drop-in for logind that turns off the IP sandbox, so that everybody who installs nss-nis automatically gets the IP sandbox turned off, and things just work again for NIS.

Anyway, let's close this here, the IP sandbox for logind was announced, and I don't think we should really change anything in systemd regarding this. Hope that makes sense. Closing.

@poettering poettering closed this Jun 26, 2018

@jcormier

This comment has been minimized.

Copy link
Author

jcormier commented Jun 26, 2018

Ahh I did not recognize pmap as portmap. Good catch. I'll give IPAddressDeny= a try. Is there an example of a distro including this fix so I can point them to it?

@armaneshaghi

This comment has been minimized.

Copy link

armaneshaghi commented Aug 10, 2018

Just reporting that I am still experiencing this in Ubuntu 18.04 and commenting IPAddressDeny= does indeed solve the issue.

@jcormier

This comment has been minimized.

Copy link
Author

jcormier commented Aug 10, 2018

Okay. I've switched to 17.10 which does not have the problem. I'll try IpAddressDeny= when I get a chance.

@jcormier

This comment has been minimized.

Copy link
Author

jcormier commented Aug 10, 2018

$ sudo cp /lib/systemd/system/systemd-logind.service /etc/systemd/system/
$ sudo vim /etc/systemd/system/systemd-logind.service 
$ diff /lib/systemd/system/systemd-logind.service /etc/systemd/system/systemd-logind.service
37c37
< IPAddressDeny=any
---
> IPAddressDeny=
$ sudo systemctl daemon-reload 
$ sudo systemctl restart systemd-logind.service
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.