26

I had an intermittent issue (which resolves itself spontaneously, after using a different connection for a while) that caused Internet requests to fail, with one particular wireless network. After about 5 requests after associating with an AP, ping would report the error

ping: sendmsg: No buffer space available

just as in Wifi connected but no data transfer: "ping: sendmsg: No buffer space available".

In case it's relevant, I'm seeing with a Centrino Ultimate-N 6300 [8086:4238] wireless interface on a Thinkpad X201. Bug #836250 is possibly related.

While I can work around this issue, I was wondering: What does this error message mean? In particular, what buffer is it talking about?

Zanna
  • 70,465
  • i don't know if it helps but i found a similar issue here: http://forums.opensuse.org/archives/sls-archives/archives-suse-linux/archives-network-security/373294-ping-sendmsg-no-buffer-space-available-solved.html or http://www.linuxquestions.org/questions/linux-networking-3/sendmsg-no-buffer-space-available-334631/ – an_AVERAGE_linux_guy Apr 12 '13 at 19:14
  • @an_AVERAGE_linux_guy both are interesting but do not say what it means ;) – Rinzwind Apr 12 '13 at 19:24
  • I'm getting those on a CentOS instance in Azure. WTF? – David Tonhofer Jan 18 '19 at 11:26
  • By the hideous laughter of Kek, it turns out that having a mistyped FQDN in /etc/hostname in an Azure VM causes the network interface to behave as if it was a bad Wifi link. I have been in the "industry" for some time but it's getting more interesting every day. – David Tonhofer Jan 19 '19 at 11:11
  • In 2023 having a modern router and ridiculous "212992" value in /proc/sys/net/core/wmem_max easily triggers this error even in a healthy laptop just during the usual apt update && apt upgrade. And all these answers with 'disabling 5G' or 'putting you router in 802.11 b/g only mode'... Seriously? Go back to 2005 just because some ubuntu developers are there? – avtomaton Apr 20 '23 at 13:12

6 Answers6

11

It means you reached a maximum value for a system parameter. Probably /proc/sys/net/core/wmem_max (but this might need some investigating on a system that shows this error). This setting is the maximum amount "receive socket memory".

It is likely that the cause is a broken NIC -or- a NIC that is not 100% supported if the system is not stressed out. Broadcom bcm4313 is one that seems to show this error.


In case anyone wants to know: the file where these are stored is /etc/sysctl.conf and you can alter them from a root(!) prompt. Some examples can be found here (also includes the parameter shown at the beginning of this answer). But this should only be done if replacing the NIC itself does not solve it.

Rinzwind
  • 299,756
4

I got the same issue with my laptop DELL XPS using Linux 5.3.0-42 Ubuntu 18.04.3 LTS. Using ping 8.8.8.8 I get the following error:

ping: sendmsg: No buffer space available

Several sources online suggest to increase the wmem_max using:

echo 83886080 | sudo tee /proc/sys/net/core/wmem_max

But I didn't solve with this, after a while I just changed the Wireless mode in my router into

802.11 b/g/n mixed

Moreover, I disabled the 5 GHz in the router, probably it is overcharged.

All of this fixed my issue.

EDIT: alternatively, if you do not want to disable 5G you can set from the wifi configuration the related wifi channel between 5G or 2.4G, just go to Wifi network settings, select your network and in the "identity" tab change the BSSID, there you should find 2 BSSID one is the 2.4GHZ and the other one is 5G.

  • 1
    I'm using the XPS, linux 5.4.0-60-generic, the 5.0 GHz option is disabled on my router and my wlan card is working at 2.5 GHz. I get this problem when using bluetooth earphones and wifi concurrently. Go figure. – Tomislav Nakic-Alfirevic Jan 19 '21 at 21:40
2

Chances are it's a problem with the driver or the hardware itself. It can be temporarily fixed by taking the interface up/down. Basically the output queue is full and unless you are handling some major network traffic or have a ton of hosts on the network you shouldn't see that error, and if you were, you could probably tweak some kernel values to prevent the error.

Bert
  • 3,225
  • 1
  • 14
  • 12
1

I found that this message could be caused by a faulty network equipment somewhere on the local network, not necessarily on your computer.

For example, I got this message on my Ubuntu 20.04 when pinging local router at 192.168.1.1. In the mean time the internet traffic was interrupted when the message was present.

$ ping 192.168.1.1
...
64 bytes from 192.168.1.1: icmp_seq=216 ttl=64 time=0.295 ms
64 bytes from 192.168.1.1: icmp_seq=217 ttl=64 time=0.350 ms
ping: sendmsg: No buffer space available
ping: sendmsg: No buffer space available
...
$ ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
From 192.168.1.8 icmp_seq=10 Destination Host Unreachable
...

The problem was resolved immediately by unplugging ATZEBE USB3 expansion hub used for another laptop computer from the Ethernet port on the same network switch (TP-Link) where my Ubuntu machine was plugged in. The laptop was off in the mean time. I was able to replicate the problem a few times. The problem reappeared a minute or so after I plugget the ATZEBE in again. The router has many other devices in it, but only removing the ATZEBE was the one that resolved the problem. Otherwise, the Ethernet switch might also be a suspect.

As pointed out earlier, the message is about a system parameter. You could read with:

$ cat /proc/sys/net/core/wmem_max
212992

As the value is quite large for a simple ping, I suspect that either the faulty hardware is spamming the network and overflowing the buffer, or the system is handling a problem situation with a misleading message.

elomage
  • 1,400
1

I had a similar problem with a 3g modem (USB modem). When using a different modem, same brand, the problem disappeared. Whenever I used the defective modem it worked for a while then started to fail with same symptoms, after few days the modem broke completely, I finally replace it, and the problem solved completely.

ulitosCoder
  • 141
  • 1
  • 4
0

Just to add that I have the same problem on a Lenovo Yoga520 with Ubuntu 20.04. As with https://askubuntu.com/users/1053352/stefano-borz%c3%ac, I effectively turned of 5 GHz in the router, and it seems to have fixed this. (I split the channels, so 5GHz is still available for other devices.)

bjohas
  • 513