Project

General

Profile

Actions

Bug #2028

closed

hylafax uses 100% cpu in a select() loop

Added by ftigeot over 13 years ago. Updated about 13 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
-
Target version:
-
Start date:
Due date:
% Done:

0%

Estimated time:

Description

On DragonFly-2.8 and 2.9 systems, the faxgetty process from comms/hylafax uses
100% cpu without any reason.

  1. top -n 1
    load averages: 1.11, 1.13, 0.95; up 0+00:30:47 22:33:38
    CPU states: 0.0% user, 0.0% nice, 0.8% system, 0.0% interrupt, 99.2% idle

    PID USERNAME NICE SIZE PRES STATE CPU TIME CTIME CPU COMMAND
    871 root 0 14M 108K RUN 1 29:08 29:08 97.61% faxgetty

faxgetty listens on /dev/ttyd0 for incoming faxes and should be idle when there
is no fax activity.

List of open files:

  1. fstat p 871
    USER CMD PID FD PATH INUM MODE SZ|DV R/W
    uucp faxgetty 871 root / ?(1c) -
    uucp faxgetty 871 wd /var/spool/hylafax ?(1c) -
    uucp faxgetty 871 text /usr/pkg/libexec/faxgetty ?(1c) -
    uucp faxgetty 871 0 /dev/null 669 crw-rw-rw
    #C0:0x2 rw
    uucp faxgetty 871 1 /dev/null 669 crw-rw-rw- #C0:0x2 rw
    uucp faxgetty 871 2 /dev/null 669 crw-rw-rw- #C0:0x2 rw
    uucp faxgetty 871 3 /var/spool/hylafax/status/ttyd0 ?(1c)
    uucp faxgetty 871 4 /var/spool/hylafax/FIFO.ttyd0 ?(1c) -
    uucp faxgetty 871 5 /var/spool/hylafax/FIFO ?(1c) -
    uucp faxgetty 871 6* local dgram ffffffe04303cbc0 <
    > ffffffe019b25ef0
    uucp faxgetty 871 7 /dev/ttyd0 1267 crw------- devctl rw

I tried to investigate what it was doing with ktrace:

  1. ktrace -t c -p 871
  2. ktrace -C
  3. kdump -R

This pattern was constantly repeating:

871 faxgetty 0.000010 CALL
select(0x8,0x7ffffffff8b0,0x7ffffffff830,0x7ffffffff7b0,0x595c80)
871 faxgetty 0.000017 RET select 1
871 faxgetty 0.000012 CALL gettimeofday(0x7ffffffff6c0,0)
871 faxgetty 0.000011 RET gettimeofday 0
871 faxgetty 0.000011 CALL read(0x4,0x7fffffffeee0,0x7ff)
871 faxgetty 0.000013 RET read 0
871 faxgetty 0.000011 CALL gettimeofday(0x7ffffffff700,0)
871 faxgetty 0.000011 RET gettimeofday 0
871 faxgetty 0.000011 CALL gettimeofday(0x7ffffffff6c0,0)
871 faxgetty 0.000012 RET gettimeofday 0
Actions #1

Updated by ftigeot about 13 years ago

Fixed in commit 010f86dc1259be3b29303bfc336532138acd077d by Sepherosa Ziehau

Many Thanks Sephe !

Actions

Also available in: Atom PDF