Project

General

Profile

Actions

Bug #948

closed

netstat patch

Added by jschauma almost 17 years ago. Updated about 12 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

Hello,

There is a bug in netstat(1) that can cause it to spin out of control
and eat up all CPU. This has been reported in FreeBSD and NetBSD and
I've also seen reports of the same problem in Mac OS X, so it stands to
reason this might affect DragonFlyBSD as well.

John Baldwin fixed this in FreeBSD:
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/netstat/route.c.diff?r1=1.87;r2=1.88

"Make netstat rn more resilient to having the routing table change out
from
under it while running. Note that this is still not perfect:
Try to do something intelligent if kvm_read() fails to read a routing
table structure such as an rtentry, radix_node, or ifnet.
- Don't follow left and right node pointers in radix_nodes unless
RNF_ACTIVE is set in rn_flags. This avoids walking through freed
radix_nodes."

The NetBSD error report is at
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=36195

-Jan

Actions #1

Updated by gstanley over 16 years ago

Does this bug effect you, or have you encountered this bug on Dfly?

Actions #2

Updated by jschauma over 16 years ago

Gary Stanley <> wrote:

I don't use DragonFlyBSD, so it has not affected me. I just filed the
bug based on the assumption that all BSDs were affected. If you
conclude that Dfly is not affected, feel free to close this.

-Jan

Actions #3

Updated by sepherosa over 15 years ago

Grab. The patch looks good.

Actions #4

Updated by marino about 12 years ago

  • Description updated (diff)
  • Assignee set to sepherosa

Sephe, I don't think this patch was ever incorporated. I looked in gitweb.
Is this still valid?

Actions #5

Updated by sepherosa about 12 years ago

On Thu, Nov 15, 2012 at 10:28 PM, John Marino via Redmine
<> wrote:

Issue #948 has been updated by John Marino.

Description updated
Assignee set to Sepherosa Ziehau

Sephe, I don't think this patch was ever incorporated. I looked in gitweb.
Is this still valid?

Patch committed:
0e23ab10e5db9a505c79ad0f5972c2740ddd3341

----------------------------------------
Bug #948: netstat patch
http://bugs.dragonflybsd.org/issues/948

Author: Jan Schaumann
Status: New
Priority: Normal
Assignee: Sepherosa Ziehau
Category:
Target version:

Hello,

There is a bug in netstat(1) that can cause it to spin out of control
and eat up all CPU. This has been reported in FreeBSD and NetBSD and
I've also seen reports of the same problem in Mac OS X, so it stands to
reason this might affect DragonFlyBSD as well.

John Baldwin fixed this in FreeBSD:
http://www.freebsd.org/cgi/cvsweb.cgi/src/usr.bin/netstat/route.c.diff?r1=1.87;r2=1.88

"Make netstat rn more resilient to having the routing table change out
from
under it while running. Note that this is still not perfect:
Try to do something intelligent if kvm_read() fails to read a routing
table structure such as an rtentry, radix_node, or ifnet.
- Don't follow left and right node pointers in radix_nodes unless
RNF_ACTIVE is set in rn_flags. This avoids walking through freed
radix_nodes."

The NetBSD error report is at
http://www.netbsd.org/cgi-bin/query-pr-single.pl?number=36195

-Jan

--
You have received this notification because you have either subscribed to it, or are involved in it.
To change your notification preferences, please click here: http://bugs.dragonflybsd.org/my/account

--
Tomorrow Will Never Die

Actions #6

Updated by marino about 12 years ago

  • Status changed from New to Closed
Actions

Also available in: Atom PDF