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

Martin Sustrik sustrik at 250bpm.com
Fri Jan 21 22:13:50 CET 2011


On 01/21/2011 08:21 PM, Zed Shaw wrote:

> ...
> 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
> ...

The periodic call to rt_sigprocmask seems strange, but let's assume it's 
called from within glibc rather than from 0mq itself.

As for the polls they can be invoked either from I/O thread handling the 
traffic on underlying sockets or in application thread (zmq_poll).

It would be useful to find out which one is the case you are seeing.

Martin



More information about the zeromq-dev mailing list