Summary: | net-misc/networkmanager-0.9.8.8: '/etc/init.d/NetworkManager restart' doesn't kill all child processes | ||
---|---|---|---|
Product: | Gentoo Linux | Reporter: | Nikoli <nikoli> |
Component: | Current packages | Assignee: | Gentoo Linux Gnome Desktop Team <gnome> |
Status: | RESOLVED UPSTREAM | ||
Severity: | normal | CC: | openrc |
Priority: | Normal | ||
Version: | unspecified | ||
Hardware: | All | ||
OS: | Linux | ||
URL: | https://bugzilla.gnome.org/show_bug.cgi?id=720774 | ||
Whiteboard: | |||
Package list: | Runtime testing required: | --- | |
Attachments: | patch for /etc/init.d/NetworkManager |
Description
Nikoli
2013-12-08 09:01:00 UTC
As a workaround i added to /etc/conf.d/NetworkManager line: rc_cgroup_cleanup="YES" (In reply to Nikoli from comment #1) > As a workaround i added to /etc/conf.d/NetworkManager line: > rc_cgroup_cleanup="YES" It isn't probably a workaround but the proper way to fix it (like we need to go for gdm init.d script since 3.8). CCing openrc people to know if there is any "more elegant" way to solve this I think it is NM or dhcpcd bug, because pid for dhcpcd is created in wrong place: $ strings /usr/sbin/NetworkManager|grep 'dhcpcd.*pid' /var/lib/NetworkManager/dhcpcd-%s.pid dhcpcd started with pid %d # find /var/ /run/ -name 'dhcpcd*.pid' /run/dhcpcd-eno1.pid # lsof -n|grep 'dhcpcd.*.pid' dhcpcd 22018 root 4wW REG 0,13 6 28959849 /run/dhcpcd-eth0.pid (In reply to Nikoli from comment #3) > I think it is NM or dhcpcd bug, because pid for dhcpcd is created in wrong > place: > $ strings /usr/sbin/NetworkManager|grep 'dhcpcd.*pid' > /var/lib/NetworkManager/dhcpcd-%s.pid Why is NM putting pid files in /var/lib/NetworkManager instead of /var/run or more preferably /run? I think this might be the issue. (In reply to William Hubbs from comment #4) > (In reply to Nikoli from comment #3) > > I think it is NM or dhcpcd bug, because pid for dhcpcd is created in wrong > > place: > > $ strings /usr/sbin/NetworkManager|grep 'dhcpcd.*pid' > > /var/lib/NetworkManager/dhcpcd-%s.pid > > > Why is NM putting pid files in /var/lib/NetworkManager instead of /var/run > or more preferably /run? > > I think this might be the issue. Would openrc being able to take care of that pid file that is being created by networkmanager and not init.d script? (for reporting to upstream ;)) (In reply to Pacho Ramos from comment #5) > (In reply to William Hubbs from comment #4) > > (In reply to Nikoli from comment #3) > > > I think it is NM or dhcpcd bug, because pid for dhcpcd is created in wrong > > > place: > > > $ strings /usr/sbin/NetworkManager|grep 'dhcpcd.*pid' > > > /var/lib/NetworkManager/dhcpcd-%s.pid > > > > > > Why is NM putting pid files in /var/lib/NetworkManager instead of /var/run > > or more preferably /run? > > > > I think this might be the issue. > > Would openrc being able to take care of that pid file that is being created > by networkmanager and not init.d script? (for reporting to upstream ;)) Wait, I just read this over again. I'm wrong about the locations of the dhcpcd pid files making a difference; it doesn't. I looked at the OpenRC script, and I do not see any obvious issues. When NM goes down, it should stop its child processes, so the question is, why doesn't it kill dhcpcd on the way down? (In reply to William Hubbs from comment #6) > Wait, I just read this over again. I'm wrong about the locations of the > dhcpcd pid files making a difference; it doesn't. I looked at the OpenRC > script, and I do not see any obvious issues. When NM goes down, it should > stop its child processes, so the question is, why doesn't it kill dhcpcd on > the way down? I guess a simple "killall networkmanager" doesn't kill dhcpcd, right? In that case, this looks like gdm case and, then, I would report to upstream that "killall" doesn't do that with networkmanager and wait a bit to see if that is expected (like was the case with gdm) or they consider it a bug and fix it ;) Right, it looks like this is the path you want to follow, find out why NM isn't killing child processes. Nikoli, can you please reply in upstream report to: https://bugzilla.gnome.org/show_bug.cgi?id=720774#c1 ? Thanks! (In reply to Pacho Ramos from comment #9) > Nikoli, can you please reply in upstream report to: > https://bugzilla.gnome.org/show_bug.cgi?id=720774#c1 > ? > > Thanks! Nikoli, please provide to upstream the logs that are being shown when it tries to be killed Thanks Created attachment 388888 [details, diff]
patch for /etc/init.d/NetworkManager
Seems upstream logic is "killing NM != disabling networking", so when NM is stopped all interfaces are up and running. I think this is not always optimal behaviour, 'rc-service NetworkManager stop' should also disable all interfaces it created and kill all processes it started. 'nmcli networking off' command does exactly this, so attached patch fixed problem for me. Not sure if you could at least reply to https://bugzilla.gnome.org/show_bug.cgi?id=720774#c1 as, per I see in bug report, upstream asked that and never got replied ... :/ (In reply to Pacho Ramos from comment #13) > Not sure if you could at least reply to > https://bugzilla.gnome.org/show_bug.cgi?id=720774#c1 as, per I see in bug > report, upstream asked that and never got replied ... :/ |