Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

eth0: kevent 0 may have been dropped

Fri Sep 16, 2016 4:47 pm

Hallo,

very often I get the errormessage "smsc95xx 1-1.1:1.0 eth0: kevent 0 may have been dropped" with my newly setup Raspberry 3. After that, I can't connect to the Raspberry and I have to reboot it.

What I did already:
- apt-get update
- apt-get upgrade
- apt-get dist-upgrade
- rpi-update
- I tried vm.min_free_kbytes = 32768 in sysctl.conf
- and also smsc95xx.turbo_mode = N in cmdline.txt
- another SD-Card

But I still get this error :cry: - what can I do?

Many thanks in advance
Jörg

User avatar
DougieLawson
Posts: 40227
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: eth0: kevent 0 may have been dropped

Fri Sep 16, 2016 9:05 pm

Get a better power supply or better cable between your supply and your RPi. The RPi3 really needs the full 2.5A at 5V at the board.

Update your Raspbian with sudo apt-get update && sudo apt-get -y dist-upgrade so you get the 4.4.13 kernel.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

Re: eth0: kevent 0 may have been dropped

Sat Sep 17, 2016 7:45 am

Thanks,

due to rpi-update I'm already on 4.4.21 - I will check the power supply. But I especially bought a power supply with 2.5A for the RPi3. It is a Rydges SpeedPower High-Quality PC Power Supply 5V 2,5A - I hope that is ok, but I also will try another one.

User avatar
DougieLawson
Posts: 40227
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: eth0: kevent 0 may have been dropped

Sat Sep 17, 2016 9:22 am

Yogi43 wrote:Thanks,

due to rpi-update I'm already on 4.4.21 - I will check the power supply. But I especially bought a power supply with 2.5A for the RPi3. It is a Rydges SpeedPower High-Quality PC Power Supply 5V 2,5A - I hope that is ok, but I also will try another one.
In that case all bets are off, because you're running the experimental kernel which isn't guaranteed to work.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

Re: eth0: kevent 0 may have been dropped

Sat Sep 17, 2016 10:24 am

Could it be, that my problem was related to the 98-rpi.conf issue? Since the update this morning the Rpi is running since 2 hours without the problem.

Before I recognized the problem on boot and I removed the file and put the parameter vm.min_free_kbytes directly into sysctl.conf. But that shouldn't make any difference - or?

Is there a parameter with rpi-update to only get the official kernel?

User avatar
DougieLawson
Posts: 40227
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: eth0: kevent 0 may have been dropped

Sat Sep 17, 2016 6:14 pm

Yogi43 wrote: Is there a parameter with rpi-update to only get the official kernel?
Simple answer, don't run it, ever.
Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

Re: eth0: kevent 0 may have been dropped

Sat Sep 17, 2016 9:15 pm

Ok, the error is back after some hours - now I made a complete new setup but now I stick to kernel 4.4.13 :D

Let's see if the raspberry survives the night.

Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

Re: eth0: kevent 0 may have been dropped

Sun Sep 18, 2016 12:23 pm

Maybe I found the reason, why I got the kevent problem. Every time try so set up an Wifi-Bridge I get the mentioned error.

My /etc/network/interfaces was configured like this. I found it in https://www.elektronik-kompendium.de/si ... 002161.htm:

Code: Select all

# Localhost
auto lo
iface lo inet loopback

# Ethernet
auto eth0
allow-hotplug eth0
iface eth0 inet manual

# WLAN
auto wlan0
allow-hotplug wlan0
iface wlan0 inet manual
wireless-power off

# Netzwerkbrücke
auto br0
iface br0 inet manual
bridge_ports eth0 wlan0 # build bridge
bridge_fd 0             # no forwarding delay
bridge_stp off          # disable Spanning Tree Protocol 

Is there something wrong? By serching the internet, one finds many different ways to set up a bridge. Which one is the best for Jesie?

Yogi43
Posts: 9
Joined: Fri Sep 16, 2016 4:40 pm

Re: eth0: kevent 0 may have been dropped

Wed Sep 21, 2016 8:43 pm

What is the best way to setup a network bridge between eth0 and wlan0 with Jessie? The configuration shown above leads to the kevent messages.

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Sat Oct 01, 2016 10:14 pm

I wish I knew... It's a shame; the Pi 3 would make a pretty damned good wifi AP if not for this problem.

I have one behind the TV in the livingroom running as a media centre and wifi access point for any devices in the room, and also as a gateway to the Pi in my greenhouse (another story). Ever since getting the thing, I've had trouble with it. The Pi2 (without wifi) worked fine, but the Pi3 regularly crashes with the kevent dropped errors, with any and all levels of network activity -- from flat-out, to background-level mosh noise and the like -- which is particularly irritating as I NFS mount root; I can't bounce the interface. The wifi interface is fine when it's crashed: anything connected to it can happily ping anything else connected to it -- my laptop can ping the greenhouse Pi, for example -- but as the wired interface is down, nothing can ping the rest of the network through it.

I did have other stability issues, so bought an official Foundation PSU and I've not seen the coloured square since. The only things plugged into it are the TV (over HDMI), the ethernet, and a DS18B20 1-wire thermometer (wired as at http://www.reuk.co.uk/wordpress/raspber ... pberry-pi/). There's no keyboard or mouse; nothing in the USB ports, in fact. Bluetooth isn't in use. Power would appear to be fine.

Particularly annoying is Eben Upton's assertion to Slashdot the other day that the networking is stable. If he wants my kernel, initrd, and config.txt he can have them...

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Wed Oct 12, 2016 11:48 am

Thanks so much for this post! This confirms precisely my observations. Set up my pi3 as a wifi-to-ethernet bridge in order to extend my wifi and it works perfectly except for the "kevent 0 may have been dropped" issue which occurs randomly. It's still quite a mystery to me as sometimes it will work for over 24 hours straight while sometimes it takes several reboots to bring back up the wired ethernet. Wifi still works fine at all times, however if the client is disconnected, it cannot reconnect, as the DHCP server is only reachable via eth0, of course.

I am NOT using the official rpi3 AC adaptor but one that is rated at 2A max. However I did measure the pi's power consumption and it NEVER even came close to 2A, always is below 1A actually (I only have a keyboard attached to it; BT is off) so can I safely assume that using another AC adaptor will definitely NOT fix this?

User avatar
mahjongg
Forum Moderator
Forum Moderator
Posts: 13388
Joined: Sun Mar 11, 2012 12:19 am
Location: South Holland, The Netherlands

Re: eth0: kevent 0 may have been dropped

Wed Oct 12, 2016 12:31 pm

pi-per-view wrote:I am NOT using the official rpi3 AC adaptor but one that is rated at 2A max. However I did measure the pi's power consumption and it NEVER even came close to 2A, always is below 1A actually (I only have a keyboard attached to it; BT is off) so can I safely assume that using another AC adaptor will definitely NOT fix this?
No, but a different CABLE might!
Even with just 1Amp some cables may drop 0.25Volt when drawing 1A through them, which brings the voltage the PI receives below the minimum voltage. But even when this isn't directly the case, a bad cable might still have a very negative influence on Ethernet transmissions. As many Ethernet adapters react very adversely to variations in their power supply voltages, and variations in current consumption directly lead to variations in the "5V" the PI receives.

Also the adapter may claim "rated 2A", but how stable does it keep it output voltage when different currents are drawn?

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Wed Oct 12, 2016 1:19 pm

mahjongg wrote:Even with just 1Amp some cables may drop 0.25Volt when drawing 1A through them, which brings the voltage the PI receives below the minimum voltage. But even when this isn't directly the case, a bad cable might still have a very negative influence on Ethernet transmissions. As many Ethernet adapters react very adversely to variations in their power supply voltages, and variations in current consumption directly lead to variations in the "5V" the PI receives.

Also the adapter may claim "rated 2A", but how stable does it keep it output voltage when different currents are drawn?
Interesting. Suppose I cannot fully trust the power supply being 100% stable as it's just some cheap Chinese noname product. Unfortunately, I cannot test with a different cable because it's fixed to the adaptor so I've ordered an official RPI 3 power supply now, hoping this will fix the problem...

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Wed Oct 12, 2016 4:43 pm

pi-per-view wrote:Unfortunately, I cannot test with a different cable because it's fixed to the adaptor so I've ordered an official RPI 3 power supply now, hoping this will fix the problem...
It didn't fix mine.

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 3:14 pm

dickon wrote:It didn't fix mine.
So far so good with the new PSU - ~24 hrs without any "kevent 0". Are you using the latest firmware (via rpi-update)? I am. I have also disabled IPv6 and added

Code: Select all

vm.min_free_kbytes = 32768
to /etc/sysctl.conf

Furthermore, the following bridge options were added to /etc/network/interfaces :

Code: Select all

bridge_fd 0
bridge_stp off
bridge_waitport 0
bridge_maxwait 5
bridge_hello 3
bridge_maxage 10
Not sure these settings help, just picked them up from various posts... :D

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 3:44 pm

Code: Select all

root@tellypi:~# uname -a
Linux tellypi 4.4.21-v7+ #911 SMP Thu Sep 15 14:22:38 BST 2016 armv7l GNU/Linux
I had 8MB reserved; I've bumped that to 32MB as you suggest; we'll see if it makes any difference, but as that would probably trigger kevent 2 (EVENT_RX_MEMORY) not kevent 0 (EVENT_TX_HALT), I'm not expecting it to.

You're not supposed to use rpi-update these days, I thought? I

Code: Select all

apt-get install libraspberrypi-bin raspberrypi-bootloader
when I want new firmware.

From looking at the code, I *think* whatever usb_clear_halt() eventually calls way, way down the USB networking rabbit hole is returning success, but the chip isn't actually responding correctly or there's a bug in the driver which handles it. I'm assuming this because no other error messages are being reported (and the code suggests they should on an error), and there are reports that bouncing the interface (which is likely to reset the thing) clears the fault. I can't do that, as I'm NFS mounting the root filesystem over the wired ethernet which disappears, leaving the machine hanging around waiting for / that just disappeared underneath it.

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 4:40 pm

dickon wrote: I had 8MB reserved; I've bumped that to 32MB as you suggest; we'll see if it makes any difference, but as that would probably trigger kevent 2 (EVENT_RX_MEMORY) not kevent 0 (EVENT_TX_HALT), I'm not expecting it to.

You're not supposed to use rpi-update these days, I thought?
Mine is

Code: Select all

Linux raspberrypi 4.4.23-v7+ #913 SMP Tue Oct 4 14:16:19 BST 2016 armv7l GNU/Linux
Yeah, I've also read that one is not supposed to use rpi-update these days but since the first time the "kevent 0" thing occured I had googled that it's firmware related I decided to give it a go... However I have no idea whether this has actually improved anything and to be honest I doubt it.

Never got the "Kevent 2" so far. What does it mean? Not enough free memory available? Never had an issue with RAM. Gave the GPU 128M and I'm using a 100M tmpfs for /var/log in order to prevent the SD card from running down too fast. I've got an apache webserver, a mysql daemon and some other stuff running in the background at all times and sometimes use kodi but RAM usage has never exceeded about 600M, thus no swapping ever.
dickon wrote: From looking at the code, I *think* whatever usb_clear_halt() eventually calls way, way down the USB networking rabbit hole is returning success, but the chip isn't actually responding correctly or there's a bug in the driver which handles it. I'm assuming this because no other error messages are being reported (and the code suggests they should on an error), and there are reports that bouncing the interface (which is likely to reset the thing) clears the fault. I can't do that, as I'm NFS mounting the root filesystem over the wired ethernet which disappears, leaving the machine hanging around waiting for / that just disappeared underneath it.
Makes sense. I've noticed that when I did a reboot after a "kevent 0" the pi would boot as though everything was OK when in fact eth0 wasn't really working despite both NIC LEDs being on. And yes, after restarting networking altogether it would *sometimes* work (not always) but some services like hostapd wouldn't work correctly and a reboot is quicker than restarting those daemons.

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 5:12 pm

pi-per-view wrote: Mine is

Code: Select all

    Linux raspberrypi 4.4.23-v7+ #913 SMP Tue Oct 4 14:16:19 BST 2016 armv7l GNU/Linux
That is later:

Code: Select all

root@tellypi:~# apt-get install libraspberrypi-bin libraspberrypi0 raspberrypi-bootloader raspberrypi-kernel
Reading package lists... Done
Building dependency tree       
Reading state information... Done
libraspberrypi-bin is already the newest version.
libraspberrypi0 is already the newest version.
libraspberrypi0 set to manually installed.
raspberrypi-bootloader is already the newest version.
raspberrypi-kernel is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 67 not upgraded.
pi-per-view wrote: Never got the "Kevent 2" so far. What does it mean? Not enough free memory available?
I'm not sure, but given the name, I assume it's set if a buffer allocation fails due to lack of memory. If you grab yourself a kernel source tree, you can find the list of numbers that can appear in that error message defined at the end of struct usbnet in ./include/linux/usb/usbnet.h :

Code: Select all

#		define EVENT_TX_HALT	0
#		define EVENT_RX_HALT	1
#		define EVENT_RX_MEMORY	2
#		define EVENT_STS_SPLIT	3
#		define EVENT_LINK_RESET	4
#		define EVENT_RX_PAUSED	5
#		define EVENT_DEV_ASLEEP 6
#		define EVENT_DEV_OPEN	7
#		define EVENT_DEVICE_REPORT_IDLE	8
#		define EVENT_NO_RUNTIME_PM	9
#		define EVENT_RX_KILL	10
#		define EVENT_LINK_CHANGE	11
but I think I've only ever seen 0 on my Pi 3. The only places in the tree that call usbnet_defer_kevent(..., EVENT_TX_HALT) are in ./drivers/net/usb/usbnet.c
pi-per-view wrote: Makes sense. I've noticed that when I did a reboot after a "kevent 0" the pi would boot as though everything was OK when in fact eth0 wasn't really working despite both NIC LEDs being on. And yes, after restarting networking altogether it would *sometimes* work (not always) but some services like hostapd wouldn't work correctly and a reboot is quicker than restarting those daemons.
That's interesting. As I can't do a soft reboot -- the reboot binary having disappeared along with the rest of the root filesystem -- I have to powercycle it. That obviously hard-resets it...

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 7:00 pm

Just died again with vm.min_free_kbytes = 32768. Didn't think that'd help.

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Fri Oct 14, 2016 9:01 pm

dickon wrote:Just died again with vm.min_free_kbytes = 32768. Didn't think that'd help.
Too bad. Well it hasn't helped me either, at least not with the old power supply. Now with the official one it seems to be fine (thus far)... Since you're already using one of those and still get the error I wonder if it's something else or actually still power supply related? I once tested with a phone charger rated @ 2.1A and got the yellow flash symbol (i.e. undervoltage warning) in the upper right corner, several times during boot and it would also cause ethernet to fail. No idea if that had happened with the old power supply as well as I normally only use SSH to access the pi...

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Sat Oct 15, 2016 7:00 am

I had a 2A charger powering the thing for a while, and that didn't work out well. I've since discovered that the cable I was using was hopeless -- it won't charge my phone -- but I swapped it for the Foundation PSU and haven't seen the coloured blob since. It's been solid, no matter what I've done to it. Encoding, decoding, compiling, anything. Except the odd time when the ethernet gives up the ghost.

Bloody annoying.

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Sat Oct 15, 2016 9:02 pm

dickon wrote:Bloody annoying.
Indeed. I must say the Foundation power supply is working much better than my previous one, at least I haven't had a single "kevent 0" since I'm using it. HOWEVER: my pi just lost ALL network connectivity (wifi + eth) after ~52 hrs uptime. Dmesg revelead over 1000 of these:

Code: Select all

brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x3e
brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x36
Note the different flags. Got 184 times 0x3e and 1155 times 0x36. After restarting the network everything was back to normal, i.e. no reboot or hard reset even was necessary but it appears that now the system keeps on producing these messages every couple of seconds. Will see how long it takes until it fails again...

I have noticed those messages before (although there weren't as many, I think) but the last entry before ethernet went down has always been a "kevent 0". Also, I've never lost the wifi. Google doesn't really provide much useful information except that it seems to be firmware-related. See https://lists.openwrt.org/pipermail/ope ... 40518.html

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Sun Oct 16, 2016 3:11 pm

I've always seen one or two of the non-BCDC errors on boot, but never after that; I'd put that down to the Pi being able to see some of the other APs on the wifi network, and spanning tree kicking in. Wild guess, though; I don't even know if spanning tree works over wifi.

Currently, console has

Code: Select all

brcmfmac: brcmf_proto_bcdc_hdrpull: wlan0: non-BCDC packet received, flags 0x56
on it. I'll check if the flags change next reboot.

pi-per-view
Posts: 22
Joined: Wed Oct 12, 2016 11:38 am

Re: eth0: kevent 0 may have been dropped

Mon Oct 17, 2016 8:44 am

dickon wrote:I've always seen one or two of the non-BCDC errors on boot, but never after that; I'd put that down to the Pi being able to see some of the other APs on the wifi network, and spanning tree kicking in. Wild guess, though; I don't even know if spanning tree works over wifi.
I've disabled the spanning tree protocol, as suggested in some other thread - as you say, it may not even work over wifi. The non-BCDC errors seem to occur about every minute at first and then more and more frequently. Oh, and it's happened again: got a couple of "kevent 0" errors and had to reboot the pi which seems to be the only reliable (temporary) fix.
As it turns out, using the official Foundation power supply may improve things slightly but ultimately doesn't help in getting rid of the error... It still occurs, albeit less often - at least in my case - however, this might be just a coincidence. Something deep down in the USB driver and / or Broadcom firmware seems to be seriously buggy! By the way, what is your Broadcom firmware version? I just noticed this:

Code: Select all

 brcmfmac: brcmf_c_preinit_dcmds: Firmware version = wl0: May 27 2016 00:13:38 version 7.45.41.26 (r640327) FWID 01-df77e4a7
rpi-update gave me plenty of updates the past couple of weeks but apparently none for the network equipment...

User avatar
dickon
Posts: 1814
Joined: Sun Dec 09, 2012 3:54 pm
Location: Home, just outside Reading

Re: eth0: kevent 0 may have been dropped

Mon Oct 17, 2016 8:59 am

It crashed again shortly after midnight. Still seeing one non-BCDC with flags 0x56 on a reboot, and I've got the same firmware version.

Return to “Troubleshooting”