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

[freebsd] error: [Errno 55] No buffer space available #23196

Closed
cedwards opened this issue Apr 30, 2015 · 9 comments
Closed

[freebsd] error: [Errno 55] No buffer space available #23196

cedwards opened this issue Apr 30, 2015 · 9 comments
Assignees
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 RAET severity-high 2nd top severity, seen by most users, causes major problems
Milestone

Comments

@cedwards
Copy link
Contributor

I am trying to test the 2015.2.0 release (based on the current github tag for that version). I have met the packaging requirements, but when I try to activate the RAET transport I get the following error:

{minion,master}.d/transport.conf:

transport: raet
Traceback (most recent call last):
  File "/usr/local/bin/salt-call", line 9, in <module>
    load_entry_point('salt==2015.2.0', 'console_scripts', 'salt-call')()
  File "/usr/local/lib/python2.7/site-packages/salt/scripts.py", line 227, in salt_call
    client.run()
  File "/usr/local/lib/python2.7/site-packages/salt/cli/call.py", line 59, in run
    caller = salt.cli.caller.Caller.factory(self.config)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 71, in factory
    return RAETCaller(opts, **kwargs)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 282, in __init__
    self.stack = self._setup_caller_stack(opts)
  File "/usr/local/lib/python2.7/site-packages/salt/cli/caller.py", line 355, in _setup_caller_stack
    sockdirpath=sockdirpath)
  File "/usr/local/lib/python2.7/site-packages/raet/lane/stacking.py", line 77, in __init__
    **kwa)
  File "/usr/local/lib/python2.7/site-packages/raet/stacking.py", line 92, in __init__
    if not self.server.reopen():  # open socket
  File "/usr/local/lib/python2.7/site-packages/ioflo/base/nonblocking.py", line 495, in reopen
    return self.open()
  File "/usr/local/lib/python2.7/site-packages/ioflo/base/nonblocking.py", line 454, in open
    self.ss.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, self.bs)
  File "/usr/local/lib/python2.7/socket.py", line 224, in meth
    return getattr(self._sock,name)(*args)
error: [Errno 55] No buffer space available
@jfindlay jfindlay added Bug broken, incorrect, or confusing behavior severity-high 2nd top severity, seen by most users, causes major problems RAET P2 Priority 2 labels May 1, 2015
@jfindlay jfindlay added this to the Approved milestone May 1, 2015
@jfindlay
Copy link
Contributor

jfindlay commented May 1, 2015

@cedwards, thanks for the report.

@thatch45
Copy link
Member

thatch45 commented May 1, 2015

Is this on freebsd? Can you give me a version reporr?

@cedwards
Copy link
Contributor Author

cedwards commented May 1, 2015

Yes, this is FreeBSD 10.1. Below is the version report:

emma salt # salt --versions-report
           Salt: 2015.2.0
         Python: 2.7.9 (default, Apr  8 2015, 07:01:13)
         Jinja2: 2.7.3
       M2Crypto: 0.22
 msgpack-python: 0.4.2
   msgpack-pure: Not Installed
       pycrypto: 2.6.1
        libnacl: 1.4.0
         PyYAML: 3.11
          ioflo: 1.2.1
          PyZMQ: 14.5.0
           RAET: 0.6.3
            ZMQ: 4.0.5
           Mako: Not Installed

@thatch45
Copy link
Member

thatch45 commented May 4, 2015

@DmitryKuzmenko can you please take care of this one?

@DmitryKuzmenko
Copy link
Contributor

Got it.

@DmitryKuzmenko
Copy link
Contributor

@cedwards I'll investigate this issue, but it would take time. Meanwhile you can try workaround it by increasing OS UDP buffer size to 64MB as suggested in #16502. In FreeBSD it could be done by

sysctl -w kern.ipc.maxsockbuf=67108864

for immediate update and by adding the following to the /etc/sysctl.conf:

kern.ipc.maxsockbuf=67108864

@DmitryKuzmenko
Copy link
Contributor

The issue is in the following. By default max socket buffer size is set to 2MB in FreeBSD. But RAET uses 6.5 MB for LaneStack (uxd socket) in it's default configuration. So there are two ways to resolve the issue:

  • Increase the system buffer that is recommended.
  • Decrease the default values.

For the second solution I've added ability to change raet buffer size in salt config (master and minion). The following keys will be accessible to define it (default values are 100 for lane and 2 for road):

raet_lane_bufcnt: 20
raet_road_bufcnt: 2

Risk: decreasing of the buffers count could produce more system calls on the sender side under highload that would decrease performance.

@DmitryKuzmenko DmitryKuzmenko added fixed-pls-verify fix is linked, bug author to confirm fix Confirmed Salt engineer has confirmed bug/feature - often including a MCVE labels May 22, 2015
@jfindlay jfindlay added the Core relates to code central or existential to Salt label May 26, 2015
@rallytime
Copy link
Contributor

@cedwards Did the PR above resolve this issue for you?

@rallytime
Copy link
Contributor

This looks resolved to me. Since we didn't hear back yet, I am going to close this. If the problem remains, certainly let us know and we will be happy to take another look! :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug broken, incorrect, or confusing behavior Confirmed Salt engineer has confirmed bug/feature - often including a MCVE Core relates to code central or existential to Salt fixed-pls-verify fix is linked, bug author to confirm fix P2 Priority 2 RAET severity-high 2nd top severity, seen by most users, causes major problems
Projects
None yet
Development

No branches or pull requests

5 participants