netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory
Hiroki Sato
hrs at FreeBSD.org
Fri Feb 21 09:22:18 UTC 2014
Ian FREISLICH <ianf at clue.co.za> wrote
in <E1WGltZ-0000kf-1A at clue.co.za>:
ia> Hiroki Sato wrote:
ia> > ia> While recieving my routing table I used to be able to check how far
ia> > ia> it got by counting the output netstat -rn. It takes about 2 seconds
ia> > ia> to recieve the routes from my route-server, but over a minute to
ia> > ia> update the kernel routing table.
ia> > ia>
ia> > ia> I'm now getting this error until zebra completes route insertion.
ia> > ia>
ia> > ia> [firewall1.jnb1] ~ $ netstat -rn |wc -l
ia> > ia> netstat: sysctl: net.route.0.0.dump.0: Cannot allocate memory
ia> > ia> 1
ia> > ia> [firewall1.jnb1] ~ $ netstat -rn |wc -l
ia> > ia> 480446
ia> >
ia> > Perhaps does the attached patch fix this?
ia>
ia> Sadly, not.
Hm, how about the attached one?
I think the cause is just a race when length of the sysctl's output
is changed in kernel after the buffer allocation in userspace, not
memory shortage. Size of the routing table can quickly change.
-- Hiroki
-------------- next part --------------
A non-text attachment was scrubbed...
Name: netstat-1.diff
Type: text/x-patch
Size: 1737 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20140221/2d9c9ee4/attachment.bin>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 181 bytes
Desc: not available
URL: <http://lists.freebsd.org/pipermail/freebsd-current/attachments/20140221/2d9c9ee4/attachment.sig>
More information about the freebsd-current
mailing list