Current-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
pipe read returning EAGAIN
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 ?
--
Manuel Bouyer <bouyer%antioche.eu.org@localhost>
NetBSD: 26 ans d'experience feront toujours la difference
--
Home |
Main Index |
Thread Index |
Old Index