Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 21 Apr 2012 07:10:03 GMT
From:      Taras Marusin <mtv.lviv@gmail.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   bin/167156: looping process mksnap_ffs when run in a chroot environment named. CPU 100%
Message-ID:  <201204210710.q3L7A3Au031658@red.freebsd.org>
Resent-Message-ID: <201204210710.q3L7ABYA036992@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         167156
>Category:       bin
>Synopsis:       looping process mksnap_ffs when run in a chroot environment named. CPU 100%
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sat Apr 21 07:10:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Taras Marusin
>Release:        FreeBSD 9.0-RELEASE
>Organization:
"PEOPLEnet"
>Environment:
FreeBSD localhost 9.0-RELEASE FreeBSD 9.0-RELEASE #0: Tue Jan  3 07:15:25 UTC 2012     root@obrian.cse.buffalo.edu:/usr/obj/usr/src/sys/GENERIC  i386

>Description:
The system is installed with the DVD image. Named is running and working in chroot environment. Full path to chroot environment /var/named.
ps shows:

localhost# ps axw | grep named
  760  ??  Ss   0:00.08 /usr/sbin/syslogd -l /var/run/log -l /var/named/var/run/log -s
  854  ??  Is   0:00.15 /usr/sbin/named -t /var/named -u bind

If you run the command "mksnap_ffs /var /var/.snap/snap_var" system freezes and bring her out of this state can only power down or reset button.
Same thing happens when dump var partition.

In the top we see the following:

last pid:  1236;  load averages:  1.75,  0.71,  0.32    up 0+00:13:58
22:32:34
29 processes:  3 running, 26 sleeping
CPU:  0.0% user,  0.0% nice, 90.1% system,  9.9% interrupt,  0.0% idle
Mem: 19M Active, 12M Inact, 21M Wired, 204K Cache, 19M Buf, 434M Free
Swap: 1024M Total, 1024M Free

  PID USERNAME  THR PRI NICE   SIZE    RES STATE    TIME   WCPU COMMAND
 1236 root        1 101    0  9532K  1016K RUN      1:51 100.00% mksnap_ffs
 1199 root        1  20    0  9944K  1884K RUN      0:02  0.00% top
 1113 root        1  20    0  9720K  1148K RUN      0:02  0.00% moused
 1206 mtv         1  21    0 12800K  4048K select   0:01  0.00% ssh
 1085 root        1  20    0 11324K  3404K select   0:00  0.00% sendmail
 1189 root        1  20    0 in the top we see the following. 9956K  2804K pause    0:00  0.00% csh
  854 bind        4  52    0 27840K 11020K kqread   0:00  0.00% named
  760 root        1  20    0  9612K  1392K select   0:00  0.00% syslogd
 1200 mtv         1  20    0  9924K  1748K wait     0:00  0.00% sh
 1173 root        1  20    0 10124K  1952K wait     0:00  0.00% login
....

>How-To-Repeat:
On a freshly installed system, run named.

localhost# /etc/rc.d/named onestart
wrote key file "/var/named/etc/namedb/rndc.key"
Starting named.
localhost# ps ax | grep named
 1240  ??  Ss    0:00.16 /usr/sbin/named -t /var/named -u bind

check the performance of mksnap_ffs

localhost# mksnap_ffs /var /var/.snap/snap_var
localhost# ls -al /var/.snap/
total 1704
drwxrwxr-x   2 root  operator         512 Apr 20 22:13 .
drwxr-xr-x  24 root  wheel           1024 Apr 21 01:00 ..
-r--r-----   1 root  operator  5368709216 Apr 20 22:13 snap_var

Now write a startup named in rc.conf

localhost# echo 'named_enable="YES"' >> /etc/rc.conf
localhost# cat /etc/rc.conf
hostname="localhost"
ifconfig_em0="DHCP"
sshd_enable="YES"
moused_enable="YES"
# Set dumpdev to "AUTO" to enable crash dumps, "NO" to disable
dumpdev="AUTO"
named_enable="YES"

reboot the server.
look after the overload:

localhost# ps axw | grep named
  760  ??  Ss   0:00.08 /usr/sbin/syslogd -l /var/run/log -l /var/named/var/run/log -s
  854  ??  Is   0:00.15 /usr/sbin/named -t /var/named -u bind

run mksnap_ffs

localhost# mksnap_ffs /var /var/.snap/snap_var

mksnap_ffs program can not be completed and system freezes.








>Fix:
If removed from the syslog "-l /var/named/var/run/log" everything works without problems. But this is not correct.


>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201204210710.q3L7A3Au031658>