[nsd-users] nsd 4.0 EAGAIN loop in sendmmsg(2)

W.C.A. Wijngaards wouter at nlnetlabs.nl
Fri Nov 29 09:49:56 UTC 2013


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi Dustin,

The NetBSD sendmmsg implementation must be completely new.  Does the
kernel really implement this system call, kernel bugs, or does EAGAIN
really mean 'not yet implemented'?  NSD simply calls sendmmsg, looks
how many packets have been sent, and then tries again to send the
remaining packets from the list.  The OS could (conceivably) return 1
every time and simply do its one-packet-send function every time, and
never return EAGAIN (sendto does not give NSD EAGAIN when called
packet-by-packet).

The configure option --disable-recvmmsg can be used to disable the
sendmmsg and recvmmsg calls at compile time.

I thought NSD implements the sendmmsg calls 'right', but if somehow it
is wrong, I would like to fix that.

Best regards, Wouter

On 11/29/2013 01:29 AM, Dustin Marquess wrote:
> On NetBSD 6.99.28-CURRENT, nsd 3.2.16 works fine, however nsd 4.0.0
> is spinning chewing CPU.  The logs show:
> 
> Nov 28 23:07:00 xxx nsd[466]: sendmmsg failed: Resource
> temporarily unavailable
> 
> ktruss shows it getting EAGAIN from sendmmsg(2) over and over
> again. According to the man page:
> 
> [EAGAIN|EWOULDBLOCK] The socket is marked non-blocking and the
> requested operation would block.
> 
> Sounds like it's blocking when it shouldn't?
> 
> -Dustin
> 
> 
> _______________________________________________ nsd-users mailing
> list nsd-users at NLnetLabs.nl 
> http://open.nlnetlabs.nl/mailman/listinfo/nsd-users
> 

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.15 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://www.enigmail.net/

iQIcBAEBAgAGBQJSmGNEAAoJEJ9vHC1+BF+NTWcP/j4KPu3X7YigGw5zlGyh2JPW
5W0USzaxVGuE+PUtuFDRO710X0Z+OiKdmQLlNXVxSYMGmAUFx56ORZPnSjNIrWWi
UsASG+1U0wMptbIAftum2P2/RghtbqTcRbeMv7dr7xwpJ7KP+eHgb4bxk//F9A6U
L7zncaC24rHsxGZcSoXDwZ6lsKT20XEXYR/gEldvsqTasjxn1IDEkQ8MpUjTrmfL
fF1PZ9s9I+od3oCuxSR4egLP/ARTDP9jrkN+1/VVZUBKF+RWVOayFPOLWd73og7+
nD08ShYYN3tc40Z/3r3cJvm/VuQ56+NzW97dXHvGsV2Z5cSnwB24IQXWhpEHxhnn
U2oK+kV9EtI/bj9VWjsoJBJgBuSXKbrt1agj6GhUkLiSFBpLN4+EIiAOkJcEtguv
BO6VeSI5sKfe8zeBL7qLZb595l7/saXMo/scSbr4ikjy2Bxy3QeQ9ONgBjjOxY1n
4RV1PwBxoVMrRa5JLdfpsq0ThJ/N7cqtx1J9a6ZddkYndK917JBLxc/DeJxfwukb
KjBnjSmIdymST3431FUzbyUp46X2Br1Ro9SyfGG6wcTVl3+xRoYm1/BCtzZDwvh2
+Yz2KKkXx+f0BZ/a/Eb7IY7z4QPQoOybL1KyTo3WBQ7+RHcPqNxt1v1tQkruhdQu
nSQBKr1ctoxTsqjAWp5R
=hO5t
-----END PGP SIGNATURE-----



More information about the nsd-users mailing list