[zeromq-dev] Strace dump from a ZeroMQ CPU Freak Out

Zed Shaw zed.shaw at gmail.com
Fri Jan 21 20:21:07 CET 2011


Hi Everyone,

I had been receiving reports of Mongrel2 still pegging the CPU at
random times but I couldn't get a trace from any body.

Today my Mongrel2 server at zedshaw.com hit 100% CPU and I was able to
strace it and see that it's the same fast loop in zeromq_poll as I've
reported in the past:

...
rt_sigprocmask(SIG_SETMASK, [], [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], [], 8)  = 0
gettimeofday({1295636938, 117782}, NULL) = 0
poll([{fd=1991, events=POLLIN}, {fd=202, events=POLLIN}, {fd=491,
events=POLLIN}, {fd=148, events=POLLIN}, {fd=84, events=POLLIN},
{fd=195, events=POLLIN}, {fd=681, events=POLLIN}, {fd=222,
events=POLLIN}, {fd=1684, events=POLLIN}, {fd=778, events=POLLIN},
{fd=94, events=POLLIN}, {fd=964, events=POLLIN}, {fd=325,
events=POLLIN}, {fd=224, events=POLLIN}, {fd=219, events=POLLIN},
{fd=188, events=POLLIN}, {fd=158, events=POLLIN}, {fd=182,
events=POLLIN}, {fd=154, events=POLLIN}, {fd=51, events=POLLIN},
{fd=93, events=POLLIN}, {fd=157, events=POLLIN}, {fd=221,
events=POLLIN}, {fd=425, events=POLLIN}, {fd=262, events=POLLIN},
{fd=190, events=POLLIN}, {fd=220, events=POLLIN}, {fd=191,
events=POLLIN}, {fd=1399, events=POLLIN}, {fd=189, events=POLLIN},
{fd=192, events=POLLIN}, {fd=89, events=POLLIN}, ...], 2536, 0) = 17
([...])
gettimeofday({1295636938, 127782}, NULL) = 0
rt_sigprocmask(SIG_SETMASK, [], [], 8)  = 0
rt_sigprocmask(SIG_SETMASK, [], [], 8)  = 0
...

>From what I can tell this being run inside zeromq_poll but not
returning to my code, but I'll double check that I'm actually getting
this behavior later today.

This is with the latest 2.0.10 zeromq and with threads set to 1.  Any
pointers people might have to debugging this would really help.
Thanks.

Zed



More information about the zeromq-dev mailing list