Maui Forums
[Solved] - Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - Printable Version

+- Maui Forums (https://forums.mauilinux.org)
+-- Forum: Maui Support (https://forums.mauilinux.org/forumdisplay.php?fid=74)
+--- Forum: Plasma Desktop (https://forums.mauilinux.org/forumdisplay.php?fid=84)
+--- Thread: [Solved] - Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 (/showthread.php?tid=24344)



[Solved] - Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - kdemeoz - 27th March 2017

Hi

<<TOWER>>   For the 4th(?) time just now, since upgrading to Kernel 4.8.0-42 [on whatever date it became available in Update Manager], during ordinary Maui 17.03 usage (ie, just doing all my usual day to day stuff], Tower abruptly lost all network connections. The SysTray widget icon visually gives no indication of any abnormal state when this occurs, but all internet-facing pgms instantly lose connectivity. Running my bash script to reset the network connections, &/or directly running the specific command itself, fail with a peculiar lack of permissions error*:
Code:
GA-Z97-HD3:~/Documents/1. Home/Computer/Linux/My Bash Scripts$ sudo ./Refresh_network_connections_\(sudo\).sh
bash: /usr/bin/sudo: Permission denied
GA-Z97-HD3:~/Documents/1. Home/Computer/Linux/My Bash Scripts$ sudo systemctl restart network-manager
bash: /usr/bin/sudo: Permission denied

It's NOT a modem fault, nor an ISP fault, as other devices continue to connect to the internet via modem at these times just fine. Furthermore, 100% of the time that this random failure manifests, rebooting Tower immediately reinstates its connectivity without further intervention by me.

To the best of my recollection, this failure never occurred with any of the earlier 4.8.0-x kernels i've used since my upgrade to HWE 16.04.2, ie, i suspect specifically 4.8.0-42. When i did the enforced reboot a few minutes ago, i chose to use the previous kernel, 4.8.0-41, to test my hypothesis.

Does anyone else have any suspicions wrt 4.8.0-42?


* Oh dear. I just retried my bash script, & the raw command, since reboot [with everything apparently all good again], & they both failed with the same permissions rejection. I cannot understand this; my bash script used to be reliable. I don't know when something changed that now causes this problem. 


RE: Repeat Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42. - rocky7x - 27th March 2017

Check if your user is assigned to the sudo group:

Code:
cat /etc/group | grep sudo



RE: Repeat Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - kdemeoz - 27th March 2017

Thanks. Yes [but anyway, whilst logically that could have been (but wasn't) the cause of my strange permission-loss (which btw manifests ONLY for that specific script / command), it surely cannot have any relationship to the random connectivity failures when using Kernel 4.8.0-42 can it?].


RE: Repeat Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42. - rocky7x - 27th March 2017

If you can paste the content of the script here, maybe we can tell you what's wrong in it.

Anyway, I doubt that anyone here at the forums will have time to trace the changelog of kernel 4.8.0-42 and find out if there is anything related to your network card, especially since the distro uses Ubuntu backend. If using kernel 4.8.0-41 works fine without a problem, I would suggest that you use it and wait for the newer kernels. Then you can try - maybe it's just a one version regression. If you would like to have it investigated anyway, you can try to create a bug report at Ubuntu kernel support: https://bugs.launchpad.net/bugs/bugtrackers/linux-kernel-bugs

Or you can check that same page, maybe someone already filed a similar bug for the same hardware.


RE: Repeat Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - kdemeoz - 27th March 2017

(27th March 2017, 14:12)rocky7x Wrote: If you can paste the content of the script here, maybe we can tell you what's wrong in it.

I already did [well, the important part of it, anyway]... in my initial code box above. The bash script literally just runs that command, to save me the hassle of having to manually type it out each time. It used to work just fine. Here's the full thing:
Code:
!#/bin/bash

# 14/10/16 --- Refresh network connections
# For Upstart:    sudo service network-manager restart
# For systemd:    sudo systemctl restart network-manager

#sudo service network-manager restart
sudo systemctl restart network-manager
#sudo systemctl restart network-manager.service
sleep 5
exit


(27th March 2017, 14:12)rocky7x Wrote: Anyway, I doubt that anyone here at the forums will have time to trace the changelog of kernel 4.8.0-42 and find out if there is anything related to your network card, especially since the distro uses Ubuntu backend. 

Um, with respect, i actually wasn't asking anyone to do anything of the kind. All i was interested to know was...
Quote:Does anyone else have any suspicions wrt 4.8.0-42?
ie, i was curious to see if that kernel has also done anything odd for any other users here... NOT for them to pursue some technical investigation on my behalf. 

Thank you.


RE: [Closed] - Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - rocky7x - 27th March 2017

Hi,

You have an error in the script: the script does not start with !# but with #! (first line)

Try to fix it, maybe then it'll work. Also you do not start the script with sudo since you already have sudo in the script. So when you run the script, run it with your user. I think you also have an error in the restart command: the network manager should be referred to as service, so it should be:


Code:
systemctl restart network-manager.service



RE: - Network Connections Widget Failures; Suspect HWE 16.04.2 / Kernel 4.8.0-42 - kdemeoz - 28th March 2017

(27th March 2017, 15:08)rocky7x Wrote: Hi,

You have an error in the script: the script does not start with !# but with #! (first line)

... Also you do not start the script with sudo since you already have sudo in the script. So when you run the script, run it with your user. 

Hi & thanks rocky

Yes & yes -- massive brainfade on my part apparently; no idea how i managed to somehow type the hashbang backwards then not notice it. Also the redundant sudo was silly. Thanks for both catches. However, even with those errors fixed, the basic problem continued unchanged; i still could not run any of my bash scripts, as every time this error msg resulted [same as in my initial post above]:
Code:
bash: /usr/bin/sudo: Permission denied


(27th March 2017, 15:08)rocky7x Wrote: .. I think you also have an error in the restart command: the network manager should be referred to as service, so it should be:




Code:
systemctl restart network-manager.service

No. I do understand your point, & indeed that was one of the strings i initially tried last year when i wrote my script [you can still see this string, commented out, in my earlier post's codebox]. When i researched it last year i found many opinions in favour of your one, but also many in favour of my one, which is what i selected. Here's the important point though:

My script [even despite my silly hashbang error] USED to work just fine on Tower, & STILL works just fine on Lappy. I cannot pinpoint exactly when the problem initiated on Tower, but certainly something changed that stops my scripts working [on Tower; still all of them are good on Lappy]... & based on hours of testing on this today, i now have a clue of the root cause [read on].

I compared the permissions of Tower's /usr/bin/sudo against Lappy's - identical. Ditto i compared /bin/bash permissions - also identical. I wondered if maybe something crazy had happened to cause my file-system to have become mounted with the noexec option, but checking mount confirmed this was not so. 

In a beautiful coincidence, new kernels became available in Update Manager. I had already been wondering if the root cause might have been some bug/regression in both 4.8.0-42 & -41, & so i was considering rebooting Tower with the same 4.4.0-67 as used by Lappy. Once i saw the new kernels, i decided to install & try these, then if still no good, to try the older 4.4.0-x series per Lappy. So I installed the brand new 4.8.0-44 in Tower, rebooted into it... & now my bash scripts once more run properly in Tower!! Yay... but what a strange thing to have occurred. 

Now i just hope the random network connection failures have also been fixed in this new kernel... that was after all the reason for creating this thread. For now i'm marking it as Solved