kern/183717: High CPU Utilization on HylaFAX processes

Chunping Ruan ruanchunping at
Wed Nov 6 14:30:00 UTC 2013

>Number:         183717
>Category:       kern
>Synopsis:       High CPU Utilization on HylaFAX processes
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-bugs
>State:          open
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Nov 06 14:30:00 UTC 2013
>Originator:     Chunping Ruan
>Release:        stable/10
Malmam Ltd.
FreeBSD dev.******.com 10.0-BETA2 FreeBSD 10.0-BETA2 #0 r257377: Thu Oct 31 07:47:49 CST 2013     root at dev.******.com:/usr/obj/usr/src/sys/GENERIC_PF_ALTQ  amd64
The problem is the same as kern/166071 described.

The box is installed 9.1-RELEASE,and updated to stable/10 with custom kernel(add PF_ALTQ support).

Install hylafax from posts.

$ pkg info|grep hylafax
hylafax-6.0.6                  Fax software

faxgetty and faxq cost too many cpu load.(>70% system.)
and can't receive or send fax.

$ ps -auxww|grep faxq
uucp    63466 63.1  0.1  35224   2836  -  Rs    2:55PM   25:19.28 /usr/local/sbin/faxq
$ sudo ktrace -t c -p 63466
$ sudo ktrace -C
$ sudo kdump -R
 63466 faxq     1383636856.659275 CALL  read(0x4,0x7fffffffcfa0,0x7ff)
 63466 faxq     0.000257 RET   read 0
 63466 faxq     0.000055 CALL  select(0x5,0x7fffffffd950,0x7fffffffd8d0,0x7fffffffd850,0)
 63466 faxq     0.000031 RET   select 1
 63466 faxq     0.000026 CALL  read(0x4,0x7fffffffcfa0,0x7ff)
 63466 faxq     0.000024 RET   read 0
 63466 faxq     0.000041 CALL  select(0x5,0x7fffffffd950,0x7fffffffd8d0,0x7fffffffd850,0)
 63466 faxq     0.000027 RET   select 1
 63466 faxq     0.000025 CALL  read(0x4,0x7fffffffcfa0,0x7ff)
 63466 faxq     0.000024 RET   read 0
 63466 faxq     0.000022 CALL  select(0x5,0x7fffffffd950,0x7fffffffd8d0,0x7fffffffd850,0)
 63466 faxq     0.000023 RET   select 1
 63466 faxq     0.000037 CALL  read(0x4,0x7fffffffcfa0,0x7ff)
 63466 faxq     0.000025 RET   read 0
 63466 faxq     0.000024 CALL  select(0x5,0x7fffffffd950,0x7fffffffd8d0,0x7fffffffd850,0)
 63466 faxq     0.000024 RET   select 1
 63466 faxq     0.000023 CALL  read(0x4,0x7fffffffcfa0,0x7ff)
 63466 faxq     0.000023 RET   read 0
 ========== more ===========

and , the /var/spool/hylafax/ is on zfs 
$ mount
zroot on / (zfs, local, nfsv4acls)
devfs on /dev (devfs, local, multilabel)
zroot/data on /data (zfs, NFS exported, local, nfsv4acls)
zroot/data/ftp on /data/ftp (zfs, NFS exported, local, noatime, nfsv4acls)
zroot/data/mysql on /data/mysql (zfs, local, nfsv4acls)
zroot/home on /home (zfs, local, nfsv4acls)
zroot/tmp on /tmp (zfs, local, nfsv4acls)
zroot/usr on /usr (zfs, local, nfsv4acls)
zroot/var on /var (zfs, local, nfsv4acls)

$ zfs get all zroot/var
NAME       PROPERTY              VALUE                  SOURCE
zroot/var  type                  filesystem             -
zroot/var  creation              Wed Oct 30 22:42 2013  -
zroot/var  used                  2.16G                  -
zroot/var  available             410G                   -
zroot/var  referenced            1.84G                  -
zroot/var  compressratio         1.00x                  -
zroot/var  mounted               yes                    -
zroot/var  quota                 none                   default
zroot/var  reservation           none                   default
zroot/var  recordsize            128K                   default
zroot/var  mountpoint            /var                   local
zroot/var  sharenfs              off                    default
zroot/var  checksum              on                     default
zroot/var  compression           off                    default
zroot/var  atime                 on                     default
zroot/var  devices               on                     default
zroot/var  exec                  on                     default
zroot/var  setuid                on                     default
zroot/var  readonly              off                    default
zroot/var  jailed                off                    default
zroot/var  snapdir               hidden                 default
zroot/var  aclmode               discard                default
zroot/var  aclinherit            restricted             default
zroot/var  canmount              on                     default
zroot/var  xattr                 off                    temporary
zroot/var  copies                1                      default
zroot/var  version               5                      -
zroot/var  utf8only              off                    -
zroot/var  normalization         none                   -
zroot/var  casesensitivity       sensitive              -
zroot/var  vscan                 off                    default
zroot/var  nbmand                off                    default
zroot/var  sharesmb              off                    default
zroot/var  refquota              none                   default
zroot/var  refreservation        none                   default
zroot/var  primarycache          all                    default
zroot/var  secondarycache        all                    default
zroot/var  usedbysnapshots       329M                   -
zroot/var  usedbydataset         1.84G                  -
zroot/var  usedbychildren        0                      -
zroot/var  usedbyrefreservation  0                      -
zroot/var  logbias               latency                default
zroot/var  dedup                 off                    default
zroot/var  mlslabel                                     -
zroot/var  sync                  standard               default
zroot/var  refcompressratio      1.00x                  -
zroot/var  written               39.2M                  -
zroot/var  logicalused           2.05G                  -
zroot/var  logicalreferenced     1.80G                  -

$ sudo fstat -v -p 63466
USER     CMD          PID   FD MOUNT      INUM MODE         SZ|DV R/W
uucp     faxq       63466 text /usr     1630604 -r-sr-xr-x  274064  r
uucp     faxq       63466   wd /var       1381 drwxr-xr-x      20  r
uucp     faxq       63466 root /             4 drwxr-xr-x      26  r
uucp     faxq       63466    0 /dev          7 crw-rw-rw-    null rw
uucp     faxq       63466    1 /dev          7 crw-rw-rw-    null rw
uucp     faxq       63466    2 /dev          7 crw-rw-rw-    null rw
uucp     faxq       63466    3 /dev          7 crw-rw-rw-    null rw
uucp     faxq       63466    4 /var      50545 prw-------       0  r
uucp     faxq       63466    5* local dgram fffff80039013d20 <-> fffff80004ef7a50

FD 4, it's inode is 50545
$ ls -i /var/spool/hylafax/FIFO
50545 /var/spool/hylafax/FIFO
$ file /var/spool/hylafax/FIFO
/var/spool/hylafax/FIFO: fifo (named pipe)

freebsd: amd64 stable/10
install hylafax from posts and start it.

edit /etc/ttys,add this line:
cuau0   "/usr/local/sbin/faxgetty"      dialup  on
kill -HUP 1

than call the fax modem from another phone.

monit the cpu usage from top.

Everything is ok from 7.1 to 8.2-RELEASE, and worked for 3 years.

so ,is it a bug about /usr/src/sys/fs/fifofs/fifo_vnops.c ?


More information about the freebsd-bugs mailing list