Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pipe read returning EAGAIN



In article <20160207142357.GA5479%asim.lip6.fr@localhost>,
Manuel Bouyer  <bouyer%antioche.eu.org@localhost> wrote:
>Hello,
>I just upgraded a i386 server from netbsd-5 to netbsd-7, and notice that
>some processes are using a lot of CPU time.
>ktrace shows that such process are in a tight read(2) loop.
>Below is an example with nagios but I've seen it with arpwatch too.
>netadmin:/tmp#ktrace -p 19040
>netadmin:/tmp#fstat -p 19040
>USER     CMD          PID   FD MOUNT       INUM MODE         SZ|DV R/W
>nagios   nagios     19040   wd /tmp           2 drwxrwxrwt    1024 r
>nagios   nagios     19040    0 /          63064 crw-rw-rw-    null r
>nagios   nagios     19040    1 /          63064 crw-rw-rw-    null w
>nagios   nagios     19040    2 /          63064 crw-rw-rw-    null w
>nagios   nagios     19040    3* unix stream  <->
>/var/spool/nagios/rw/nagios.qh [using]
>nagios   nagios     19040    4* pipe 0xc8298190 <- 0xc8f08c18 rn
>nagios   nagios     19040    6* pipe 0xc8f1d91c <- 0xc8299310 rn
>netadmin:/tmp#ktrace -C
>netadmin:/tmp#kdump |tail
> 19040      1 nagios   CALL  read(4,0xbf7fd4e0,0x1000)
> 19040      1 nagios   RET   read -1 errno 35 Resource temporarily unavailable
> 19040      1 nagios   CALL  read(4,0xbf7fd4e0,0x1000)
> 19040      1 nagios   RET   read -1 errno 35 Resource temporarily unavailable
> 19040      1 nagios   CALL  read(4,0xbf7fd4e0,0x1000)
> 19040      1 nagios   RET   read -1 errno 35 Resource temporarily unavailable
> 19040      1 nagios   CALL  read(4,0xbf7fd4e0,0x1000)
> 19040      1 nagios   RET   read -1 errno 35 Resource temporarily unavailable
> 19040      1 nagios   CALL  read(4,0xbf7fd4e0,0x1000)
> 19040      1 nagios   RET   read -1 errno 35 Resource temporarily unavailable
>
>
>It looks like the read(2) syscall returns a EAGAIN when the caller
>expect it to block if there's no data available.
>
>Has anyone else seen this, or has an idea where to look ?

Yes, someone else complained about pflogd.

christos



Home | Main Index | Thread Index | Old Index