NetBSD Problem Report #48862
From www@NetBSD.org Sun Jun 1 20:11:21 2014
Return-Path: <www@NetBSD.org>
Received: from mail.netbsd.org (mail.netbsd.org [149.20.53.66])
(using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits))
(Client CN "mail.netbsd.org", Issuer "Postmaster NetBSD.org" (verified OK))
by mollari.NetBSD.org (Postfix) with ESMTPS id 26D17A651F
for <gnats-bugs@gnats.NetBSD.org>; Sun, 1 Jun 2014 20:11:21 +0000 (UTC)
Message-Id: <20140601201119.B95CEA6524@mollari.NetBSD.org>
Date: Sun, 1 Jun 2014 20:11:19 +0000 (UTC)
From: lars@gustik.eu
Reply-To: lars@gustik.eu
To: gnats-bugs@NetBSD.org
Subject: Asterisk goes to 100% CPU load when dnsmgr is active
X-Send-Pr-Version: www-1.0
>Number: 48862
>Category: pkg
>Synopsis: Asterisk goes to 100% CPU load when dnsmgr is active
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: jnemeth
>State: suspended
>Class: sw-bug
>Submitter-Id: net
>Arrival-Date: Sun Jun 01 20:15:00 +0000 2014
>Closed-Date:
>Last-Modified: Fri Feb 20 06:36:26 +0000 2015
>Originator: Lars Schotte
>Release: 6.1.4
>Organization:
>Environment:
NetBSD dyno 6.1.4 NetBSD 6.1.4 (GENERIC) amd64
>Description:
When I turn on dnsmgr in dnsmgr.conf to asterisk, then asterisk goes crazy and eats up all CPU.
The machine is not bare-metal, it is a KVM virtualized with VirtIO drivers, so maybe it is some timing problem, but I would not rely on that.
It is possible that this bug is reporduceable on real hardware as well.
I have several machines running Asterisk, on MIPS routers and on ARM devices, and dnsmgr works there well. So I suppose it may be a NetBSD specific problem.
Apart from eating up 100% CPU time, it actually works. So the issue looks to me something like busy waiting.
>How-To-Repeat:
When I turn on dnsmgr in dnsmgr.conf to asterisk, then asterisk goes crazy and eats up all CPU.
>Fix:
Never turn on dnsmgr in dnsmgr.conf to asterisk, it's the default anyway.
But when someone needs this, for example when some peers are behind dynamic IPv4 addresses and are not configured to register, instead they just use dyndns service and connection works, because port forwarding is set properly, then one would loose a functionality.
>Release-Note:
>Audit-Trail:
From: Lars Schotte <lars@gustik.eu>
To: gnats-bugs@NetBSD.org
Cc:
Subject: Re: port-amd64/48862: Asterisk goes to 100% CPU load when dnsmgr is
active
Date: Sun, 1 Jun 2014 22:46:51 +0200
I just tested it on NetBSD-5 to rule out 64-bit time_t, no,
NetBSD-5 shows the same problem, goes to 100% right after enabeling
dnsmgr as well.
On Sun, 1 Jun 2014 20:15:00 +0000 (UTC)
lars@gustik.eu wrote:
> >Number: 48862
> >Category: port-amd64
> >Synopsis: Asterisk goes to 100% CPU load when dnsmgr is active
> >Confidential: no
> >Severity: serious
> >Priority: medium
> >Responsible: port-amd64-maintainer
> >State: open
> >Class: sw-bug
> >Submitter-Id: net
> >Arrival-Date: Sun Jun 01 20:15:00 +0000 2014
> >Originator: Lars Schotte
> >Release: 6.1.4
> >Organization:
> >Environment:
> NetBSD dyno 6.1.4 NetBSD 6.1.4 (GENERIC) amd64
> >Description:
> When I turn on dnsmgr in dnsmgr.conf to asterisk, then asterisk goes
> crazy and eats up all CPU. The machine is not bare-metal, it is a KVM
> virtualized with VirtIO drivers, so maybe it is some timing problem,
> but I would not rely on that. It is possible that this bug is
> reporduceable on real hardware as well. I have several machines
> running Asterisk, on MIPS routers and on ARM devices, and dnsmgr
> works there well. So I suppose it may be a NetBSD specific problem.
> Apart from eating up 100% CPU time, it actually works. So the issue
> looks to me something like busy waiting.
> >How-To-Repeat:
> When I turn on dnsmgr in dnsmgr.conf to asterisk, then asterisk goes
> crazy and eats up all CPU.
> >Fix:
> Never turn on dnsmgr in dnsmgr.conf to asterisk, it's the default
> anyway. But when someone needs this, for example when some peers are
> behind dynamic IPv4 addresses and are not configured to register,
> instead they just use dyndns service and connection works, because
> port forwarding is set properly, then one would loose a functionality.
>
--
Lars Schotte @ hana.gusto
Linux 3.14.4-200.fc20.x86_64
Claws Mail version 3.10.0
Responsible-Changed-From-To: port-amd64-maintainer->pkg-manager
Responsible-Changed-By: martin@NetBSD.org
Responsible-Changed-When: Mon, 02 Jun 2014 06:06:41 +0000
Responsible-Changed-Why:
Asterisk is not in the base system
Responsible-Changed-From-To: pkg-manager->jnemeth
Responsible-Changed-By: obache@NetBSD.org
Responsible-Changed-When: Fri, 18 Jul 2014 08:36:17 +0000
Responsible-Changed-Why:
Over to OWNER of asterisk packages.
State-Changed-From-To: open->suspended
State-Changed-By: jnemeth@NetBSD.org
State-Changed-When: Fri, 20 Feb 2015 06:36:26 +0000
State-Changed-Why:
The problem is due to not having a good timing source for Asterisk in NetBSD.
This is not a simple problem to solve. The ideal methods would be to port
DAHDI (which is a major project) or implement timerfd, which doesn't seem
to be a very popular idea.
>Unformatted:
(Contact us)
$NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2014
The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.