Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Grant Edwards <grant.b.edwards@gmail.com>
To: buildroot@busybox.net
Subject: [Buildroot] Slow SNMP daemon startup
Date: Tue, 15 Dec 2020 16:55:06 -0000 (UTC)	[thread overview]
Message-ID: <rrappa$9o9$1@ciao.gmane.io> (raw)
In-Reply-To: rramin$k2f$1@ciao.gmane.io

On 2020-12-15, Grant Edwards <grant.b.edwards@gmail.com> wrote:
> On 2020-12-15, Grant Edwards <grant.b.edwards@gmail.com> wrote:

>> After upgrading from an older version of net-snmp (5.7.3 -> 5.8) it
>> now takes the snmp daemon anywhere from 5s to a minute to start up.

If there's no network traffic, it can take _several_minutes_ for snmpd
to start. This makes one suspect a lack of entropy, and strace
confirms that:

 00:00:09 gettimeofday({9, 266859}, NULL) = 0
 00:00:09 futex(0x4044bc3c, FUTEX_WAKE_PRIVATE, 2147483647) = 0
 00:00:09 getrandom(0x3f830, 32, 0)      = -1 ENOSYS (Function not implemented)
 00:00:09 shmget(0x72, 1, 000)           = -1 ENOENT (No such file or directory)
 00:00:09 uname({sysname="Linux", nodename="grant-eip-4", ...}) = 0
 00:00:09 open("/dev/random", O_RDONLY|O_LARGEFILE) = 9
 00:00:09 _newselect(10, [9], NULL, NULL, NULL) = 1 (in [9])
 00:01:23 close(9)                       = 0
 00:01:23 shmget(0x72, 1, IPC_CREAT|0444) = 0
 00:01:23 shmat(0, NULL, SHM_RDONLY)     = 0x4000a000
 00:01:23 open("/dev/urandom", O_RDONLY|O_LARGEFILE) = 9
 00:01:23 fstat64(9, {st_mode=S_IFCHR|0660, st_rdev=makedev(1, 9), ...}) = 0
 00:01:23 read(9, "\330\3311\376\346\213\362\5Ib\365\347*BS\354\351\375\t<\346\310\24C\254\365h\330-.\372\230", 32) = 32
 00:01:23 gettimeofday({83, 792926}, NULL) = 0

Why do application developers consider this acceptable behavior?

--
Grant

      reply	other threads:[~2020-12-15 16:55 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-12-15 15:52 [Buildroot] Slow SNMP daemon startup Grant Edwards
2020-12-15 16:00 ` Grant Edwards
2020-12-15 16:55   ` Grant Edwards [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='rrappa$9o9$1@ciao.gmane.io' \
    --to=grant.b.edwards@gmail.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox